I have a requirement to add a container delivery job via API to an existing customer. The customer has a Site Order. I have tried a PUT request to the existing order with a new entry in the containers array
{
"Containers": [
{
"ContainerTypeListItem": {
"Description": "240 Litre Bin",
"Guid": "025737b5-c589-e811-80c2-00155d0aac58"
},
"ContainerStateListItem": {
"Description": "Active",
"Guid": "766271f1-1401-e811-80c2-00155d8d0455"
}
}]
}
This produces an error because the new container entry does not supply a GUID. It seems that the container entity must be created first and then added to the array.
In that case, what entity should I POST to create the Site Order Item (SiteOrder.Containers[] is a list of site order items).
Note: I tried POSTing to /containers but that requires a value to be supplied for a Tag (RFID tag I assume), which would not exist at the time of creating a container delivery job.
Can someone let me know how container jobs should be created via API calls?