ShippitDeveloper Centre

Consolidations API

You can consolidate multiple orders into a single consignment. This can help you handle, track, and process multiple shipments together.

Endpoints

Create a consolidation

POST/consolidations

Creates a consolidated parent order from a set of existing orders.

To perform this operation, you must authenticate using an authentication token.

The consolidated parent order is returned in full.

Parameters

ordersarray[string]bodyRequired
List of orders to consolidate into a single consignment
reference_orderstringbodyOptional
Order to use as the reference for the parent consolidation. If not provided, the first order in the array becomes the parent.

Response codes

StatusMeaningDescription
201CreatedReturns the consolidated order response
400Bad RequestReturned when there is a problem with the input parameters
403ForbiddenReturned when the API key doesn't match a valid merchant account, or the API secret is missing the permission this endpoint requires.
404Not FoundReturned when the system can't find one or more orders
415Unsupported Media TypeReturned when the request doesn't set a Content-Type of application/json.
422Unprocessable EntityReturned when the consolidation request fails validation. This happens with fewer than two orders, when an order is in the wrong state or is already consolidated, or when the reference order is missing from orders.
500Internal Server ErrorReturned when an unknown error occurs
RequestJSON
{
  "orders": [
    "ppabcd1234efg",
    "ppabcd5678hij"
  ],
  "reference_order": "ppabcd1234efg"
}
JSON
{
  "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": ""
        }
      ]
    }
  }
}

Append to a consolidation

POST/consolidations/{parent_order}

Appends additional child orders to an existing consolidated parent order.

To perform this operation, you must authenticate using an authentication token.

The updated parent order is returned in full.

Parameters

parent_orderstringpathRequired
Existing consolidated order
ordersarray[string]bodyRequired
List of orders to append to the consolidation

Response codes

StatusMeaningDescription
200OKReturns the updated consolidated order response
400Bad RequestReturned if there is a problem with the input parameters
403ForbiddenReturned when the API key doesn't match a valid merchant account, or the API secret is missing the permission this endpoint requires.
404Not FoundReturned when Shippit can't find the order or one or more child orders
415Unsupported Media TypeReturned when the request doesn't set a Content-Type of application/json.
422Unprocessable EntityReturned when the append request fails validation
500Internal Server ErrorReturned when an unknown error occurs
RequestJSON
{
  "orders": [
    "ppabcd9999xyz",
    "ppabcd7777qwe"
  ]
}
JSON
{
  "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": ""
        },
        {
          "tracking_number": "PPabcd9999XYZ",
          "slug": "ppabcd9999xyz",
          "retailer_invoice": ""
        }
      ]
    }
  }
}

Reverse a consolidation

DELETE/consolidations/{parent_order}

Reverses consolidation of all child orders under the parent order.

To perform this operation, you must authenticate using an authentication token.

Reversing a consolidation splits the parent order back into its child orders.

Parameters

parent_orderstringpathRequired
The consolidated order to separate into individual child orders

Response codes

StatusMeaningDescription
200OKReturns a success response once the system splits the parent order back into child orders
403ForbiddenReturned when the API key doesn't match a valid merchant account, or the API secret is missing the permission this endpoint requires.
404Not FoundReturned when the system can't locate the parent order
422Unprocessable EntityReturned when the request fails validation
500Internal Server ErrorReturned when an unknown error occurs
JSON
{
  "response": {
    "message": "Deconsolidation successful"
  }
}