- Orders
- Get Orders
Orders
Get Orders
Retrieve orders with flexible filtering and response format options
curl --request GET \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/orders \
--header 'Authorization: Bearer <token>'Retrieve orders from the MasonHub fulfillment system. This endpoint supports both detailed and summary views, with flexible filtering options for efficient data retrieval.
Orders are returned in descending order by creation date. Use pagination parameters for large result sets.
Query Parameters
Configure your request with these query parameters:
Primary Filters
Filter by customer identifier. Returns specific order by your reference ID.
Filter by MasonHub system ID (UUID). Use for precise order retrieval.
Response detail level:
summary- Basic order information (default)detail- Complete order data including all fields
Maximum number of records to return (1-1000).
Number of records to skip for pagination.
Date Filters
Filter orders created after this timestamp (RFC3339 format).
Filter orders created before this timestamp (RFC3339 format).
Filter orders updated after this timestamp (RFC3339 format).
Filter orders updated before this timestamp (RFC3339 format).
Status Filters
Filter by order status. Options:
pending- Awaiting processingprocessing- Being picked/packedfulfilled- Shippeddelivered- Confirmed deliverycanceled- Order canceledon_hold- Temporarily paused
Filter orders by shipment existence:
true- Only orders with shipmentsfalse- Only orders without shipments
# Get specific order by customer ID
curl -X GET "https://app.masonhub.co/{account}/api/v1/orders?cid=129374" \
-H "Authorization: Bearer your_jwt_token"
# Get detailed view of recent orders
curl -X GET "https://app.masonhub.co/{account}/api/v1/orders?list_type=detail&limit=50" \
-H "Authorization: Bearer your_jwt_token"
# Get orders created in date range
curl -X GET "https://app.masonhub.co/{account}/api/v1/orders?created_after=2024-01-01T00:00:00Z&created_before=2024-01-31T23:59:59Z" \
-H "Authorization: Bearer your_jwt_token"
{
"total_count": 234,
"limit": 100,
"offset": 0,
"orders": [
{
"system_id": "550e8400-e29b-41d4-a716-446655440000",
"customer_identifier": "129374",
"status": "fulfilled",
"order_type": "customer",
"priority": 100,
"submitted_at": "2024-01-15T10:00:00Z",
"created_at": "2024-01-15T10:00:15Z",
"updated_at": "2024-01-16T14:30:00Z",
"line_items_count": 2,
"total_quantity": 5,
"has_shipments": true
},
{
"system_id": "660f9500-f39c-52e5-b827-557766551111",
"customer_identifier": "129375",
"status": "processing",
"order_type": "customer",
"priority": 50,
"submitted_at": "2024-01-15T11:00:00Z",
"created_at": "2024-01-15T11:00:10Z",
"updated_at": "2024-01-15T11:00:10Z",
"line_items_count": 1,
"total_quantity": 2,
"has_shipments": false
}
]
}
Response Formats
Summary View
The default summary response includes essential order information:
MasonHub’s unique order identifier (UUID)
Your order reference ID
Current order status
Order classification
Order priority level (1-999)
Original submission timestamp
Number of distinct SKUs
Total units across all line items
Whether order has been shipped
Detail View
The detail response includes all summary fields plus:
Complete line item details with quantities and allocation status
Shipment information including tracking details
Complete shipping address fields
Complete billing address fields
Additional services requested
Warehouse handling instructions
Pagination
Handle large result sets using pagination:
Initial Request
Start with offset=0 and your desired limit (max 1000)
Check Total Count
Response includes total_count field showing total matching orders
Next Page
Increment offset by limit value for next page
Continue
Repeat until offset + limit >= total_count
Example pagination flow:
def get_all_orders(headers):
all_orders = []
offset = 0
limit = 100
while True:
params = {"limit": limit, "offset": offset}
response = requests.get(url, headers=headers, params=params)
data = response.json()
all_orders.extend(data["orders"])
if offset + limit >= data["total_count"]:
break
offset += limit
return all_orders
Order Status Lifecycle
Orders progress through these statuses:
pending
Order received and awaiting processing
processing
Order being picked and packed in warehouse
fulfilled
Order shipped with tracking information available
delivered
Carrier confirmed delivery to recipient
Additional statuses:
canceled- Order canceled before fulfillmenton_hold- Order temporarily paused (inventory, payment, or manual hold)returned- Order returned after delivery
Best Practices
Use Specific Filters
Apply date ranges and status filters to reduce response size and improve performance.
Choose Right Detail Level
Use summary for lists and dashboards, detail only when full data needed.
Implement Pagination
Always paginate when retrieving multiple orders to avoid timeouts.
Cache When Possible
Orders in fulfilled or delivered status rarely change - cache these locally.
For real-time order updates, configure orderEvent callbacks instead of polling this endpoint.
Sources
# Get specific order by customer ID
curl -X GET "https://app.masonhub.co/{account}/api/v1/orders?cid=129374" \
-H "Authorization: Bearer your_jwt_token"
# Get detailed view of recent orders
curl -X GET "https://app.masonhub.co/{account}/api/v1/orders?list_type=detail&limit=50" \
-H "Authorization: Bearer your_jwt_token"
# Get orders created in date range
curl -X GET "https://app.masonhub.co/{account}/api/v1/orders?created_after=2024-01-01T00:00:00Z&created_before=2024-01-31T23:59:59Z" \
-H "Authorization: Bearer your_jwt_token"
curl --request GET \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/orders \
--header 'Authorization: Bearer <token>'{
"total_count": 234,
"limit": 100,
"offset": 0,
"orders": [
{
"system_id": "550e8400-e29b-41d4-a716-446655440000",
"customer_identifier": "129374",
"status": "fulfilled",
"order_type": "customer",
"priority": 100,
"submitted_at": "2024-01-15T10:00:00Z",
"created_at": "2024-01-15T10:00:15Z",
"updated_at": "2024-01-16T14:30:00Z",
"line_items_count": 2,
"total_quantity": 5,
"has_shipments": true
},
{
"system_id": "660f9500-f39c-52e5-b827-557766551111",
"customer_identifier": "129375",
"status": "processing",
"order_type": "customer",
"priority": 50,
"submitted_at": "2024-01-15T11:00:00Z",
"created_at": "2024-01-15T11:00:10Z",
"updated_at": "2024-01-15T11:00:10Z",
"line_items_count": 1,
"total_quantity": 2,
"has_shipments": false
}
]
}