Cost centre ID for AssignedTo=Stock
Posted: Fri Oct 10, 2025 4:42 am
When a PO is issued for a particular cost centre the vendorOrders API endpoint (api/v1.0/companies/0/vendorOrders/<vendorOrder>) shows the cost centre ID
however if the PO is issued for stock the AssignedTo object is empty; i.e.
However in order to create a receipt for the order (/api/v1.0/companies/{companyID}/vendorOrders/{vendorOrderID}/receipts/) we need the cost centre ID.
Is there an endpoint (similar to the catalogs endpoint) I can lookup the ID (for stock) because the code needs to default to the ID if it's not returned via the API. Along the same lines are there other cost centers that don't come through via the API in which case this becomes a challenge to auto-assign
Code: Select all
"AssignedTo": {
"ID": 34514,
"CostCenter": {
"ID": 119,
"Name": "Sales Aluminium"
},
"Name": "102660-34514 Sales Aluminium",
"Job": 102660,
"Section": 30010
},Code: Select all
"AssignedTo": {},
"Stage": "Approved",
"Status": {
"ID": 24,
"Name": "Purchase Orders : Sent to Supplier"
},Is there an endpoint (similar to the catalogs endpoint) I can lookup the ID (for stock) because the code needs to default to the ID if it's not returned via the API. Along the same lines are there other cost centers that don't come through via the API in which case this becomes a challenge to auto-assign