Append consolidation responses

Possible responses when appending to a consolidation:

Status Meaning Description
200 OK Returns the updated consolidated order response
400 Bad Request Returned if 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 Shippit can’t find the order or one or more child orders
422 Unprocessable Entity Returned when the append 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 append 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": ""
        },
        {
          "tracking_number": "PPabcd9999XYZ",
          "slug": "ppabcd9999xyz",
          "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"
}

Consolidated order not found:

{
  "error": "orders_not_found",
  "error_description": "Parent order not found"
}

422 response

Parent order exists but isn’t a consolidated order:

{
  "error": "consolidation_failed",
  "error_description": "Order is not a consolidated parent order"
}

Parent order can’t have orders appended:

{
  "error": "consolidation_failed",
  "error_description": "Parent order is not in an eligible state for appending"
}

One or more orders aren’t eligible for consolidation:

{
  "error": "consolidation_failed",
  "error_description": "One or more orders are not eligible for consolidation"
}

500 response

Unknown error:

{
  "error": "system",
  "error_description": "An unknown error has occurred."
}