Skip to content

Send order delivery events

POST
/api-connector/order/deliveries
curl --request POST \
--url https://api.tradecloud1.com/v2/api-connector/order/deliveries \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "order": { "companyId": "aa8bae80-b303-4237-8226-f4a209592a5b", "purchaseOrderNumber": "PO12345" }, "lines": [ { "position": "0001", "deliveries": [ { "date": "2021-03-25", "quantity": 41.5 } ] } ], "erpLastChangeDateTime": "2019-12-31T10:11:12", "erpLastChangedBy": { "email": "contact@yourcompany.com" } }'

Send delivery events for one or multiple lines within an order. This will append the deliveries to the order line’s delivery history. Requires Integration role.

Send order delivery event by buyer

Media typeapplication/json
object
order
required

The order header information identifying the purchase order to update.

object
companyId

The optional Tradecloud company ID of the buyer. Only needed when the integration user is authorized for multiple companies.

string format: uuid

Example

aa8bae80-b303-4237-8226-f4a209592a5b
purchaseOrderNumber
required

The purchase order number for which the update is sent.

string

Example

PO12345
lines
required

Information about the order lines for which the delivery events are sent.

Array<object>
object
position
required

The position of the order line for which a delivery event is sent.

string

Example

0001
deliveries
required

List of deliveries that should be appended to the delivery history of the order line. DO NOT send the full delivery history; only include the new deliveries that need to be appended to the existing delivery history. The total number of delivery history lines is limited to 100 lines per order line. Deliveries are matched against the delivery schedule by date and quantity.

Array<object>
object
date
required
string format: YYYY-MM-DD

Example

2021-03-25
quantity
required

The quantity that was delivered

number format: float

Example

41.5
erpLastChangeDateTime

ISO local date and time at which the order was updated in your ERP system.

string format: YYYY-MM-DDThh:mm:ss

Example

2019-12-31T10:11:12
erpLastChangedBy

The employee who is responsible for or who added, updated or responded to this order.

object
email

Employee email as known in Tradecloud.

string format: email

Example

contact@yourcompany.com

Successfully verified and sent delivery events.

Successfully queued delivery events. The delivery events have not yet been verified.

Bad request, the user should check the response body for more info.

Media type*/*
object
code
required
string

Example

missing.property
message
required
string

Example

Property X was missing

Not 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

Media type*/*
object
message
required
string

Example

Authentication failed
attemptsLeft

The number of authentication attempts left before the user is banned. Applicable when authentication through Basic Authentication fails.

integer

Example

2
banned

Int describing the number of seconds left before the user is allowed to attempt a login with Basic Authentication again.

integer

Example

300

Not authorized, the user is authenticated but does not have the necessary permission.

Media type*/*
object
message
required
string

Example

Not authorized for this action

Order not found.

An unexpected error occurred, Tradecloud ops will be alerted. May or may not contain a structured response body.

Media type*/*
object
code
required
string

Example

some.error
message
required
string

Example

Some error occurred
cause

The 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.

Media type*/*
object
message
required
string

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.