Send order indicators
const url = 'https://api.tradecloud1.com/v2/api-connector/order/indicators';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"order":{"companyId":"40fef20d-8769-4a0b-aa2d-90a0b00750b4","purchaseOrderNumber":"PO123456789","indicators":{"shipped":false,"delivered":false,"completed":false,"cancelled":false}},"lines":[{"position":"0001","indicators":{"shipped":false,"delivered":false,"completed":false,"cancelled":false}}],"erpLastChangeDateTime":"2019-12-31T10:11:12","erpLastChangedBy":{"email":"contact@yourcompany.com"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tradecloud1.com/v2/api-connector/order/indicators \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "order": { "companyId": "40fef20d-8769-4a0b-aa2d-90a0b00750b4", "purchaseOrderNumber": "PO123456789", "indicators": { "shipped": false, "delivered": false, "completed": false, "cancelled": false } }, "lines": [ { "position": "0001", "indicators": { "shipped": false, "delivered": false, "completed": false, "cancelled": false } } ], "erpLastChangeDateTime": "2019-12-31T10:11:12", "erpLastChangedBy": { "email": "contact@yourcompany.com" } }'Send order indicators by the buyer. Requires Integration role
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Send order indicators by buyer
object
object
The optional Tradecloud company ID of the buyer. Only needed when the integration user is authorized for multiple companies.
Example
40fef20d-8769-4a0b-aa2d-90a0b00750b4The purchase order number as provided by the buyer.
Example
PO123456789Use optional order level indicators to provide additional order or line state.
object
All goods of this order are shipped by the supplier.
Example
falseMarks the order as delivered at the buyer. Intended for stock items with delivery tolerances, where a receipt within tolerance counts as delivered. May be set on top of the delivery history for this purpose.
Example
falseThe order has been completed at the buyer.
Example
falseThe order has been cancelled by the buyer.
Example
falseThe line indicators of the purchase order.
object
Required position identifier in the purchase order. The position should be unique within the order and immutable.
Example
0001object
All goods of this order line are shipped by the supplier.
Example
falseMarks the order line as delivered at the buyer. Intended for stock items with delivery tolerances, where a receipt within tolerance counts as delivered. May be set on top of the delivery history for this purpose.
Example
falseThe order line has been completed at the buyer.
Example
falseThe order line has been cancelled by the buyer.
Example
falseISO local date and time at which the order was updated in your ERP system.
Example
2019-12-31T10:11:12The employee who is responsible for or who added, updated or responded to this order.
object
Employee email as known in Tradecloud.
Example
contact@yourcompany.comResponses
Section titled “Responses”Successfully verified and sent order indicators.
Successfully queued order indicators. Indicators have not yet been verified
Bad request, the user should check the response body for more info.
object
Example
missing.propertyExample
Property X was missingNot authenticated, the user should authenticate using a valid access token, use Basic Authentication, or refresh to get a valid token. May or may not contain a structured response body
object
Example
Authentication failedThe number of authentication attempts left before the user is banned. Applicable when authentication through Basic Authentication fails.
Example
2Int describing the number of seconds left before the user is allowed to attempt a login with Basic Authentication again.
Example
300Not authorized, the user is authenticated but does not have the necessary permission.
object
Example
Not authorized for this actionOrder not found.
An unexpected error occurred, Tradecloud ops will be alerted. May or may not contain a structured response body.
object
Example
some.errorExample
Some error occurredThe cause of this error. Free-format JSON object.
object
Service is not healthy (bad gateway), Tradecloud ops will be alerted. Will not contain a structured response body.
Service is unavailable (overloaded or down for maintenance), Tradecloud ops will be alerted. May or may not contain a structured response body.
object
Example
Could not retrieve data from external source.Service is unavailable (gateway timeout), Tradecloud ops will be alerted. Will not contain a structured response body.
