Skip to content

Create an order

POST /api/orders

Creates (or upserts) an order linked to a booking for the authenticated member. This is the integration path used by store plugins (WooCommerce and similar). For a simpler CSV-style create without a full booking, see POST /api/orders/create-simple (members area / internal tooling).

Requires authentication via API key or basic auth.

The create path expects store-style field names. Required fields when creating a brand-new order through the full sync-style payload used by plugins:

FieldTypeRequiredDescription
order_idstringYesExternal order number from your system.
imported_fromstringYesSource platform (e.g. "Woocommerce", "Shopify", "csv").
purchased_timestringYesWhen the customer purchased.
sale_pricenumberYesOrder sale price.
paid_timestringYesWhen the order was paid.
buyer_namestringYesBuyer name.
buyer_emailstringYesBuyer email.
delivery_namestringYesDelivery recipient name.
delivery_emailstringYesDelivery recipient email.
delivery_phonestringYesDelivery recipient phone.
delivery_addressstringYesDelivery street address.
shipping_postcodestringYesDelivery postcode.
shipping_citystringYesDelivery suburb/city.
shipping_statestringNoDelivery state.
shipping_countrystringNoDelivery country.
shipping_first_name / shipping_last_namestringNoSplit name fields used when building the receiver address.
shipping_address / shipping_address2stringNoStreet lines.
shipping_phone / shipping_email / shipping_companystringNoOptional receiver contact fields.
courier_pricenumberNoQuoted shipping price.
itemsarrayConditionalLine items with description, weight, width, length, height, quantity (defaults come from API module settings when omitted).
transdirect_order_idintegerConditionalBooking id to attach the order to (required on the update/link path).
selected_courierstringConditionalCourier string_id when attaching to a booking for quoting.

A successful create returns 201 with the order object as returned by the API (not a simplified view model):

{
"id": 5003,
"transdirect_order_id": 12345678,
"transdirect_member_id": 12345,
"transdirect_order_status": "pending",
"order_id": "ORD-10042",
"goods_summary": "",
"goods_dump": null,
"imported_from": "Woocommerce",
"imported_time": "2025-08-20T04:00:00+00:00",
"purchased_time": "2025-08-20 10:00:00",
"sale_price": "49.95",
"selected_courier": null,
"courier_price": "0",
"paid_time": "2025-08-20 10:05:00",
"buyer_name": "John Smith",
"buyer_email": "john@example.com.au",
"delivery": {
"name": "John Smith",
"email": "john@example.com.au",
"phone": "0498765432",
"address": "42 George Street"
},
"last_updated": "2025-08-20T04:00:00+00:00"
}
FieldTypeDescription
idintegerTransdirect order primary key.
order_idstringExternal order number.
transdirect_order_idinteger | nullLinked booking id when the order is attached to a booking.
transdirect_member_idintegerOwning member id.
transdirect_order_statusstringOrder status (pending, ready_to_book, booked, manually_dispatched, cancelled, deleted, removed).
imported_fromstringSource platform.
imported_timestringISO 8601 import time.
deliveryobjectNested delivery contact: name, email, phone, address.
buyer_name / buyer_emailstringBuyer details.
goods_summary / goods_dumpstringGoods summary / raw dump when provided by the importer.
sale_price / courier_pricestring | numberCommercial values.
selected_courierstring | nullSelected courier string_id when set.
last_updatedstringLast update timestamp.
Status codeMeaning
400Bad request — missing or invalid fields
401Unauthorised — invalid credentials or API key
500Server error while saving the order or linking a booking