Order modification code examples
Modifying an order and changing all editable fields:
JSON
{
"order": {
"authority_to_leave": "No",
"cash_on_delivery_amount": 0.0,
"courier_type": "standard",
"parcel_attributes": [
{
"qty": 1,
"length": 0.51,
"width": 0.55,
"depth": 0.55,
"weight": 27.0,
"label_number": "SHP108899736001"
}
],
"product_attributes": [
{
"price": 1.0,
"tariff_code": "test-tariff-code",
"quantity": 1,
"title": "Flammable solvent 1 L",
"sku": "SOLVENT-1L",
"origin_country_code": "AU",
"product_line_id": "1001",
"location": "Test location",
"packed": 1,
"dangerous_goods": {
"code": "UN1993",
"class": "3",
"text": "Flammable liquid, n.o.s.",
"packing_group": "II",
"packing_description": "Steel drum",
"amount": 1,
"amount_unit": "L"
}
}
],
"user_attributes": {
"email": "john.smith@example.com",
"mobile": "0411000000",
"first_name": "John",
"last_name": "Smith"
},
"customs_clearance_attributes": {
"tax_id_type": "EORI",
"tax_id_country_code": "AU",
"tax_id_number": "123456000",
"incoterm": "DAP",
"export_reason": "Sample",
"receiver_freight_charge_amount": "15.0",
"recipient_id": "PA1992991"
},
"courier_allocation": "AlliedExpressOvernight",
"receiver_name": "John Smith",
"receiver_contact_number": "0411000444",
"retailer_invoice": "SO-123standard",
"retailer_reference": "Test retailer reference",
"suppress_communications": false,
"features": [],
"description": "Test order description",
"duties": 0.0,
"tax_amount": 0.0,
"pickup_at": "2025-03-01T11:00:00+10:00",
"pickup_deadline_at": "2025-03-01T11:00:00+10:00",
"dropoff_at": "2025-03-01T11:00:00+10:00",
"dropoff_deadline_at": "2025-03-01T11:00:00+10:00",
"delivery_address": "1 Test",
"delivery_postcode": "2009",
"delivery_state": "NSW",
"delivery_suburb": "Pyrmont",
"delivery_company": "Test delivery company",
"delivery_country_code": "AU",
"delivery_timezone": "Australia/Sydney",
"delivery_instructions": "Test delivery instruction"
}
}