Order modification
To modify an existing order in Shippit, you can use the Get Order API endpoint and the Update Order API endpoint. Before you begin, make sure you have the tracking number of the order you want to change.
You can modify any order that’s in the order_placed
state. This means you can modify the order after creation and before labeling begins, and not while quoting is in progress.
You can’t modify:
- Priority orders
- On-demand orders
- Return orders
- Tracking-only orders
- Orders that are currently being quoted
To change the details of an existing order, start by retrieving the order details with the Get Order API endpoint. You need the tracking number to fetch the order data. The response body from this API call contains the details of the order, which you need to be able to change the order.
When you have the order details, you can modify the order by sending a request to the Update Order API endpoint. Do this by copying the response you received from the Get Order API endpoint and wrapping it in a JSON object. Place your JSON object in the order
field in your request body, modify the fields you need to change in the order leaving all the other fields as-is, and then send the request to the Update Order API endpoint.
This section includes some common examples of when you might need to modify orders.
Changing delivery address
These fields are available in the GET response. Change these fields to update the delivery address.
delivery_company
(Set tonull
if not required)delivery_address
delivery_suburb
delivery_state
delivery_postcode
delivery_country_code
delivery_instructions
is also available to add special delivery instructions for the order.
Changing couriers
These fields are available in the GET response. Change these fields to update the courier allocation.
courier_type
courier_allocation
To re-quote for a particular service-level, set courier_type
to the desired service level and set courier_allocation
to null
To use a specific courier, set courier_type
to the desired service level and set courier_allocation
to the desired courier, as described in the Update Order API endpoint.
Updating parcels
These fields are available in the GET response. Change these fields to update the parcel attributes.
parcel_attributes
(Array)weight
length
width
depth
There are several differences between parcel_attributes
here and when creating orders
- When orders are updated, parcels are processed as entered, and are not transformed at all, so they are not combined, or allocated to parcel presets.
- Create multiples of the same parcels by creating multiple objects under
parcel_attributes
with the same dimensions. Do not use a quantity field. - Don’t specify product attributes in
parcel_attributes
. Useproduct_attributes
instead.
Updating product attributes
These fields are available in the GET response. Change these fields to update the product attributes.
product_attributes
(Array)title
packed
sku
product_line_id
origin_country_code
location
dangerous_goods_code
dangerous_goods_text
dangerous_goods_class
tariff_code
mid_code
quantity
price
Similar to when creating orders, these fields are optional, and can be missing or set to null
if not specified.
To remove all products from the order, set product_attributes
to []
.
Updating customs clearance attributes
These fields are available in the GET response. Change these fields to update the customs clearance attributes for the order.
customs_clearance_attributes
tax_id_type
tax_id_country_code
tax_id_number
incoterm
export_reason
recipient_id
receiver_freight_charge_amount
Use these in the same way as you do when you create an order.
To remove customs clearance attributes from an order, set customs_clearance_attributes
to null
.
Updating user attributes
These fields are available in the GET response. Change these fields to update the receiver details.
receiver_contact_number
receiver_name
receiver_email
user_attributes
email
first_name
last_name
mobile
If the receiver name or contact information is different than the customer, you can set the customer information in user_attributes
and the preferred name and contact in receiver_name
and receiver_contact_number
. Otherwise, keep receiver_name
and receiver_contact_number
the same, or set them to null
.