Order Tracking Create
{{api_url}}/shop/order/{{orderid}}/shipmentCreates a shipment on an existing order. It records the tracking number, the carrier, and the order lines in the package. InfiPlex forwards the tracking to the order's marketplace automatically, so the shipment becomes visible to the customer. Check the tracking number and carrier before sending.
Each request is one package with one tracking number. Every request must list the order lines in that package in package_items, including when a single package holds the whole order. For an order shipping in several boxes, send one request per box, each listing the lines in that box.
Package items reference order lines by itemid, which is the line's shop_order_itemid from order_items in Order Get, not the SKU. Order Get returns an order's shipments under tracking_numbers, each with its package_items.
Path parameters
| Parameter | Type | Description |
|---|---|---|
orderid | integer | The InfiPlex order ID (shop_orderid), not the marketplace order number. |
Body parameters
| Parameter | Type | Description |
|---|---|---|
tracking_number | string | The carrier tracking number. Required. |
carrier_name | string | The carrier name as it should be recorded and sent, for example UPS, FedEx, or USPS. Any value is accepted. Required. |
carrier_method | string | The service level, for example Ground or 3rd Day. |
package_items | array | The order lines in this package and how many units of each. Required, even when the package holds the whole order. See Package item fields. |
save_items_as_qty_one | boolean | When true, each unit is saved as its own package item with a quantity of 1, instead of one package item per line. Used with lot and serial tracked items, as in the Advanced example. |
weight_oz | number | Package weight in ounces. |
length_inches | number | Package length in inches. |
width_inches | number | Package width in inches. |
height_inches | number | Package height in inches. |
set_ship_from_info | boolean | Set to true to record the ship_from_\* fields below on the shipment. |
ship_from_name | string | Ship-from contact or company name. |
ship_from_street1 | string | Ship-from street address, line 1. |
ship_from_street2 | string | Ship-from street address, line 2. |
ship_from_city | string | Ship-from city. |
ship_from_state | string | Ship-from state, for example IL. |
ship_from_zip | string | Ship-from ZIP or postal code. |
ship_from_country | string | Ship-from country code, for example US. |
ship_from_warehouse_id | string | The ID of the InfiPlex warehouse the package shipped from. Use Warehouse Search to find it. |
Package item fields
| Field | Type | Description |
|---|---|---|
itemid | string | The order line's shop_order_itemid from Order Get. Required. |
quantity | integer | Units of that line in this package. Required. |
lot_number | string | Lot number, for lot tracked items. |
serial_number | string | Serial number, for serial tracked items. |
{
"tracking_number": "33332222",
"carrier_name": "UPS",
"carrier_method": "3rd Day",
"package_items": [
{ "itemid": "1077", "quantity": 2 },
{ "itemid": "1078", "quantity": 3 }
]
}
See the Advanced example for lot and serial numbers, package weight and dimensions, and ship-from info.
Response fields
| Field | Description |
|---|---|
shipment_id | The ID of the new shipment, returned as a string. |
Authorization
Bearer token, sent in the Authorization header. Inherited from the collection.
Headers
| Key | Value | Description |
|---|---|---|
Content-Type | application/json |
Body
{
"tracking_number": "33332222",
"carrier_name": "UPS",
"carrier_method": "3rd Day",
"package_items": [
{
"quantity": 2,
"itemid": "1077"
},
{
"quantity": 3,
"itemid": "1078"
}
],
"weight_oz": 10,
"length_inches": 5,
"width_inches": 6,
"height_inches": 7,
"set_ship_from_info": true,
"ship_from_name": "Some Contact",
"ship_from_street1": "1234 Main St",
"ship_from_street2": "",
"ship_from_city": "Example City",
"ship_from_state": "IL",
"ship_from_zip": "12345",
"ship_from_country": "US",
"ship_from_warehouse_id": "7"
}Example Request
curl --location --request POST '{{api_url}}/shop/order/{{orderid}}/shipment' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{auth_token}}' \
--data '{
"tracking_number": "33332222",
"carrier_name": "UPS",
"carrier_method": "3rd Day",
"package_items": [
{
"quantity": 2,
"itemid": "1077"
},
{
"quantity": 3,
"itemid": "1078"
}
],
"weight_oz": 10,
"length_inches": 5,
"width_inches": 6,
"height_inches": 7,
"set_ship_from_info": true,
"ship_from_name": "Some Contact",
"ship_from_street1": "1234 Main St",
"ship_from_street2": "",
"ship_from_city": "Example City",
"ship_from_state": "IL",
"ship_from_zip": "12345",
"ship_from_country": "US",
"ship_from_warehouse_id": "7"
}'Example Responses
Order Tracking Create
Request
curl --location --request POST '{{api_url}}/shop/order/{{orderid}}/shipment' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{auth_token}}' \
--data '{
"tracking_number": "33332222",
"carrier_name": "UPS",
"carrier_method": "3rd Day",
"package_items": [
{
"quantity": 2,
"itemid": "1077"
},
{
"quantity": 3,
"itemid": "1078"
}
]
}'Response 200 OK
{
"shipment_id": "123455"
}Order Tracking Create - Advanced
Request
curl --location --request POST '{{api_url}}/shop/order/{{orderid}}/shipment' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{auth_token}}' \
--data '{
"save_items_as_qty_one": true,
"tracking_number": "33332222",
"carrier_name": "UPS",
"carrier_method": "3rd Day",
"package_items": [
{
"quantity": 2,
"itemid": "20438",
"lot_number": "lot123"
},
{
"quantity": 1,
"itemid": "20439",
"serial_number": "serial111"
}
],
"weight_oz": 10,
"length_inches": 5,
"width_inches": 6,
"height_inches": 7,
"set_ship_from_info": true,
"ship_from_name": "Some Contact",
"ship_from_street1": "1234 Main St",
"ship_from_street2": "",
"ship_from_city": "Example City",
"ship_from_state": "IL",
"ship_from_zip": "12345",
"ship_from_country": "US",
"ship_from_warehouse_id": "7"
}'Response 200 OK
{
"shipment_id": "123455"
}
