- Inventory
- Get SKU Inventory Snapshot
Inventory
Get SKU Inventory Snapshot
Retrieve current inventory counts for specified SKUs across all distribution centers
curl --request GET \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/sku-snapshots \
--header 'Authorization: Bearer <token>'The Inventory API provides real-time inventory tracking and snapshot capabilities across all distribution centers. It supports various inventory statuses, detailed location breakdowns, and automatic inventory change notifications.
Use callbacks for real-time inventory updates rather than frequent polling to optimize performance and stay current with inventory changes.
Retrieve real-time inventory levels for specified SKUs across all locations and statuses. This endpoint provides current inventory counts with detailed breakdowns by location and status.
Query Parameters
Customer SKU identifiers. Supports batching 1-30 identifiers per request.
Number of results to return. Range: 1-100.
Pagination offset for retrieving subsequent pages of results.
Include detailed inventory breakdown by location and status.
curl -X GET "https://app.masonhub.co/{account}/api/v1/sku_snapshots?cid=pants4523,shirts872340&limit=50" \
-H "Authorization: Bearer your_jwt_token"
{
"include_ledger": true,
"limit": 30,
"offset": 0,
"data": [
{
"sku_id": "e5d00ff6-b34a-496e-9559-eb90e99463af",
"customer_identifier": "10000",
"total_units": 200,
"total_available_to_sell": 100,
"as_of": "2018-11-18T00:43:23.095637Z",
"status_counts": [
{
"inventory_location_id": "bf7bb516-ce52-8950-2a8b-9008f0091d93",
"inventory_location_address": "MasonHub - Rancho Cucamonga | 8595 Milliken Avenue, B102 Rancho Cucamonga, CA 91730",
"inventory_status": "available",
"quantity": 100,
"as_of": "2018-11-18T00:43:22.664965Z"
},
{
"inventory_location_id": "bf7bb516-ce52-8950-2a8b-9008f0091d93",
"inventory_location_address": "MasonHub - Rancho Cucamonga | 8595 Milliken Avenue, B102 Rancho Cucamonga, CA 91730",
"inventory_status": "expected",
"quantity": 50,
"as_of": "2018-11-18T00:43:22.664965Z"
}
]
}
]
}
Inventory Status Types
The response includes inventory broken down by status:
Sellable Inventory
- available: Ready for sale and allocation
- expected: Incoming from inbound shipments
- received: Recently received, being processed
Quality Control
- quality-control: Under inspection
- refurbishing: Being repaired/refurbished
- under-investigation: Status being determined
Processing States
- in-receiving: Currently being processed
- allocated: Reserved for orders
- picked: Retrieved for shipment
Unavailable
- damaged: Requires disposition
- lost: Cannot be located
- expired: Past expiration date
Inventory Calculations
Total Units
Sum of all inventory across all statuses and locations for a SKU.
Total Available to Sell
Inventory that can be allocated to new orders:
Available to Sell = Available + Expected + Received
Kit Inventory
For kit SKUs, inventory calculations automatically consider:
- Pre-built kit quantities
- Component availability for kit-to-ship
- Mixed inventory scenarios
Batch Queries
Query multiple SKUs in a single request:
GET /sku_snapshots?cid=sku001,sku002,sku003&limit=50
Maximum 30 customer identifiers per request. Exceeding this limit will result in a 400 error.
Best Practices
Use Callbacks
Subscribe to skuInventoryChange callbacks for real-time updates instead of polling.
Batch Queries
Query multiple SKUs in single requests when possible for efficiency.
Understand Statuses
Know which statuses contribute to available-to-sell quantities for your business rules.
Include Ledger
Use include_ledger=true to get location-specific breakdowns when needed.
curl -X GET "https://app.masonhub.co/{account}/api/v1/sku_snapshots?cid=pants4523,shirts872340&limit=50" \
-H "Authorization: Bearer your_jwt_token"
curl --request GET \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/sku-snapshots \
--header 'Authorization: Bearer <token>'{
"include_ledger": true,
"limit": 30,
"offset": 0,
"data": [
{
"sku_id": "e5d00ff6-b34a-496e-9559-eb90e99463af",
"customer_identifier": "10000",
"total_units": 200,
"total_available_to_sell": 100,
"as_of": "2018-11-18T00:43:23.095637Z",
"status_counts": [
{
"inventory_location_id": "bf7bb516-ce52-8950-2a8b-9008f0091d93",
"inventory_location_address": "MasonHub - Rancho Cucamonga | 8595 Milliken Avenue, B102 Rancho Cucamonga, CA 91730",
"inventory_status": "available",
"quantity": 100,
"as_of": "2018-11-18T00:43:22.664965Z"
},
{
"inventory_location_id": "bf7bb516-ce52-8950-2a8b-9008f0091d93",
"inventory_location_address": "MasonHub - Rancho Cucamonga | 8595 Milliken Avenue, B102 Rancho Cucamonga, CA 91730",
"inventory_status": "expected",
"quantity": 50,
"as_of": "2018-11-18T00:43:22.664965Z"
}
]
}
]
}