Send despatch advice
const url = 'https://api.tradecloud1.com/v2/api-connector/shipment/despatch-advice';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"header":{"supplierCompanyId":"00f03b98-2511-489f-9695-13791b3f66b6","buyerAccountNumber":"12345","despatchAdviceNumber":"DA123456789","shipment":{"shipmentNumber":"SN123456789","identifiers":{"billOfLadingNumber":"BOL123456789","billOfLadingIssueDate":"2020-01-01","imoNumber":"IMO123456789","carrierShipmentNumber":"CSN123456789","trackingNumber":"1Z662F416878787827"},"transportMode":"Road transport","departure":{"location":{"locationType":"AgreedPlace","id":"123","idScheme":"GLN","names":["My Company Warehouse","Dock 12"],"addressLines":["Street 123","Area 52"],"postalCode":"1234 AB","city":"Rotterdam","countryCodeIso2":"NL"},"etdDate":"2019-12-31","atdDate":"2019-12-31"},"destinations":[{"location":{"locationType":"AgreedPlace","id":"123","idScheme":"GLN","names":["My Company Warehouse","Dock 12"],"addressLines":["Street 123","Area 52"],"postalCode":"1234 AB","city":"Rotterdam","countryCodeIso2":"NL"},"etaStartDate":"2019-12-31","etaStartTime":"12:13:14","etaEndDate":"2019-12-31","etaEndTime":"12:13:14","etaDate":"2019-12-31","etdDate":"2019-12-31","atdDate":"2019-12-31"}],"agent":{"name":"ACME Shipping Agents Ltd"}}},"lines":[{"despatchAdviceLinePosition":"01","purchaseOrderNumber":"PO123456789","purchaseOrderLinePosition":"0001","deliverySchedulePosition":"01","item":{"buyerItemNumber":"12345","buyerItemRevision":"v2","buyerItemName":"Round tube ø60x45","supplierItemNumber":"67890","supplierItemRevision":"v2","supplierItemName":"Round tube ø60x45","purchaseUnitOfMeasureIso":"PCE"},"despatchQuantity":1234.56,"backorderQuantity":1234.56,"backorderDate":"2019-12-31"}],"erpIssueDateTime":"2019-12-31T10:11:12"}'};
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/shipment/despatch-advice \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "header": { "supplierCompanyId": "00f03b98-2511-489f-9695-13791b3f66b6", "buyerAccountNumber": "12345", "despatchAdviceNumber": "DA123456789", "shipment": { "shipmentNumber": "SN123456789", "identifiers": { "billOfLadingNumber": "BOL123456789", "billOfLadingIssueDate": "2020-01-01", "imoNumber": "IMO123456789", "carrierShipmentNumber": "CSN123456789", "trackingNumber": "1Z662F416878787827" }, "transportMode": "Road transport", "departure": { "location": { "locationType": "AgreedPlace", "id": "123", "idScheme": "GLN", "names": [ "My Company Warehouse", "Dock 12" ], "addressLines": [ "Street 123", "Area 52" ], "postalCode": "1234 AB", "city": "Rotterdam", "countryCodeIso2": "NL" }, "etdDate": "2019-12-31", "atdDate": "2019-12-31" }, "destinations": [ { "location": { "locationType": "AgreedPlace", "id": "123", "idScheme": "GLN", "names": [ "My Company Warehouse", "Dock 12" ], "addressLines": [ "Street 123", "Area 52" ], "postalCode": "1234 AB", "city": "Rotterdam", "countryCodeIso2": "NL" }, "etaStartDate": "2019-12-31", "etaStartTime": "12:13:14", "etaEndDate": "2019-12-31", "etaEndTime": "12:13:14", "etaDate": "2019-12-31", "etdDate": "2019-12-31", "atdDate": "2019-12-31" } ], "agent": { "name": "ACME Shipping Agents Ltd" } } }, "lines": [ { "despatchAdviceLinePosition": "01", "purchaseOrderNumber": "PO123456789", "purchaseOrderLinePosition": "0001", "deliverySchedulePosition": "01", "item": { "buyerItemNumber": "12345", "buyerItemRevision": "v2", "buyerItemName": "Round tube ø60x45", "supplierItemNumber": "67890", "supplierItemRevision": "v2", "supplierItemName": "Round tube ø60x45", "purchaseUnitOfMeasureIso": "PCE" }, "despatchQuantity": 1234.56, "backorderQuantity": 1234.56, "backorderDate": "2019-12-31" } ], "erpIssueDateTime": "2019-12-31T10:11:12" }'Send a new or updated despatch advice by the supplier. Requires Integration role
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Send despatch advice by supplier
object
The header of the despatch advice.
object
The optional Tradecloud company ID of the supplier. Only needed when the integration user is authorized for multiple companies.
Example
00f03b98-2511-489f-9695-13791b3f66b6The buyer account code or number as known in your ERP system and added to the buyer connection in the Tradecloud portal.
Example
12345The unique despatch advice number as known in your ERP system.
Example
DA123456789The shipment related to this despatch advice.
object
The related shipment number as known in your ERP system.
Example
SN123456789The shipment identifiers related to this despatch advice.
object
The bill of lading number as provided by the carrier.
Example
BOL123456789The issue date of the bill of lading as provided by the carrier.
Example
2020-01-01The IMO ship identification number as provided by the carrier.
Example
IMO123456789The shipment number as provided by the carrier.
Example
CSN123456789The tracking number as provided by the carrier or courier.
Example
1Z662F416878787827The Mode of Transport used for the delivery of goods. UNECE.org Recommendation 19 is advised for Mode of Transport texts.
Example
Road transportA shipment departure location with ETD and ATD dates.
object
The shipment departure or destination location.
object
The despatch advice location type according to Incoterms 2020:
AgreedPlace- EXW, FCAPortOfLoading- FAS, FOBPortOfDestination- CFR, CIFPlaceOfDestination- CPT, CIPFinalDestination- DAP, DPU, DDP
Example
FinalDestinationThe identifier for the location.
Example
123Scheme, providing context to the location identifier. Eg. GLN, LOCODE.
Example
GLNThe location names. It is recommended to provide at least one name
Example
[ "My Company Warehouse", "Dock 12"]One or more location address lines
Example
[ "Street 123", "Area 52"]Location postal code
Example
1234 ABLocation city
Example
RotterdamISO 3166-1 alpha-2 country code.
Example
NLThe Estimated Time of Departure of this shipment from this location. Date has ISO 8601 date format.
Example
2019-12-31The Actual Time of Departure of this shipment from this location. Date has ISO 8601 date format.
Example
2019-12-31The shipment routing, ordered by destinations on the route. The total number of destinations is limited to 10 destinations per shipment.
A shipment place, port or final destination with location, ETA period, ATA, ETD and ATD dates.
object
The shipment departure or destination location.
object
The despatch advice location type according to Incoterms 2020:
AgreedPlace- EXW, FCAPortOfLoading- FAS, FOBPortOfDestination- CFR, CIFPlaceOfDestination- CPT, CIPFinalDestination- DAP, DPU, DDP
Example
FinalDestinationThe identifier for the location.
Example
123Scheme, providing context to the location identifier. Eg. GLN, LOCODE.
Example
GLNThe location names. It is recommended to provide at least one name
Example
[ "My Company Warehouse", "Dock 12"]One or more location address lines
Example
[ "Street 123", "Area 52"]Location postal code
Example
1234 ABLocation city
Example
RotterdamISO 3166-1 alpha-2 country code.
Example
NLThe Estimated Time of Arrival period start date of this shipment at this destination. Date has ISO 8601 local date format.
Example
2019-12-31The Estimated Time of Arrival period start time of this shipment at this destination. Time has ISO 8601 local time format.
Example
12:13:14The Estimated Time of Arrival period end date of this shipment at this destination. Use this field when there is no ETA period available. Date has ISO 8601 local date format.
Example
2019-12-31The Estimated Time of Arrival period end time of this shipment at this destination. Use this field when there is no ETA period available. Time has ISO 8601 local time format.
Example
12:13:14The Actual Time of Arrival of this shipment at this destination. Date has ISO 8601 date format.
Example
2019-12-31The Estimated Time of Departure of this shipment from this location. Date has ISO 8601 date format.
Example
2019-12-31The Actual Time of Departure of this shipment from this location. Date has ISO 8601 date format.
Example
2019-12-31A shipping agent used by the supplier to handle a shipment.
object
The name of the shipping agent.
Example
ACME Shipping Agents LtdThe lines of the despatch advice. You only have to send the lines which are new or updated. The total number of lines is limited to 500 lines per shipment.
A despatch advice line containing identifiers, item and quantity.
object
The required position in the despatch advice. The position should be unique within the despatch advice and immutable.
Example
01The related purchase order number as provided by the buyer.
Example
PO123456789The line position in the purchase order as provided by the buyer.
Example
0001The related delivery schedule position in the purchase order line as provided by the buyer.
Example
01The item being despatched, as provided in the purchase order by the buyer.
object
The required item code or number as provided by the buyer.
Example
12345The revision (or version) of this item as provided by the buyer.
Example
v2The short name of this item as provided by the buyer.
Example
Round tube ø60x45The item code or number as known in your ERP system.
Example
67890The revision (or version) of this item as known in your ERP system.
Example
v2The short name of this item as known in your ERP system.
Example
Round tube ø60x45The purchase unit of measure for this item, passed through as-is to the supplier. No standard is enforced; UN/ECE Recommendation N°20 (Codes for Units of Measure) is recommended if you want a standard.
Example
PCEThe required scheduled or despatched quantity of this purchase order line or delivery schedule position. Quantity has a decimal format.
Example
1234.56The backorder quantity of this purchase order line or delivery schedule position. Quantity has a decimal format.
Example
1234.56The backorder expected delivery date of this purchase order line or delivery schedule position. Date has ISO 8601 date format.
Example
2019-12-31ISO local date and time at which the despatch advice was originally issued in your ERP system.
Example
2019-12-31T10:11:12Responses
Section titled “Responses”Successfully sent despatch advice.
Successfully queued the despatch advice. The despatch advice has 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 actionAn 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.
