Update an order
Endpoint
Section titled “Endpoint”PUT /api/orders/{id}Updates the details of an existing order. You only need to include the fields you want to change.
Path parameters
Section titled “Path parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The order ID |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
order_number | string | No | The order number from your external system |
receiver_name | string | No | Recipient’s full name |
receiver_email | string | No | Recipient’s email address |
receiver_phone | string | No | Recipient’s phone number |
receiver_address | string | No | Delivery street address |
receiver_suburb | string | No | Delivery suburb |
receiver_postcode | string | No | Delivery postcode |
receiver_state | string | No | Delivery state or territory |
receiver_country | string | No | Delivery country code |
items | array | No | Array of item objects (replaces existing items) |
Item fields
Section titled “Item fields”| Field | Type | Required | Description |
|---|---|---|---|
description | string | Yes | Description of the item |
quantity | integer | Yes | Number of items |
weight | number | Yes | Weight in kilograms |
Request
Section titled “Request”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/5001Response
Section titled “Response”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}Error responses
Section titled “Error responses”| Status code | Meaning |
|---|---|
400 | Bad request — invalid field values |
401 | Unauthorised — invalid credentials or API key |
404 | Not found — the order does not exist or does not belong to your account |
422 | Unprocessable entity — validation errors or order has already been converted to a booking |