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
Parameter | Required | Default | Description |
---|---|---|---|
shipment_number | Yes | The 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_number | Yes | The number of the order of which the shipment was made | |
order_type | Yes | b2b or b2c | |
notes | Yes | Notes / packing instructions provided by the brand | |
reference | Yes | A reference typically used to store the end-customer's own order number | |
currency | Yes | Currency of the order | |
customer_number | Yes | Customer number of the end-customer | |
shipping_code | Yes | Object shipping code | |
invoice_address | Yes | Object address | |
delivery_address | Yes | Object address | |
orders | Yes | Array<Order> | |
responsible_person | null | Optional object of responsible person | |
email | null | Email of the end-customer | |
telephone | null | Telephone number of the end-customer | |
vat_number | null | VAT number of the end-customer | |
eori_number | null | EORI number of the end-customer | |
lines | Yes | Array of object lines |
Shipping code
Parameter | Required | Default | Description |
---|---|---|---|
code | Yes | The code identifying how the shipment should be sent. Typically this would map into some carrier codes in the WMS system | |
drop_point_id | null | Optionally the number of the drop point to be used for the shipment if shipping code is of drop point type |
Order
Parameter | Required | Default | Description |
---|---|---|---|
order_number | Yes | ||
order_meta | {} | An object with {"key": "value"} with custom meta data of the order. See custom fields for more information | |
payment_term | null | Object payment terms |
Payment terms
Parameter | Required | Default | Description |
---|---|---|---|
name | Yes | The name of the payment terms | |
erp_code |
Responsible person
Parameter | Required | Default | Description |
---|---|---|---|
email | Yes | ||
first_name | Yes | ||
last_name | null |
Address
Parameter | Required | Default | Description |
---|---|---|---|
name | Yes | The "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 | |
att | null | Att | |
address | Yes | The address of the receiver. This includes both house number, floor, etc. | |
zip | Yes | Zip code of receiver | |
region | Yes | Region or state | |
city | Yes | City of receiver | |
country | Yes | Country code of receiver. Is 2-letter ISO code (DK, DE, etc.) |
Lines
Parameter | Required | Default | Description |
---|---|---|---|
product_name | Yes | The name of the product. This is the name of the product without attributes (Color, Size, etc.) | |
item_number | Yes | The item number of the product. NOTE: This is the number on the product-level, not variant-level. For variant-level refer to sku | |
attributes | Yes | An object with {"key": "value"} with the attributes of the variant. This will be Colors, Sizes, etc. | |
full_name | Yes | The name of the product plus its attributes. Use this for delivery notes and packing lists | |
sku | Yes | The unique identifier of this specific variant. Use this for identification in your WMS | |
ean | null | The EAN code of this variant | |
country_of_origin | null | Country of origin of the product. This is given as a 2-letter ISO code (DK, DE, etc.) | |
composition | null | The composition of the product (materials) | |
hs_tariff_code | null | The HS Tariff Code of the product | |
quantity | Yes | The number of pieces to pack | |
unit_price | Yes | The unit price of each piece. This is the customs value | |
total_price | Yes | quantity * 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
Parameter | Required | Default | Description |
---|---|---|---|
shipments.* | Yes | An array of 3PL API shipment | |
total | Yes | The 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
Parameter | Data type | Required | Default | Description |
---|---|---|---|---|
system_id | string | Yes | A string identifying the system the shipments should be exported to. This is used so shipments can be exported to multiple systems. | |
not_exported_since | datetime (UTC) | Current time | Add this to re-export shipments that have already been exported. Note the timezone should be UTC | |
include_cancelled | integer | 0 | Export cancelled shipments. 0 = only export non-cancelled shipments. 1 = also include cancelled shipments in export | |
include_completed | integer | 0 | Export completed shipments. 0 = only export non-completed shipments. 1 = also include completed shipments in export | |
filter_groups | Array<Filters> | Optional filters to add. See which filters are available above |
Data of response
Parameter | Required | Default | Description |
---|---|---|---|
shipments.* | Yes | An 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
Parameter | Required | Default | Description |
---|---|---|---|
delivery_note | Yes | Object of delivery note |
Delivery note
Parameter | Required | Default | Description |
---|---|---|---|
shipment_number | Yes | The shipment number to deliver | |
order_type | Yes | Either b2b or b2c | |
carrier | Yes | Carrier code of the carrier delivering the shipment. Find available carrier codes here | |
colli | Yes | Array of object colli |
Colli
Parameter | Required | Default | Description |
---|---|---|---|
track_trace | null | The package code of the shipment | |
track_trace_link | null | A direct link to a track & trace page. If null Traede will attempt to generate this from track_trace and carrier | |
lines | Yes | Array of object colli lines |
Colli lines
Parameter | Required | Default | Description |
---|---|---|---|
sku | Yes, if no ean is given | The SKU of the line | |
ean | Yes, if no sku is given | The EAN of the line | |
quantity | Yes | The 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
Parameter | Required | Default | Description |
---|---|---|---|
shipment_id | Yes, if no shipment_number is given | ||
shipment_number | Yes, 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
Parameter | Data type | Required | Default | Description |
---|---|---|---|---|
shipments | Array<Shipments that have been exported> | Yes | Shipments that have been exported. You can at a max mark 10 shipments at a time |
Shipments that have been exported
Parameter | Data type | Required | Default | Description |
---|---|---|---|---|
shipment_id | int | Yes | The ID of the shipment that has been exported | |
system_id | string | Yes | A string identifying the system the shipments should be exported to. This is used so shipments can be exported to multiple systems. | |
note | string | Any notes regarding the sync you want to add. These will be displayed in the timeline of the shipment |