Receive a shipment event
How to receive a shipment event
Tradecloud sends shipment events to buyers when a shipment event is triggered.
The shipment module is under development. The API and documentation may change.
Choose your API method
You must choose between two methods to receive shipment events:
Webhook API (Push): Tradecloud pushes shipment events to your system.
Polling API (Pull): Your system periodically checks for shipment updates.
For details on choosing between these methods:
Webhook versus pollingImplementation options
Using the webhook API
Use the POST shipment webhook endpoint.
The webhook body contains:
eventName: The shipment event name, currentlyShipmentIssuedBySupplierShipmentReissuedBySupplierShipmentApprovedByBuyerShipmentRejectedByBuyerShipmentHeaderUpdatedBySupplierShipmentDocumentAttachedByBuyerShipmentDocumentAttachedBySupplierShipmentResentByBuyer
shipment: The actual shipment statemeta: The message meta information, see Message meta information
Using the polling API
Use the POST poll shipments endpoint.
The polling response body contains:
data: The actual shipment statestotal: The total number of matching shipments, regardless of paginglastUpdatedAt: Store thelastUpdatedAtvalue to use aslastUpdatedAfterin subsequent requests
Shipment state
The shipment data includes:
id: The Tradecloud shipment identifieridentifiers: The identifiers related to this shipment, see Shipment identifierstransportMode: The mode of transport name used for the delivery of goods. UNECE Code List Recommendation 19 is recommended for mode of transport namessupplierShipment: The supplier side header of the shipment, see Supplier shipment headerbuyerShipment: The buyer side header of the shipment, see Buyer shipment headerloadCarriers: A list of all load carriers in this shipment, each containing shipment lines, see Load carrierlines: A list of all shipment lines not loaded in a load carrier, see Shipment linelocations: The departure and destination locations with arrival and departure date/times, see Shipment locationsstatus: The shipment statusprocessStatus: The shipment process status, currentlyIssued,Approved, orRejected, and may be extended with other values in the futureprocessStatusReason: The optional reason for the current process status, for example why the shipment was rejected
meta: Meta information about the shipment, see Shipment meta information
Shipment identifiers
The identifiers related to this shipment:
billOfLadingNumber: The bill of lading number as provided by the carrierimoNumber: The IMO ship identification number as provided by the carriercarrierShipmentNumber: The shipment number as provided by the carriertrackingNumber: The tracking number as provided by the carrier or courier
Supplier shipment header
The supplier side header of this shipment:
companyId: The mandatory Tradecloud company identifier of the suppliersupplierParty: The unique party identifier and scheme, like GLN, of the supplierbuyerAccountNumber: The buyer account code or number as used by the suppliershipmentNumber: The related shipment number as known in the supplier's ERP systeminvoiceNumbers: The related invoice numbers as known in the supplier's ERP systemdocuments: The supplier documents attached to this shipment, see Documentcontacts: The supplier contacts related to this shipment, see Contact
Buyer shipment header
The buyer side header of this shipment:
companyId: The mandatory Tradecloud company identifier of the buyerbuyerParty: The unique party identifier and scheme, like GLN, of the buyersupplierAccountNumber: The supplier account code or number as known by the buyerdocuments: The buyer documents attached to this shipment, see Documentcontacts: The buyer contacts related to this shipment, see ContactpurchaseOrderTerms: The purchase order terms as agreed between buyer and supplier, see Purchase order terms
Contact
A contact person related to this shipment:
userId: The Tradecloud user identifieremail: The contact email as known in TradecloudfirstName: The given name of the contact personlastName: The family name of the contact personposition: The business role of the contact person within the companyphoneNumber: The phone number of the contact person
Document
code: The unique identifier of the document as provided by the supplier or buyerrevision: The revision of the documentname: The short name of the documentdescription: The description of the documenttype: The type of the document (e.g., General, Invoice, Packing List, etc.)objectId: The object ID as known by the Tradecloud Object Storage, if this document is stored in Tradecloud, see also:
url: The location of the document if it is not stored in Tradecloudmeta: Meta information about the shipment documentlastUpdatedAt: ISO date and time with timezone when the shipment document was last updated in Tradecloud. A document has been added or changed if thedocument.meta.lastUpdatedAtequals theshipment.meta.lastUpdatedAt
Purchase order terms
The purchase order terms, as agreed between buyer and supplier, related to this shipment:
incotermsCode: The Incoterms code according to ICC Incoterms 2020incoterms: The Incoterms named place (delivery, terminal, port, or destination)paymentTermsCode: The payment terms code as defined in the buyer's ERP systempaymentTerms: The payment terms text as defined in the buyer's ERP system
Load carrier
A load carrier containing shipment lines. Use either the container fields or the generic package fields together with lines.
Container fields
When the load carrier is a container:
containerNumber: The BIC ISO 6346 Container Identification NumbercontainerSizeAndType: The BIC ISO 6346 Container Size & Type Code
Generic package fields
When the load carrier is NOT a container:
packageSSCC: The package GS1 Serial Shipping Container Code (SSCC)packageType: The package type. UNECE Code List Recommendation 21 is recommended
Lines
lines: A list of all shipment lines loaded in this load carrier, see Shipment line
Shipment line
A shipment line containing identifiers, item, and supplier data including quantities. A line is added to either a shipment directly or to a load carrier.
purchaseOrderNumber: The mandatory related purchase order number as provided by the buyerpurchaseOrderLinePosition: The mandatory line position in the purchase order as provided by the buyerdeliverySchedulePosition: The related delivery schedule position in the purchase order line as provided by the buyeritem: The item that is shipped, see Shipment itemsupplierLine: The supplier side of the shipment line, see Supplier shipment linemeta: Meta information about the shipment line, see Shipment line meta information
Shipment item
The item (article, goods) being shipped:
buyerItemNumber: The item number as provided by the buyerbuyerItemRevision: The revision of the item as provided by the buyerbuyerItemName: The short name of this item as provided by the buyersupplierItemNumber: The supplier item code or number as provided by the buyer or suppliersupplierItemRevision: The revision (or version) as provided by the suppliersupplierItemName: The short name of this item as provided by the supplierpurchaseUnitOfMeasureIso: The 3-letter purchase unit according to ISO 80000-1 which applies to this item
Supplier shipment line
The supplier side of the shipment line:
despatchAdviceNumber: The mandatory unique despatch advice number as provided by the supplierdespatchAdviceLinePosition: The mandatory position in the despatch advice as provided by the supplier. The position is unique within the despatch advice and immutabledespatchQuantity: The mandatory despatch quantity of this purchase order line or delivery schedule positionbackorderQuantity: The backorder quantity of this purchase order line or delivery schedule position
Shipment line meta information
lastUpdatedAt: ISO date and time with timezone when the shipment line was last updated in Tradecloud. A line has been added or changed if thelines.meta.lastUpdatedAtequals theshipment.meta.lastUpdatedAt
Shipment locations
The departure and destination locations together with arrival and departure date/times of a shipment:
departure: The departure location and dates, see Shipment departuredestinations: One or more destination locations with arrival and departure date/times, see Shipment destination
Shipment departure
A shipment departure location with ETD and ATD dates:
location: The departure location, see Shipment locationetdDate: The Estimated Time of Departure of this shipment from this locationatdDate: The Actual Time of Departure of this shipment from this location
Shipment destination
A shipment place, port, or final destination with location, ETA time window, ATA, ETD, and ATD dates:
location: The location where the shipment should arrive next, see Shipment location
Estimated start and end date/times indicate the scheduled time window of arrival:
etaStartDate: The Estimated Time of Arrival period start date of this shipment at this destinationetaStartTime: The Estimated Time of Arrival period start time of this shipment at this destinationetaEndDate: The Estimated Time of Arrival period end date of this shipment at this destinationetaEndTime: The Estimated Time of Arrival period end time of this shipment at this destinationataDate: The Actual Time of Arrival of this shipment at this destinationetdDate: The Estimated Time of Departure of this shipment from this locationatdDate: The Actual Time of Departure of this shipment from this location
Shipment location
locationType: A location type according to ICC Incoterms 2020:AgreedPlace(used with EXW, FCA)PortOfLoading(used with FAS, FOB)PortOfDestination(used with CFR, CIF)PlaceOfDestination(used with CPT, CIP)FinalDestination(used with DAP, DPU, DDP)
id: The required identifier for the location, in context ofidSchemeidScheme: Scheme providing context to the location identifier, like GLNnames: One or more location names. It is recommended to provide at least one nameaddressLines: One or more location address linespostalCode: Location postal codecity: Location citycountryCodeIso: ISO 3166-1 alpha-2 country code
Shipment meta information
lastUpdatedAt: ISO date and time with timezone when the shipment was last updated in Tradecloud, useful for polling shipmentssupplierErpMeta: The supplier's ERP meta information about this shipmentdespatchAdviceErpIssueDateTime: Local date and time when the despatch advice of this shipment was issued in the supplier's ERP system
Message meta information
messageId: The Tradecloud identifier of this messagesource: Includes meta information about the source of this message:traceId: The Tradecloud trace identifier of this message. All related messages in a flow will have the same traceIduserId: The Tradecloud user identifier which triggered the first message in a flowcompanyId: The Tradecloud company identifier which triggered the first message in a flow
createdDateTime: Date and time with time zone when this message was created
Last updated