Create consolidation responses
Possible responses when creating a consolidation:
| Status | Meaning | Description |
|---|---|---|
| 201 | Created | Returns the consolidated order response |
| 400 | Bad Request | Returned when there is a problem with the input parameters |
| 403 | Forbidden | Returned when the API key is invalid or missing the required permission |
| 404 | Not Found | Returned when the system can’t find one or more orders |
| 422 | Unprocessable Entity | Returned when the consolidation request fails validation |
| 500 | Internal Server Error | Returned when an unknown error occurs |
To perform this operation, you must authenticate using an authentication token.
Examples
Successful create consolidation response
{
"order": {
"slug": "ppparent12345",
"state": "processing",
"courier_type": "standard",
"delivery_address": "1 Union Street",
"delivery_postcode": "2009",
"delivery_state": "NSW",
"delivery_suburb": "Pyrmont",
"authority_to_leave": "Yes",
"parcel_attributes": [
{
"qty": 1,
"weight": 2.1
}
],
"user_attributes": {
"email": "test@shippit.com",
"first_name": "John",
"last_name": "Smith"
},
"consolidation": {
"parent_order": {
"tracking_number": "ppparent12345",
"slug": "ppparent12345",
"retailer_invoice": ""
},
"sub_orders": [
{
"tracking_number": "PPabcd1234EFG",
"slug": "ppabcd1234efg",
"retailer_invoice": ""
},
{
"tracking_number": "PPabcd5678HIJ",
"slug": "ppabcd5678hij",
"retailer_invoice": ""
}
]
}
}
}
Failed order consolidation responses
400 response
The orders array is missing:
{
"error": "bad_request",
"error_description": "orders is required"
}
404 response
Shippit couldn’t find one or more orders:
{
"error": "orders_not_found",
"error_description": "One or more orders could not be found"
}
422 response
There are not enough orders for consolidation:
{
"error": "consolidation_failed",
"error_description": "At least 2 orders are required for consolidation"
}
One or more orders are not eligible for consolidation. This can happen if orders are in the wrong state, or are already consolidated:
{
"error": "consolidation_failed",
"error_description": "One or more orders are not eligible for consolidation"
}
The reference order is missing from orders:
{
"error": "consolidation_failed",
"error_description": "Specified parent order not found in order list"
}
500 response
Unknown error:
{
"error": "system",
"error_description": "An unknown error has occurred."
}