Channel API: shipments
About this article
This article covers how to call GET /v2/shipments via the Channel API, which filters to use, how to read the response, and how to set up a reliable polling loop.
Table of contents
Endpoint: retrieve merchant shipments
Introduction
When a merchant ships an order in ChannelEngine, a shipment record is created containing the carrier details, tracking number, and the order lines that have been dispatched.
As a channel, your responsibility is to poll for these shipment records and use them to update orders in your marketplace. Use shipment records to mark orders as shipped on your platform and surface tracking information to buyers.
Requirements
- Channel API key - pass it as a URL query parameter:
?apikey={your-key}. Find it on a given channel at Setup, General, API key. - Existing shipments - orders must have been placed and shipped by the merchant before this endpoint returns data. If the result set is empty, confirm that shipments exist at Orders, Shipments.
- Pagination handling - results are capped at 100 per page. Your integration must handle multi-page responses. See Pagination.
Endpoint: retrieve merchant shipments
The shipments endpoint returns a paginated list of shipments created by merchants for your channel.
-
Retrieve merchant shipments:
GET /v2/shipments
Poll for shipments created by the merchant. When the merchant ships an order in ChannelEngine, a shipment record is created containing the carrier, tracking number, and the order lines that have been dispatched. Retrieve these updates and use them to mark orders as shipped in your marketplace and give buyers accurate tracking information. Pass your API key as a URL query parameter:?apikey={your-key}.
apikey URL query parameter — not in the X-CE-KEY header. The two key types are separate and non-interchangeable. If you are a merchant retrieving your own shipments, use GET /v2/shipment in the Merchant API instead.
Making the request
Send a GET request to the shipments endpoint, passing your API key as a query parameter:
GET https://{tenant}.channelengine.net/api/v2/shipments?apikey={your-key}A cURL example — fetching all shipments since 1 January 2024:
curl -X GET \ "https://demo.channelengine.net/api/v2/shipments?fromDate=2024-01-01T00:00:00&apikey=YOUR_API_KEY" \ -H "Accept: application/json"
fromDate filter in production. Without it, the endpoint returns every shipment ever created for your channel, which grows unboundedly and slows responses over time.
Shipment query parameters
| Parameter | Type | Required | Purpose | Description |
apikey |
string | Required | Authentication | Your Channel API key, passed as a URL query parameter. |
fromDate |
ISO 8601 | Optional | Incremental polling | Filter on shipment creation date from this date (inclusive). Use as your polling cursor so each call only fetches new shipments. Strongly recommended in production — without it, the endpoint returns every shipment ever created for your channel. |
toDate |
ISO 8601 | Optional | Fixed time window | Filter on shipment creation date until this date (exclusive). Combine with fromDate to define a precise polling window or to backfill a specific date range. |
updatedFromDate |
ISO 8601 | Optional | Detect updates | Filter on shipment updated date from this date (inclusive). Use to pick up shipments modified since you last polled — for example, a tracking number added to a previously pending shipment. |
updatedToDate |
ISO 8601 | Optional | Detect updates | Filter on shipment updated date until this date (exclusive). Use with updatedFromDate to define a specific update window. |
channelOrderNos |
array[string] | Optional | Order-specific lookup | Filter on your channel's order references. Use when a buyer queries their order status and you need to retrieve the associated shipment on demand. |
page |
integer | Optional | Pagination |
The page to retrieve. Starts at 1. Use with TotalCount in the response to retrieve all pages. See Pagination. |
Shipment response
A successful call returns HTTP 200 with a JSON body. Shipments are wrapped in a standard ChannelEngine response envelope.
GET /v2/shipments?fromDate=2024-03-15T09:00:00&toDate=2024-03-15T09:30:00&apikey=YOUR_KEY
{
"Content": [ /* array of shipment objects */ ],
"Count": 2,
"TotalCount": 47,
"ItemsPerPage": 100,
"StatusCode": 200,
"Success": true
}The Content array consists of one or more shipment objects, each containing shipment fields, shipment line fields, top-level line fields, and order line fields. Use TotalCount and ItemsPerPage to calculate how many pages to request. See Pagination.
Shipment response envelope
The top-level response fields appear alongside the Content array.
| Field | Description |
Content |
Array of shipment objects returned for this page. See Shipment fields. |
Count |
Number of shipments returned on this page. |
TotalCount |
Total matching shipments across all pages. Use with ItemsPerPage to calculate how many pages to fetch. See Pagination. |
ItemsPerPage |
Maximum items per page (100). |
StatusCode |
HTTP status code of the response. |
RequestId |
Unique identifier for this request. Include this when contacting ChannelEngine support about a specific call. |
LogId |
Internal log reference for this request. |
Success |
true when the request was processed successfully. |
Message |
Human-readable message, typically populated when Success is false. |
ExceptionType |
Type of exception thrown, if any. Populated on errors. |
ValidationErrors |
Map of field names to error messages when the request fails validation. Empty on success. |
Shipment fields
Each object in Content represents one shipment:
{
"ChannelOrderNo": "MKTPL-001234",
"MerchantShipmentNo": "SHIP-00123",
"CreatedAt": "2024-03-15T09:42:00Z",
"UpdatedAt": "2024-03-15T10:05:00Z",
"ShipmentDate": "2024-03-15T09:00:00Z",
"Method": "PostNL",
"TrackTraceNo": "3SYZXP293847123",
"TrackTraceUrl": "https://tracking.postnl.nl/track?barcode=3SYZXP293847123",
"ReturnTrackTraceNo": null,
"ReturnMethod": null,
"ShippedFromCountryCode": "NL",
"ShippedFromStockLocationId": 42,
"IsMerchantCreator": true,
"AirWaybillNo": null,
"ExtraData": {},
"Lines": [ /* see Shipment line fields */ ]
}Fields per shipment
| Field | Description |
ChannelOrderNo |
Your channel's order reference. Use this to match the shipment back to the corresponding order in your system. |
MerchantShipmentNo |
The merchant's own shipment reference. Use this to fetch a single shipment via GET /v2/shipments/{merchantReference}. |
CreatedAt |
When the shipment was created in ChannelEngine. Use this as your fromDate cursor when polling for new shipments. |
UpdatedAt |
When the shipment was last updated. Use this as your updatedFromDate cursor when polling for changes to existing shipments. |
ShipmentDate |
The date and time the merchant physically shipped the order. |
Method |
The carrier name, e.g. PostNL, DHL, UPS. |
TrackTraceNo |
Carrier tracking number for the outbound shipment. |
TrackTraceUrl |
Direct link to the carrier's tracking page. Surface this to buyers so they can follow their delivery. |
ReturnTrackTraceNo |
Tracking number for a return shipment, if applicable. |
ReturnMethod |
Carrier name for the return shipment, if applicable. |
ShippedFromCountryCode |
ISO 3166-1 alpha-2 country code of the country the shipment was sent from, e.g. NL, DE. |
ShippedFromStockLocationId |
Internal ID of the stock location the shipment was dispatched from. |
IsMerchantCreator |
true if the shipment was created by the merchant, as opposed to being created automatically by ChannelEngine. |
AirWaybillNo |
Air waybill number for air freight shipments. null for standard carrier shipments. |
ExtraData |
Free-form key-value map for any additional data passed through by the merchant. |
Lines |
The order lines included in this shipment. A shipment may cover only part of an order if the merchant ships in batches. See Shipment line fields. |
Shipment line fields
Each entry in the Lines array represents a shipped product. It includes both the product references and a nested OrderLine object with the full detail of the original order line:
{
"ChannelProductNo": "CHAN-SKU-001",
"MerchantProductNo": "MERCH-SKU-001",
"Quantity": 2,
"ShipmentStatus": "SHIPPED",
"ExtraData": {},
"OrderLine": {
"Status": "IN_PROGRESS",
"IsFulfillmentByMarketplace": false,
"Quantity": 2,
"UnitPriceInclVat": 24.99,
"UnitVat": 4.34,
"LineTotalInclVat": 49.98,
"LineVat": 8.68,
"LatestShipmentDate": "2024-03-16T23:59:00Z",
"ShippingMethod": "PostNL",
"ShippingServiceLevel": "STANDARD"
}
}Top-level line fields
| Field | Description |
ChannelProductNo |
Your channel's product reference for the shipped item. |
MerchantProductNo |
The merchant's SKU for the shipped item. |
Quantity |
Number of units of this product included in the shipment. |
ShipmentStatus |
Status of this line within the shipment. Always SHIPPED for finalized shipments returned by this endpoint. |
ExtraData |
Free-form key-value map for any additional line-level data passed through by the merchant. |
OrderLine |
The full detail of the original order line this shipment line relates to. See Order line fields. |
Order line fields
| Field | Description |
Status |
Current status of the order line, e.g. IN_PROGRESS. |
IsFulfillmentByMarketplace |
true if this line is fulfilled by the marketplace rather than the merchant. |
Gtin |
Global Trade Item Number (barcode) of the product. |
Description |
Product description as submitted when the order was created. |
Quantity |
Total quantity ordered for this line. |
CancellationRequestedQuantity |
Quantity for which a cancelation has been requested. |
UnitPriceInclVat |
Unit price paid by the buyer, including VAT. |
UnitVat |
VAT amount per unit. |
LineTotalInclVat |
Total line value including VAT (unit price × quantity). |
LineVat |
Total VAT amount for the line. |
OriginalUnitPriceInclVat |
Original unit price before any discounts were applied. |
OriginalLineTotalInclVat |
Original line total before any discounts were applied. |
FeeFixed |
Fixed fee charged by the channel for this line. |
FeeRate |
Percentage-based fee charged by the channel for this line. |
Condition |
Condition of the product: NEW, USED, REFURBISHED, etc. |
LatestShipmentDate |
The deadline by which the merchant must ship this line. |
LatestDeliveryDate |
The deadline by which the order must be delivered to the buyer. |
ExactDeliveryDate |
Exact delivery date promised to the buyer, if applicable. |
ExpectedDeliveryDate |
Expected delivery date based on the shipping method selected. |
ExactShipmentDate |
Exact shipment date, if confirmed by the merchant. |
ExpectedShipmentDate |
Expected date the merchant will ship this line. |
ShippingMethod |
Carrier or shipping method requested for this line. |
ShippingServiceLevel |
Service level requested, e.g. STANDARD, EXPRESS. |
BundleProductMerchantProductNo |
Merchant product number of the parent bundle, if this line is part of a product bundle. |
ChannelProductNo |
Channel product reference, echoed from the original order line. |
MerchantProductNo |
Merchant product reference, echoed from the original order line. |
Pagination
The endpoint returns a maximum of 100 shipments per page. If there are more results, request additional pages using the page parameter.
- Make your first request without a
pageparameter. It defaults to page 1. Check theTotalCountin the response. - Divide
TotalCountbyItemsPerPage(100) and round up to calculate the total number of pages. For example: 250 total shipments ÷ 100 = 3 pages. - Request each subsequent page by incrementing the
pageparameter until all pages are retrieved.
# Page 1 — also tells you TotalCount GET /v2/shipments?fromDate=2024-01-01T00:00:00&page=1&apikey=YOUR_KEY # Page 2 GET /v2/shipments?fromDate=2024-01-01T00:00:00&page=2&apikey=YOUR_KEY
Polling strategy and examples
Poll GET /v2/shipments every 30 minutes, using fromDate and toDate to define a precise 30-minute window per call. This keeps each request lightweight and ensures no shipments are missed between runs.
- Set
fromDateto the start of your 30-minute window. On your very first run, use the timestamp from which you want to start importing. On every subsequent run, use thetoDatefrom the previous call. - Set
toDateto exactly 30 minutes later. BecausetoDateis exclusive, shipments created at exactly thetoDatetimestamp will be included in the next window — so there are no gaps. - Retrieve all pages within the window before moving on. Check
TotalCountin the response. If it exceedsItemsPerPage, request additional pages using thepageparameter before advancing your window. - Advance the window and repeat. Use the previous
toDateas the newfromDate, set a newtoDate30 minutes ahead, and run the call again.
# Window 1: 09:00 → 09:30 GET /v2/shipments?fromDate=2024-03-15T09:00:00&toDate=2024-03-15T09:30:00&page=1&apikey=YOUR_KEY # Window 2: 09:30 → 10:00 GET /v2/shipments?fromDate=2024-03-15T09:30:00&toDate=2024-03-15T10:00:00&page=1&apikey=YOUR_KEY
429 Too Many Requests, check the X-Rate-Limit-Remaining and X-Rate-Limit-Reset response headers and pause until the reset time.
Common issues
| HTTP status | Likely cause | How to fix |
| 401 Unauthorized | API key is missing, incorrect, or belongs to the Merchant API instead of the Channel API. | Check the apikey query parameter. Ensure you are using a Channel API key. |
200 with empty Content |
No shipments match the applied filters, or none have been created yet. | Widen the fromDate range or remove status filters. Confirm shipments exist in the ChannelEngine web interface. |
200, TrackTraceNo empty |
The shipment has status PENDING — tracking information has not yet been provided by the merchant. |
Add statuses=SHIPPED to your request to exclude pending shipments. |
| 429 Too Many Requests | Rate limit reached. | Read the X-Rate-Limit-Reset header and back off until that time before retrying. |
| 500 Server Error | Unexpected error on ChannelEngine's side. | Wait and retry. If the issue persists, contact ChannelEngine support with the full request URL and response body. |
Next steps
After shipment retrieval is working, connect these:
GET /v2/cancellations- fetch merchant-initiated cancelations and update order statuses on your channel accordingly.POST /v2/returns/channel- submit buyer-initiated returns when a buyer contacts your marketplace directly.GET /v2/orders/new- understand how the merchant picks up orders, giving context on the full order-to-shipment lifecycle.- ChannelEngine: pagination in the APIs - deeper guidance on handling large result sets efficiently across all Channel API endpoints.
Comments
0 comments
Article is closed for comments.