Shipment Creation
Use this API to create shipment requests from third-party order rows. Source rows must be grouped by order so each request object contains one order and its line items.
At A Glance
POST
/v2/shipments/third-party| Area | Detail |
|---|---|
| Base URL | https://api.mulltiply.org |
| Content type | application/json |
| Authentication | x-api-key request header |
| Request body | Array of shipment order objects |
| Grouping key | Sales_Order_No |
Headers
Content-Type: application/json
x-api-key: YOUR_API_KEY
Request Body
Each object represents one order to ship. Each order must contain a lineItems
array, even when there is only one line item.
- JSON Body
- cURL
Request body
[
{
"orderId": 1001,
"lineItems": [
{
"lineItemId": 5001,
"quantity": 2
}
]
},
{
"orderId": 1002,
"lineItems": [
{
"lineItemId": 5002,
"quantity": 2
}
]
}
]
Shipment creation request
curl --request POST \
--url 'https://api.mulltiply.org/v2/shipments/third-party' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '[{"orderId":1001,"lineItems":[{"lineItemId":5001,"quantity":2}]}]'
Field Mapping
Order Fields
| API field | Source field | Description |
|---|---|---|
orderId | Sales_Order_No | Unique order identifier. Convert to number if the source sends a string. |
Line Item Fields
| API field | Source field | Description |
|---|---|---|
lineItems[].lineItemId | Line_No | Unique line item identifier. |
lineItems[].quantity | Quantity | Quantity to be shipped. |
Grouping Logic
- Read source rows from the third-party shipment data.
- Convert
Sales_Order_Noto numericorderIdwhen needed. - Group all rows with the same
Sales_Order_No. - Create one object per grouped order.
- Add every row in that group to the order's
lineItemsarray. - Keep one line item inside
lineItemseven when the order has only one row.
Validation Rules
| Field | Required | Rule |
|---|---|---|
orderId | Yes | Must map from Sales_Order_No. |
lineItems[].lineItemId | Yes | Must map from Line_No. |
lineItems[].quantity | Yes | Must map from Quantity. |
Records missing required values should be skipped or handled by the integration's business validation rules.
Final Payload Example
Final payload
[
{
"orderId": 1004,
"lineItems": [
{
"lineItemId": 5004,
"quantity": 10
}
]
},
{
"orderId": 1001,
"lineItems": [
{
"lineItemId": 5001,
"quantity": 2
}
]
},
{
"orderId": 1002,
"lineItems": [
{
"lineItemId": 5002,
"quantity": 2
}
]
}
]
Source Data Checklist
| Source column | Used for |
|---|---|
Sales_Order_No | orderId |
Line_No | lineItems[].lineItemId |
Quantity | lineItems[].quantity |
Customer_No | Not used |
Item_No | Not used |
Variant_Code | Not used |
Location_Code | Not used |
Ship_to_Code | Not used |
Order_Date | Not used |
Delivery_Date | Not used |
Implementation Checklist
- Confirm each source row has
Sales_Order_No,Line_No, andQuantity. - Convert numeric IDs before sending when the source sends them as strings.
- Group all rows by
Sales_Order_No. - Send each grouped order once.
- Keep line items in an array for every order.