Endpoints
- POST/group_ordersCreate a group order
- PATCH/group_orders/{group_order_id}/finaliseClose a group order to new orders
The group order object
idstringRequired- The ID of the group order. Pass this as
group_order.idon an order to add that order to the group.
Sample responseJSON
{
"id": "GOFIHRxykEyiP"
}Create a group order
POST/group_orders
Submits a group order to be created on Shippit.
To perform this operation, you must be authenticated with an authentication token.
Parameters
reference_numberstringRequired- Reference number for the group order
Response codes
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Returns an object representing the ID of your successfully created group order. |
| 400 | Bad Request | Returned when Shippit has a problem with the input parameters. Not all input errors result in this error. Depending on the request, the error might be parsed as an unknown error or as part of the response body. If returned as text or html, it's blank. |
| 403 | Forbidden | Returned when the API key doesn't match a valid merchant account, or the API secret is missing the permission this endpoint requires. |
| 500 | Internal Server Error | Returned when an unknown error occurs. This can happen if Shippit has trouble with the combination of the input or merchant account configuration. |
RequestJSON
{
"reference_number": "R12345"
}JSON
{
"errors": {
"reference_number": "field must be provided"
}
}JSON
{
"errors": {
"reference_number": "is not a string value"
}
}JSON
{
"error": "invalid_merchant_account",
"error_description": "An unknown error has occurred."
}JSON
{
"error": "system",
"error_description": "An unknown error has occurred."
}Finalise a group order
PATCH/group_orders/{group_order_id}/finalise
Finalise the group order. When a group order has been finalised, no more orders can be added to the group order.
A successful call returns a 204 with no response payload body.
To perform this operation, you must be authenticated with an authentication token.
Parameters
group_order_idstringpathRequired- The ID of the group order
Response codes
| Status | Meaning | Description |
|---|---|---|
| 204 | No Content | Group order has been successfully finalised. Nothing is returned in the response payload body. |
| 403 | Forbidden | Returned when the API key doesn't match a valid merchant account, or the API secret is missing the permission this endpoint requires. |
| 404 | Not Found | Returns an error indicating that the group order couldn't be found in Shippit |
| 422 | Unprocessable Entity | Returned when the group order holds no orders, so there is nothing to finalise. |
| 500 | Internal Server Error | Returned when an unknown error occurs. Might be returned if Shippit has trouble with the combination of the input or merchant account configuration. |
JSON
{
"error": "invalid_merchant_account",
"error_description": "An unknown error has occurred."
}JSON
{
"error": "not_found",
"error_description": "The requested resource could not be found."
}JSON
{
"error": "system",
"error_description": "An unknown error has occurred."
}