- Inventory
- Get Inventory Locations
Inventory
Get Inventory Locations
Retrieve information about warehouse locations and their UUIDs
curl --request GET \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/{accountSlug}/inventory_locations \
--header 'Authorization: Bearer <token>'Retrieve information about all warehouse and distribution center locations associated with your account. This endpoint returns location details including UUIDs needed for location-specific inventory queries.
Path Parameters
Account slug identifying your MasonHub account.
curl -X GET "https://app.masonhub.co/your-account/api/v1/inventory_locations" \
-H "Authorization: Bearer your_jwt_token"
{
"data": [
{
"id": "bf7bb516-ce52-8950-2a8b-9008f0091d93",
"name": "Rancho Cucamonga",
"city": "Rancho Cucamonga",
"locale_code": "CA",
"address": "8595 Milliken Avenue, B102 Rancho Cucamonga, CA 91730"
},
{
"id": "af8cc627-de63-9061-3b9c-0119e0092e04",
"name": "Atlanta",
"city": "Atlanta",
"locale_code": "GA",
"address": "1234 Logistics Parkway, Atlanta, GA 30301"
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | UUID | Unique identifier for the inventory location |
name | string | Human-readable location name |
city | string | City where the location is situated |
locale_code | string | State/province code (e.g., “CA”, “GA”) |
address | string | Full street address of the location |
Using Location IDs
Location UUIDs returned by this endpoint are used in:
Inventory Queries
Filter inventory by specific locations in status_counts responses.
Order Routing
Understand which distribution centers are available for order fulfillment.
Inbound Shipments
Specify destination locations for inbound shipments.
Reporting
Break down inventory and fulfillment metrics by location.
Multi-Location Inventory
When querying inventory via GET /inventory, the status_counts array includes location-specific breakdowns:
{
"status_counts": [
{
"inventory_location_id": "bf7bb516-ce52-8950-2a8b-9008f0091d93",
"inventory_location_address": "MasonHub - Rancho Cucamonga | 8595 Milliken Avenue, B102",
"inventory_status": "available",
"quantity": 100
},
{
"inventory_location_id": "af8cc627-de63-9061-3b9c-0119e0092e04",
"inventory_location_address": "MasonHub - Atlanta | 1234 Logistics Parkway",
"inventory_status": "available",
"quantity": 75
}
]
}
Use the location IDs from this endpoint to correlate inventory data with specific warehouses.
Best Practices
Cache location data locally since warehouse locations change infrequently. Refresh periodically (e.g., daily) to catch any new locations added to your account.
curl -X GET "https://app.masonhub.co/your-account/api/v1/inventory_locations" \
-H "Authorization: Bearer your_jwt_token"
curl --request GET \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/{accountSlug}/inventory_locations \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "bf7bb516-ce52-8950-2a8b-9008f0091d93",
"name": "Rancho Cucamonga",
"city": "Rancho Cucamonga",
"locale_code": "CA",
"address": "8595 Milliken Avenue, B102 Rancho Cucamonga, CA 91730"
},
{
"id": "af8cc627-de63-9061-3b9c-0119e0092e04",
"name": "Atlanta",
"city": "Atlanta",
"locale_code": "GA",
"address": "1234 Logistics Parkway, Atlanta, GA 30301"
}
]
}