Order API

The Order API submits an order to Shippit. The order API can be used to request orders, cancel orders, and to get label information for an order.

Create an order

POST /orders

Submits an order to be created on Shippit.

At minimum, an order requires a delivery location, user details, and parcel details. Shippit then generates the order, allocates the courier, and fills in the origin location based on the provided info and merchant configuration on Shippit.

Note that the required fields for an order can vary depending on the type of order, the requested courier, whether it is local or international, and a range of other factors.

There is a maximum of 1000 parcels per quote request.

Body

{
  "order": {
    "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"
    }
  }
}

Cancel order parameters

DELETE /orders/{tracking_number}

Cancels an order in Shippit using the tracking number.

The API first checks if the current state of the order allows it to be cancelled, and returns an immediate response. If the order is successfully cancelled, the API answers with the order state updated to cancelled. If the order can’t be cancelled, your receive a 422 error instead.