Orders
The data object for orders
Orders are the key data objects to understand when working with Skrym. The following points are important to keep in mind regarding our definition of an order:
- Every order should have a unique identifier
- An order should contain at least one item
- An order constitutes a promise to deliver goods
- An order can be split into multiple order parts (e.g., for partial delivery)
- An order is delivered through one or more Shipments, each of which can have multiple tracked parcels
Order references
Order references are identifiers that link orders across different systems. Each order can have multiple references, allowing it to be tracked and identified through various stages of the fulfillment process.
Reference types
Each order reference has a type that indicates its origin and purpose:
- SHIPMENT - Reference from shipment tracking systems
- PARCEL - Reference from parcel tracking systems
- EXTERNAL - External reference from third-party systems
- SKRYM - Skrym internal reference
- INVOICE_CONTROL - Reference from invoice control systems
- CHECKOUT - Reference from the checkout process
When creating or updating orders, if no reference type is specified, it will be empty Reference types help identify the source and purpose of each reference, making it easier to trace orders through different systems and processes.
Order parts
An order part is a partition of an order and must have at least one item. If an order part is split, it removes the previous part and creates two new parts.
Creating and updating order parts
Use the UpsertOrderParts endpoint to split orders into multiple parts or associate products with specific shipment references.
This is useful when you need to:
- Split an order into multiple shipments for partial delivery
- Create separate parts for different shipping methods or carriers
- Track which products are in which shipment
- Handle returns as separate order parts
- Associate products with specific tracking numbers or parcel references
You can identify orders using either the Skrym order ID or your own external order reference. Similarly, products can be identified using Skrym product IDs or your external product IDs. If a product doesn't exist yet, you can provide product details and it will be created automatically.
Each order part can include optional information such as origin and destination locations, shipment references, parcel references, transporter details, and pricing information for each product.