Skip to main content

Shipments / orders

Shipments in Traede are typically called orders in a WMS system. These are picking instructions from the brand that should be carried out by the warehouse. Below is a description of the parameters of a shipment

The shipment object

ParameterRequiredDefaultDescription
shipment_numberYesThe number of the shipment. NOTE: This is the number you should use for order number in your WMS. Do NOT use order_number since many shipments can be made on 1 order
order_numberYesThe number of the order of which the shipment was made
order_typeYesb2b or b2c
notesYesNotes / packing instructions provided by the brand
referenceYesA reference typically used to store the end-customer's own order number
currencyYesCurrency of the order
customer_numberYesCustomer number of the end-customer
shipping_codeYesObject shipping code
invoice_addressYesObject address
delivery_addressYesObject address
ordersYesArray<Order>
responsible_personnullOptional object of responsible person
emailnullEmail of the end-customer
telephonenullTelephone number of the end-customer
vat_numbernullVAT number of the end-customer
eori_numbernullEORI number of the end-customer
linesYesArray of object lines

Shipping code

ParameterRequiredDefaultDescription
codeYesThe code identifying how the shipment should be sent. Typically this would map into some carrier codes in the WMS system
drop_point_idnullOptionally the number of the drop point to be used for the shipment if shipping code is of drop point type

Order

ParameterRequiredDefaultDescription
order_numberYes
order_meta{}An object with {"key": "value"} with custom meta data of the order. See custom fields for more information
payment_termnullObject payment terms

Payment terms

ParameterRequiredDefaultDescription
nameYesThe name of the payment terms
erp_code

Responsible person

ParameterRequiredDefaultDescription
emailYes
first_nameYes
last_namenull

Address

ParameterRequiredDefaultDescription
nameYesThe "name" of the address. This is the equavalant of the top line on a letter head. Typically this would be the name of the receiving-party
attnullAtt
addressYesThe address of the receiver. This includes both house number, floor, etc.
zipYesZip code of receiver
regionYesRegion or state
cityYesCity of receiver
countryYesCountry code of receiver. Is 2-letter ISO code (DK, DE, etc.)

Lines

ParameterRequiredDefaultDescription
product_nameYesThe name of the product. This is the name of the product without attributes (Color, Size, etc.)
item_numberYesThe item number of the product. NOTE: This is the number on the product-level, not variant-level. For variant-level refer to sku
attributesYesAn object with {"key": "value"} with the attributes of the variant. This will be Colors, Sizes, etc.
full_nameYesThe name of the product plus its attributes. Use this for delivery notes and packing lists
skuYesThe unique identifier of this specific variant. Use this for identification in your WMS
eannullThe EAN code of this variant
country_of_originnullCountry of origin of the product. This is given as a 2-letter ISO code (DK, DE, etc.)
compositionnullThe composition of the product (materials)
hs_tariff_codenullThe HS Tariff Code of the product
quantityYesThe number of pieces to pack
unit_priceYesThe unit price of each piece. This is the customs value
total_priceYesquantity * unit_price

Get shipments

Endpoint: GET /3pl/shipments

Available properties for filtering: customer_id, created_at, updated_at

caution

It is recommended to use the Export version of this API to get shipments out of TRAEDE. The export version will allow you to easily keep track of shipments you have already exported and only serve you with new shipments.

Data of response

ParameterRequiredDefaultDescription
shipments.*YesAn array of 3PL API shipment
totalYesThe total number of shipments

Export shipments

Endpoint: GET /3pl/shipments/export

This is a version of the GET shipments API that is designed to be used for exporting shipments to a WMS system. It is recommended to read our Introduction to the Export system to get a better understanding of how the export system works. Note this endpoint is different than the Export Shipments API. In this endpoint the data is formatted in the same manner as the 3PL API GET shipments endpoint. In the normal shipments API the data is normalized. It is recommended to use this endpoint instead of the normal GET shipments endpoint, since it's easier to use.

You can add a date+time to the query string using the parameter not_exported_since in shipment to re-export shipments that have already been exported

Available properties for filtering: created_at, updated_at (NOTE: These filters have to be added using our Filters Syntax, however system_id and not_export_since should be added as a normal query string parameter)

The endpoint will fetch all shipments that have not been exported yet

Available query parameters

ParameterData typeRequiredDefaultDescription
system_idstringYesA string identifying the system the shipments should be exported to. This is used so shipments can be exported to multiple systems.
not_exported_sincedatetime (UTC)Current timeAdd this to re-export shipments that have already been exported. Note the timezone should be UTC
include_cancelledinteger0Export cancelled shipments. 0 = only export non-cancelled shipments. 1 = also include cancelled shipments in export
include_completedinteger0Export completed shipments. 0 = only export non-completed shipments. 1 = also include completed shipments in export
filter_groupsArray<Filters>Optional filters to add. See which filters are available above

Data of response

ParameterRequiredDefaultDescription
shipments.*YesAn array of object 3PL API shipment)

Delivering / completing a shipment

Marking a shipment as delivered / completed. NOTE: This can only be done once.

Endpoint: POST /3pl/shipments/deliver

ParameterRequiredDefaultDescription
delivery_noteYesObject of delivery note

Delivery note

ParameterRequiredDefaultDescription
shipment_numberYesThe shipment number to deliver
order_typeYesEither b2b or b2c
carrierYesCarrier code of the carrier delivering the shipment. Find available carrier codes here
colliYesArray of object colli

Colli

ParameterRequiredDefaultDescription
track_tracenullThe package code of the shipment
track_trace_linknullA direct link to a track & trace page. If null Traede will attempt to generate this from track_trace and carrier
linesYesArray of object colli lines

Colli lines

ParameterRequiredDefaultDescription
skuYes, if no ean is givenThe SKU of the line
eanYes, if no sku is givenThe EAN of the line
quantityYesThe number of pieces that were delivered

Example

POST /3pl/shipments/deliver

{
"delivery_note": {
"shipment_number": "1000-1",
"order_type": "b2b",
"carrier": "gls",
"colli": [
{
"track_trace": "1111",
"track_trace_link": "https://gls-europe.eu/tracking?code=1111",
"lines": [
{
"sku": "1000-Black-S",
"quantity": 5
},
{
"sku": "1000-Black-M",
"quantity": 5
}
]
},
{
"track_trace": "2222",
"track_trace_link": "https://gls-europe.eu/tracking?code=2222",
"lines": [
{
"sku": "1000-Black-S",
"quantity": 1
},
{
"sku": "1000-Black-M",
"quantity": 2
}
]
}
]
}
}

Cancel shipment

caution

Note that this only cancels the shipment, not the order

Endpoint: POST /3pl/shipments/cancel

ParameterRequiredDefaultDescription
shipment_idYes, if no shipment_number is given
shipment_numberYes, if no shipment_id is given

Mark shipment as exported

caution

NOTE It is highly recommended to read our Export Shipments guide on how the Export API works

Endpoint: POST /3pl/shipments/mark-as-exported

ParameterData typeRequiredDefaultDescription
shipmentsArray<Shipments that have been exported>YesShipments that have been exported. You can at a max mark 10 shipments at a time

Shipments that have been exported

ParameterData typeRequiredDefaultDescription
shipment_idintYesThe ID of the shipment that has been exported
system_idstringYesA string identifying the system the shipments should be exported to. This is used so shipments can be exported to multiple systems.
notestringAny notes regarding the sync you want to add. These will be displayed in the timeline of the shipment