Shipment
Methods
Entity Properties
- Shipment
- Shipment Item
- Package
- Shipment Track (deprecated)
Shipments are not created in the system until an order goes into picking. There may be multiple shipments for one order depending on the overall weight and number of items on the order. Although there may be more than one package for a single shipment, most shipments will have only one package. A packing slip will be printed for each shipment and if multiple packages are required for one shipment they will be linked to the same master tracking number if supported by the carrier.
shipment.search
(null|object $filters, array $options = [], null|string|object $fields = [])
Retrieve list of shipments by filters. Shipment data can be customized by specifying properties to retrieve.
Parameters
order | description |
---|---|
0 |
|
1 |
|
2 |
See "Shipment Properties". Example:
|
Return Value
An array of objects. Each object will contain the specified (or default if no fields parameter was given) “Shipment Properties”.
Error Codes
code | message |
---|---|
101 | Invalid filters given. Details in error message. |
shipment.info
(string $shipment)
Retrieve all shipment information.
Parameters
order | description |
---|---|
0 | string - Shipment ID. Can be retrieved from the order "shipments" property. |
Return Value
Shipment information.
Example Request
{
"jsonrpc": 2.0,
"id": 1234,
"method": "call",
"params": [
"97ca4f4a5cdca59e9dd0fe52e28bf7cf",
"shipment.info",
"100000020"
]
}
Example Response
{
"jsonrpc": 2.0,
"id": 1234,
"error": null,
"result":
{
"shipment_id": "100000020",
"warehouse_id": 1,
"order_unique_id": "10000015",
"order_ref": "ABC-54321",
"store_code": "acme",
"status": "packing",
"total_weight": "13.2300",
"total_weight_unit": "lb",
"total_item_weight": "12.1100",
"total_item_weight_unit": "lb",
"total_qty": "2.0000",
"shipped_weight": "13.2300",
"shipped_weight_unit": "lb",
"source": "123",
"tpb_group_id": 1,
"created_at": "2014-07-24T18:51:18+00:00",
"updated_at": "2014-07-24T18:51:18+00:00",
"items": [
{
"sku": "product2",
"name": "product2",
"weight": "12.0500",
"weight_unit": "lb",
"qty": "1.0000",
"qty_picked": "1.0000",
"qty_shipped": "0.0000",
"order_item_id": 121,
"package_data": [
{"order_item_id": 121, "label": "Serial Number - 8 Characters", "value": "55285368"}
],
"lot_data": [
{"lot_number": "83CBC2", "expiration_date": "2021-10-05", "origination_date": "2019-01-23", "qty": "1.0000"}
]
},
{
"sku": "product1",
"name": "product1",
"weight": "1.2300",
"weight_unit": "lb",
"qty": "1.0000",
"qty_picked": "1.0000",
"qty_shipped": "1.0000",
"order_item_id": 122,
"package_data": [
{"order_item_id": 122, "label": "Serial Number - 8 Characters", "value": "55285442"}
],
"lot_data": [
{"lot_number": "83CCC2", "expiration_date": "2021-10-25", "origination_date": "2019-01-23", "qty": "1.0000"}
],
"ssccs": [
{"sscc": "508101336500131005", "package_index": 0}
]
}
],
"packages": [
{
"warehouse_id": "1",
"shipment_id": "1100000061",
"shipment_status": "packed",
"status": "packed",
"carrier": "fedex",
"manifest_courier_code": "fedex",
"manifest_courier_name": "FedEx",
"timestamp": "2014-07-24T18:51:18+00:00",
"weight": "13.2300",
"weight_unit": "lb",
"billable_weight": "14",
"billable_weight_unit": "lb",
"dimensional_weight_divisor": "139",
"dimensional_weight_divisor_unit": "in^3/lb",
"dimensional_weight": "14",
"dimensional_weight_unit": "lb",
"dimensions": {
"length": "16.000",
"width": "12.000",
"height": "8.000"
},
"dimension_unit": "in",
"tracking": [
{
"number": "800027315160887",
"description": "FedEx International Economy",
"track_url": "https://www.fedex.com/apps/fedextrack/?action=track&tracknumbers=800027315160887"
}
],
"order_items": [
{
"order_item_id": "122",
"order_item_ref": null,
"sku": "product1",
"quantity": "1.0000"
}
],
"package_items": [
{
"order_item_id": "122",
"sku": "product1",
"quantity": "1.0000"
}
],
"package_data": [
{"order_item_id": 121, "label": "Serial Number - 8 Characters", "value": "55285368"},
{"order_item_id": 122, "label": "Serial Number - 8 Characters", "value": "55285442"}
]
}
],
"tracking_numbers": [
{
"carrier": "fedex",
"description": "FedEx International Economy",
"number": "800027315160887",
"date": "2014-07-24T18:51:18+00:00",
"items": [
{"sku": "product1", "quantity": "1.0000" },
{"sku": "product2", "quantity": "1.0000" }
],
"weight": "13.2300",
"weight_unit": "lb"
}
]
}
}
Error Codes
code | message |
---|---|
100 | Requested shipment does not exist. |
shipment.update
(string $shipment, object $shipmentData)
Update shipment information.
Parameters
order | description |
---|---|
0 | string - Shipment ID. Can be retrieved from the order "shipments" property. |
1 | object - Shipment data. Allowed properties: source. |
Return Value
true if shipment was successfully updated.
Example Request
{
"jsonrpc": 2.0,
"id": 1234,
"method": "call",
"params": [
"97ca4f4a5cdca59e9dd0fe52e28bf7cf",
"shipment.update",
[
"100000020",
{
"source": "123456"
}
]
]
}
Example Response
{
"jsonrpc" : 2.0,
"id" : 1234,
"result" : true
}
Error Codes
code | message |
---|---|
100 | Requested shipment does not exist. |
102 | Invalid data given. Details in error message. |
Entity Properties
Shipment Properties
shipment_id |
The "Shipment ID" property. This number may appear on the packing slip as the "Packing Slip #".
|
---|---|
warehouse_id |
The internal warehouse ID.
|
order_unique_id |
The "unique_id" property for the order associated with this shipment.
|
order_ref |
The user-specified order "order_ref" field.
|
store_code |
The store code used to place the order.
|
status |
The "Status" property. Allowed values: new, picking, picked, packing, packed, shipped, canceled, voided.
|
source |
The "Source" property.
|
total_weight |
The estimated total weight of the shipment including packaging.
|
total_weight_unit |
The unit of measure used for total_weight . See: Weight Units.
|
total_item_weight |
The "Total Item Weight" property.
|
total_item_weight_unit |
The unit of measure used for total_item_weight . See: Weight Units.
|
total_qty |
The "Total Quantity" property.
|
shipped_weight |
The "Shipped Weight" property.
|
shipped_weight_unit |
The unit of measure used for shipped_weight . See: Weight Units.
|
source |
This field is used for storing association data for integrations.
|
tpb_group_id |
The Third Party Billing Account Group ID.
|
target_ship_date |
The date the shipment is intended to be shipped. This is computed based on when the order was "Ready to Ship"
and the configured cutoff times for same day shipping.
|
scac |
The Standard Carrier Alpha Code.
|
created_at |
Date and time when the shipment was created in ISO 8601 format.
|
updated_at |
Date and time when the shipment was last updated in ISO 8601 format.
|
packed_at |
Date and time when all packages were packed in ISO 8601 format.
|
shipped_at |
Date and time when all packages were shipped from the warehouse in ISO 8601 format.
|
delivered_at |
Date and time when all packages were delivered in ISO 8601 format.
|
shipping_address | Object of Shipping Address properties. |
items | Array of Shipment Item objects. |
packages | Array of Package objects. |
tracking_numbers | Array of Shipment Track objects. This field is deprecated. Please use 'packages' instead. |
Shipment Item Properties
sku |
The "SKU" property.
|
---|---|
name |
The "Name" property.
|
weight |
The "Weight" property.
|
weight_unit |
The unit of measure used for weight . See: Weight Units.
|
qty |
The "Quantity" property.
|
qty_picked |
The "Picked" quantity.
|
qty_shipped |
The "Shipped" quantity.
|
qty_cancel_requested |
The "Cancel Requested" quantity. Denotes the quantity to be cancelled if cancellation request is confirmed.
|
qty_canceled |
The "Canceled" quantity.
|
order_item_id |
The internal order item ID.
|
package_data |
The "Package Data" property.
|
lot_data |
The "Lot Data" property.
|
ssccs |
The item SSCCs.
|
Package Properties
warehouse_id |
The ID of the warehouse associated with the package.
|
---|---|
status |
The "Status" property. Allowed values: packing, tracking_required, packed, manifested, shipped, delivered.
|
shipment_id |
The "Shipment ID" property. This number may appear on the packing slip as the "Packing Slip #" and is used for
the Shipment API calls.
|
shipment_status |
The "Shipment Status" property. Allowed values: new, picking, picked, packing, packed, shipped, canceled, voided.
|
carrier |
Carrier code.
|
manifest_courier_code |
Manifest courier code.
|
manifest_courier_name |
Manifest courier name.
|
timestamp |
The date and time when the package was created in ISO 8601 format.
|
shipped_at |
Date and time when the package was shipped from the warehouse in ISO 8601 format.
|
delivered_at |
Date and time when the package was delivered in ISO 8601 format.
|
weight |
The weight of the package.
|
weight_unit |
The unit of measure used for weight . See: Weight Units.
|
billable_weight |
The billable weight of the package.
|
billable_weight_unit |
The unit of measure used for billable_weight . See: Weight Units.
|
dimensional_weight_divisor |
The dimensional weight divisor of the package.
|
dimensional_weight_divisor_unit |
The unit of measure used for dimensional_weight_divisor . See: Dimensional Divisor Units.
|
dimensional_weight |
The dimensional weight of the package.
|
dimensional_weight_unit |
The unit of measure used for dimensional_weight . See: Weight Units.
|
dimensions |
The length , width , and height of the package.
|
dimension_unit |
The unit of measure used for length , width , and height in dimensions .
See: Length Units.
|
sscc |
The Serial Shipping Container Code.
|
tracking |
An array of tracking objects.The "number" property contains the tracking number. The "description" property contains the shipping method name. The "track_url" property will contain a URL to the carrier's tracking page if applicable. |
order_items |
An array of order items contained in the package. These items may be different from those in "package_items" if
the order was fulfilled using a Bill of Materials."order_item_id" is the unqiue identifier for the order item. "order_item_ref" is an optional user supplied reference for the order item. "sku" is the order item's SKU. "quantity" is the quantity of the order item in the package. |
package_items |
An array of items contained in the package. These items may be different from those in "order_items" if the
order was fulfilled using a Bill of Materials."order_item_id" is the unqiue identifier of the related order item. "sku" is the package item's SKU. "quantity" is the quantity of the item in the package. |
package_data |
The "Package Data" property.
|
packaging |
The "Packaging" property.
|
Shipment Track Properties
carrier |
The carrier code.
|
---|---|
description |
The method description (with the carrier name).
|
number |
The carrier's tracking number.
|
date |
The date and time the tracking number was created.
|
items |
SKUs and quantities of the related package items.
|
weight |
The weight of the package.
|
weight_unit |
The unit of measure used for weight . See: Weight Units.
|