Update or delete an order
Change one of your saved orders: set its status, correct its buyer or delivery details, link it to a booking, or delete it.
PUT /api/v5/orders/{id}DELETE /api/v5/orders/{id}Both require your API key in the api-key header. See Authentication.
Path parameters
Section titled “Path parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Transdirect’s order id: the id field from List orders. Not your store’s order_id. |
Update an order
Section titled “Update an order”PUT takes one of two bodies. Send JSON.
Change the status only
Section titled “Change the status only”Send transdirect_order_status on its own. If the body also has other fields (and no transdirect_order_id), it is rejected with 400, so send status changes as a separate request.
curl -X PUT "https://api.transdirect.com.au/api/v5/orders/88" \ -H "api-key: $TD_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "transdirect_order_status": "booked" }'Transdirect stores whatever text you send. New orders start as pending, and the members area uses ready_to_book, quoted, booked, manually_dispatched and cancelled, so stick to those values if you want the order to show correctly there. Once an order is in any status other than pending, ready_to_book or quoted, its linked booking can no longer be confirmed.
Change fields or link a booking
Section titled “Change fields or link a booking”Send any of these fields. Fields you leave out keep their current value. The body is strict: a field that is not listed is rejected with 400.
| Field | Type | Description |
|---|---|---|
transdirect_order_id | integer | The id of one of your Transdirect bookings, to link to this order. Send selected_courier with it. |
selected_courier | string | Courier key of the quote you chose on that booking, for example couriers_please. Transdirect stores that courier’s quoted price as courier_price. If the booking has no quote for that courier, or you leave it out, the order is still linked with selected_courier empty and courier_price 0, so you can choose a courier later. |
courier_price | number | Shipping price in AUD. Stored as sent when you are not linking a booking. When you link one, Transdirect replaces it with the booking’s quoted price for selected_courier, or 0 if there is none. |
transdirect_order_status | string | New status. Allowed here only alongside transdirect_order_id; otherwise use the status-only body above. |
order_id | string | Your order number. |
delivery | object | Recipient name, email, phone, address. |
delivery_client_name, delivery_client_email, delivery_client_phone, delivery_client_address | string | Flat alternatives to the delivery fields. The flat field wins if you send both. |
buyer_name, buyer_email | string | The buyer. |
goods_summary, goods_dump | string | Goods description and raw line-item data. |
imported_from | string | Source of the order. |
sale_price | number | Order total in AUD. |
purchased_time, paid_time | string | When the order was placed and paid. |
Link booking 34500123 (the id from its quote response) on Couriers Please:
curl -X PUT "https://api.transdirect.com.au/api/v5/orders/88" \ -H "api-key: $TD_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "transdirect_order_id": 34500123, "selected_courier": "couriers_please" }'import { client, putApiV5OrdersById } from '@transdirect/api-sdk';
client.setConfig({ headers: { 'api-key': process.env.TD_API_KEY! } });
const { data, error } = await putApiV5OrdersById({ path: { id: '88' }, body: { transdirect_order_id: 34500123, selected_courier: 'couriers_please' },});Linking does not confirm the booking. Confirm it with POST /api/v5/bookings/{id}/confirm, passing the same courier key as courier.
Response
Section titled “Response”200 OK with the updated order. The fields are described on List orders. A body with no recognised changes returns the order unchanged.
{ "id": 88, "transdirect_order_id": 34500123, "transdirect_member_id": 12345, "transdirect_order_status": "pending", "order_id": "WEB-1042", "goods_summary": "2 x Ceramic planter", "goods_dump": "", "imported_from": "csv", "imported_time": "2026-10-15T23:30:00.000Z", "purchased_time": "2026-10-16T10:28:00+11:00", "sale_price": "89.90", "selected_courier": "couriers_please", "courier_price": 14.85, "paid_time": "", "buyer_name": "Jane Citizen", "buyer_email": "jane@example.com.au", "delivery": { "name": "Jane Citizen", "email": "jane@example.com.au", "phone": "0412345678", "address": "1 Collins Street, MELBOURNE VIC 3000" }, "last_updated": "2026-10-15T23:41:12.000Z"}Errors
Section titled “Errors”| Status | Body | Cause |
|---|---|---|
400 | {"success":false,"error":{"name":"ZodError","message":"..."}} | id contains something other than digits, or the body has a field that is not listed. message is a JSON-encoded list of the problems. |
400 | {"error":"invalid_order_id"} | id is 0. |
400 | {"error":{"name":"ZodError","issues":[...]},"requestId":"..."} | transdirect_order_status was sent with other fields but without transdirect_order_id. Send the status on its own. |
401 | {"error":"missing_api_key"} or {"error":"invalid_api_key"} | No key, or the key is unknown or deactivated. |
403 | {"error":"No access to booking."} | transdirect_order_id is not one of your bookings. |
404 | {"error":"Order not found"} | No order with this id on your account, or the order is deleted. |
429 | {"error":"rate_limited"} | More than 600 requests in a minute on this key. Wait for the number of seconds in retry-after. |
Booking ownership is checked before updating any order fields. A rejected booking link (403) leaves the order unchanged.
Delete an order
Section titled “Delete an order”Removes the order from your account permanently. The linked booking, if any, is not touched: delete an unconfirmed booking separately with DELETE /api/v5/bookings/{id}.
curl -X DELETE "https://api.transdirect.com.au/api/v5/orders/88" \ -H "api-key: $TD_API_KEY"import { client, deleteApiV5OrdersById } from '@transdirect/api-sdk';
client.setConfig({ headers: { 'api-key': process.env.TD_API_KEY! } });
const { error, response } = await deleteApiV5OrdersById({ path: { id: '88' } });// response.status === 204 when deletedResponse
Section titled “Response”204 No Content with an empty body.
Errors
Section titled “Errors”| Status | Body | Cause |
|---|---|---|
400 | {"success":false,"error":{"name":"ZodError","message":"..."}} | id contains something other than digits. |
400 | {"error":"invalid_order_id"} | id is 0. |
401 | {"error":"missing_api_key"} or {"error":"invalid_api_key"} | No key, or the key is unknown or deactivated. |
403 | {"error":"order_not_found"} | No order with this id on your account, or it was already deleted. Treat it as “not found”. |
429 | {"error":"rate_limited"} | More than 600 requests in a minute on this key. |
Try it
Section titled “Try it”Open Update a saved order or Delete a saved order in the API Explorer, paste your API key into the authentication box and send the request. These calls change real orders on your account.