There is a new endpoint deployed in order to query for order shipments, located at https://sandbox.masonhub.co/account_name/api/v1/shipments You will still see all shipment information if you perform a GET on the /orders endpoint, but the shipments endpoint provides a way to query directly for shipments.
See the full API spec here: https://docs.masonhub.co/api/v1#tag/Shipments/paths/~1shipments/get
Querying for order shipments is as straightforward as our other GET endpoints. Once you have some orders in fulfilled status, hitting the endpoint with no query parameters will simply give you a list of the most recent shipments:
GET to https://sandbox.masonhub.co/account_name/api/v1/shipments responds with:
{
"search_criteria": {
"sdt": null,
"edt": null
},
"limit": 30,
"offset": 0,
"list_type": "detail",
"include_counts": false,
"data": [
{
"id": "db79huy5-ec61-7892-ae7b-57a563b68133",
"shipment_id": "f0h7uuk",
"customer_order_id": "12345",
"shipping_provider": "UPS",
"shipper_service_level": "ground",
"tracking_number": "1z324897234nferg45",
"tracking_url": "http://ups.com/tracking/1z324897234nferg45",
"shipment_date_time": "2018-08-06T15:11:19Z",
"shipment_line_items": [
{
"sku_customer_id": "shirts872340",
"quantity": 2
},
{
"sku_customer_id": "pants3422",
"quantity": 1
}
]
},
{
"id": "db79huy5-ec61-7892-ae7b-57a563b68133",
"shipment_id": "u3d88z4",
"customer_order_id": "98765",
"shipping_provider": "USPS",
"shipper_service_level": "priority",
"tracking_number": "3451csda23423",
"tracking_url": "http://usps.gov/tracking/3451csda23423",
"shipment_date_time": "2018-08-06T17:32:28Z",
"shipment_line_items": [
{
"sku_customer_id": "shirts872340",
"quantity": 3
}
]
}
]
}
Say you want to query only for shipments against a particular order. You just need to add a query parameter, ‘coid’, followed by a list of your customer order ids to filter for:
GET to https://sandbox.masonhub.co/account_name/api/v1/shipments?coid=12345 responds with:
{
"search_criteria": {
"sdt": null,
"edt": null
},
"limit": 30,
"offset": 0,
"list_type": "detail",
"include_counts": false,
"data": [
{
"id": "db79huy5-ec61-7892-ae7b-57a563b68133",
"shipment_id": "f0h7uuk",
"customer_order_id": "12345",
"shipping_provider": "UPS",
"shipper_service_level": "ground",
"tracking_number": "1z324897234nferg45",
"tracking_url": "http://ups.com/tracking/1z324897234nferg45",
"shipment_date_time": "2018-08-06T15:11:19Z",
"shipment_line_items": [
{
"sku_customer_id": "shirts872340",
"quantity": 2
},
{
"sku_customer_id": "pants3422",
"quantity": 1
}
]
}
]
}
As always, don’t be afraid to reach out to Chris or Andy with any questions.