Proper way to specify a VM template ID through API call

Through API we should use one.vm.allocate function to instantiate a VM. At least that’s what I think.
http://docs.opennebula.org/5.2/integration/system_interfaces/api.html#actions-for-virtual-machine-management

But there is no input argument that specifies the template id. Only “string containing the template for the vm”. Should we include this ID information in the whole template we are sending through API? For instance, must we include a line similar to this one:

TEMPLATE_ID = “1”

inside that string?

I am trying to find a proper way of specifying the exact template ID from which some VM should be made of.