Order Shipping Updates
Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)
Version | Date | Created / Updated | Notes |
---|---|---|---|
1.0 | 04.04.23 | Bogomil Pavlov | First publish |
The purpose of this document is to describe how we ship orders on Very. There are no specified carriers which we have to use or carrier mappings we need to introduce, we just ship the orders with whatever info we receive from the client as carrier, tracking number and tracking url.
Very do support partial shipping updates so we want to implement the partial shipping logic. We want all triggers, status, error handling, etc. to be as per the standard shipping abstraction
In order to ship an order it must be with “Ready For Shipping“ or “Partially Shipped” status and acknowledged.
API Call: POST https://api-sl-2-3.kornitx.net/order/{KornitXorderID}/shipment
API Docs: https://developers.kornitx.net/api-docs/order-shipments-api
Mapping:
Very Field | Required | Hemi Field | Comment | |
---|---|---|---|---|
status |
Yes | Hardcoded as “200“ | ||
carrier |
No | Order Shipment > Courier | ||
tracking |
No | Order Shipment > Tracking Number | ||
tracking_url |
No | Order Shipment > Tracking Url | Tracking URL - the URL to be used (sent to the MP) for this Shipment. In the cases where this is not supplied we should aim to map via our Couriers table (by the Courier name) and pick the correct information from the default field provided there | |
items |
||||
id |
Yes | Product In Order > Item Order Line ID | ||
quantity |
Yes | Order Shipment Row > Quantity |
Sample Request: POST https://api-sl-2-3.kornitx.net/order/48079310/shipment
{
"status": 200,
"tracking": "JD12345876A",
"carrier": "DPD",
"tracking_url": "test.com",
"items": [
{
"id": 87327767,
"quantity": 1
}
]
}
Sample Error Response #1:
{
"error": {
"message": "Authentication required",
"code": 0
}
}
Sample Error Response #2:
{
"error": {
"message": "Invalid order status",
"code": 0
}
}
Sample Error Response #3:
{
"error": {
"message": "Invalid item specified, index 0",
"code": 0
}
}
Sample Response:
[
{
"id": 16411365,
"tracking": "",
"carrier": "",
"label_url": "",
"document_url": "",
"items": [
{
"id": 85287659,
"order_id": 48079310,
"quantity": 1,
"quantity_shipped": 1
},
{
"id": 85287660,
"order_id": 48079310,
"quantity": 2,
"quantity_shipped": 2
}
]
}
]
Based on the response we need to mark the order as “Shipped“ or “Partially Shipped“ if any errors are returned we want to store them in Order Errors table.
All validations are as per the Order management general requirements