Skip to content

Update an order

PUT /api/orders/{id}

Updates the details of an existing order. You only need to include the fields you want to change.

ParameterTypeRequiredDescription
idintegerYesThe order ID
FieldTypeRequiredDescription
order_numberstringNoThe order number from your external system
receiver_namestringNoRecipient’s full name
receiver_emailstringNoRecipient’s email address
receiver_phonestringNoRecipient’s phone number
receiver_addressstringNoDelivery street address
receiver_suburbstringNoDelivery suburb
receiver_postcodestringNoDelivery postcode
receiver_statestringNoDelivery state or territory
receiver_countrystringNoDelivery country code
itemsarrayNoArray of item objects (replaces existing items)
FieldTypeRequiredDescription
descriptionstringYesDescription of the item
quantityintegerYesNumber of items
weightnumberYesWeight in kilograms
Terminal window
curl -X PUT \
-H "Api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"receiver_name": "Jane Smith",
"receiver_phone": "0412345678",
"items": [
{
"description": "Widget Pro (Updated)",
"quantity": 3,
"weight": 1.5
}
]
}' \
https://www.transdirect.com.au/api/orders/5001

A successful response returns a 200 status code with the updated order.

{
"id": 5001,
"order_number": "WC-1042",
"source": "woocommerce",
"status": "pending",
"receiver_name": "Jane Smith",
"receiver_email": "john@example.com.au",
"receiver_phone": "0412345678",
"receiver_address": "42 George Street",
"receiver_suburb": "SYDNEY",
"receiver_postcode": "2000",
"receiver_state": "NSW",
"receiver_country": "AU",
"items": [
{
"description": "Widget Pro (Updated)",
"quantity": 3,
"weight": 1.5
}
],
"created_at": "2025-08-15T10:30:00+1000",
"booking_id": null
}
Status codeMeaning
400Bad request — invalid field values
401Unauthorised — invalid credentials or API key
404Not found — the order does not exist or does not belong to your account
422Unprocessable entity — validation errors or order has already been converted to a booking