The Shipments API allows you to manage shipments for orders in your store. You can create new shipments, update existing ones, and track shipment status.
Retrieve a list of all shipments. This endpoint supports pagination and filtering to help you find specific shipments.
Parameter | Type | Required | Description |
---|---|---|---|
page |
integer | No | Page number (default: 1) |
items_per_page |
integer | No | Number of items per page (default: 10) |
order_id |
integer | No | Filter shipments by order ID |
status |
string | No | Filter shipments by status |
{ "shipments": [ { "shipment_id": "12", "order_id": "145", "shipping_method": "Standard Shipping", "tracking_number": "1Z999AA10123456784", "status": "S", "timestamp": "1649851200" }, { "shipment_id": "13", "order_id": "146", "shipping_method": "Express Shipping", "tracking_number": "1Z999AA10123456785", "status": "P", "timestamp": "1649937600" } ], "params": { "page": 1, "items_per_page": 10, "total_items": 2 } }
Retrieve details for a specific shipment by its ID.
{ "shipment_id": "12", "order_id": "145", "shipping_method": "Standard Shipping", "tracking_number": "1Z999AA10123456784", "carrier": "UPS", "status": "S", "timestamp": "1649851200", "items": [ { "item_id": "458", "product_id": "123", "product_name": "Premium Widget", "amount": "2" }, { "item_id": "459", "product_id": "124", "product_name": "Widget Accessories", "amount": "1" } ], "comments": "Handle with care" }
Create a new shipment for an order.
Parameter | Type | Required | Description |
---|---|---|---|
order_id |
string | Yes | ID of the order to create a shipment for |
shipping_method |
string | Yes | Shipping method to use |
tracking_number |
string | No | Tracking number for the shipment |
carrier |
string | No | Shipping carrier |
items |
array | Yes | Array of order items to include in this shipment |
comments |
string | No | Comments about the shipment |
{ "order_id": "145", "shipping_method": "Standard Shipping", "tracking_number": "1Z999AA10123456784", "carrier": "UPS", "items": [ { "item_id": "458", "amount": "2" }, { "item_id": "459", "amount": "1" } ], "comments": "Handle with care" }
Update an existing shipment.
{ "tracking_number": "1Z999AA10123456789", "status": "D", "comments": "Delivered to front door" }
Code | Description |
---|---|
P |
Processing |
S |
Shipped |
D |
Delivered |
F |
Failed/Returned |