Moving from v4
If your integration calls https://www.transdirect.com.au/api (paths such as
/api/bookings/v4/...), move it to the v5 API at
https://api.transdirect.com.au/api/v5. This page is the checklist.
Your existing API key works on v5 unchanged: it is the same key for the same account. The old documentation on Apiary and GitBook has been retired, and this site is now the reference.
Checklist
Section titled “Checklist”-
Change the base URL to
https://api.transdirect.com.auand put/api/v5in front of every path, using the mapping below. -
Send the key in the
api-keyheader. v5 does not accept HTTP Basic authentication (email and password). If you used Basic auth, create a key as described in authentication. -
Split create-and-pay into quote, then confirm.
POST /api/v5/bookings/v4returns400with codecreate_and_pay_not_supportedfor a non-nullpayment_method, a truthycollection_point_id, or a non-null misspelt payment field such aspaymentMethodorcard_id. Send the courier, pickup date, pickup time and payment method toPOST /api/v5/bookings/{id}/confirminstead. See booking lifecycle. -
Switch on
status_code. On a v5 booking,statusis a display label (“Pending Payment”) andstatus_codeis the stable code (pending_payment). -
Update error handling for the v5 bodies. A missing or wrong key is
401 {"error":"missing_api_key"}or401 {"error":"invalid_api_key"}, not amessageandcode. See errors. -
Update rate-limit handling. v5 allows 600 requests a minute per key and sends only
retry-afteron a429. There are noX-RateLimit-*headers. See rate limits. -
Run the whole flow in demo mode before you switch production traffic. See testing with demo mode.
Path mapping
Section titled “Path mapping”Replace https://www.transdirect.com.au/api with
https://api.transdirect.com.au/api/v5 and adjust the path as shown. Where v4
had both /bookings/... and /bookings/v4/..., both map to the same v5 path.
Quotes and bookings
Section titled “Quotes and bookings”| v4 | v5 |
|---|---|
POST /api/bookings/v4 or POST /api/quotes | POST /api/v5/quotes |
POST /api/quotes/pickup-availability | POST /api/v5/quotes/pickup-availability |
GET /api/bookings/v4 | GET /api/v5/bookings |
GET /api/bookings/v4/{id} | GET /api/v5/bookings/{id} |
PUT or PATCH /api/bookings/v4/{id} | PUT or PATCH /api/v5/bookings/{id} |
DELETE /api/bookings/v4/{id} | DELETE /api/v5/bookings/{id} |
POST /api/bookings/v4/{id}/confirm | POST /api/v5/bookings/{id}/confirm |
GET /api/bookings/{id}/context | GET /api/v5/bookings/{id}/context |
GET /api/bookings/v4/{id}/sender | GET /api/v5/bookings/{id}/sender |
GET /api/bookings/v4/{id}/receiver | GET /api/v5/bookings/{id}/receiver |
GET or POST /api/bookings/v4/{id}/custom_declaration | GET or POST /api/v5/bookings/{id}/custom_declaration |
GET, POST /api/bookings/v4/{id}/items | GET, POST /api/v5/bookings/{id}/items |
GET, PUT, DELETE /api/bookings/v4/{id}/items/{item_id} | GET, PUT, DELETE /api/v5/bookings/{id}/items/{item_id} |
Labels and documents
Section titled “Labels and documents”| v4 | v5 |
|---|---|
GET or HEAD /api/bookings/v4/{id}/label | GET or HEAD /api/v5/bookings/{id}/label |
GET or HEAD /api/bookings/v4/{id}/a6label | GET or HEAD /api/v5/bookings/{id}/a6label |
GET /api/bookings/v4/{id}/manifest | GET /api/v5/bookings/{id}/manifest |
GET /api/bookings/v4/{id}/invoice | GET /api/v5/bookings/{id}/invoice |
GET /api/bookings/v4/{id}/public_url | GET /api/v5/bookings/{id}/public_url |
GET /api/bookings/{id}/tntregeneralabel, /tgeregeneralabel, /northlineregeneralabel | GET /api/v5/bookings/{id}/tntregeneralabel, /tgeregeneralabel, /northlineregeneralabel |
POST /api/bookings/labels/batch | POST /api/v5/bookings/labels/batch |
POST /api/bookings/manifests/batch | POST /api/v5/bookings/manifests/batch |
Tracking
Section titled “Tracking”| v4 | v5 |
|---|---|
GET /api/bookings/trackstatus/{id} | GET /api/v5/tracking/{reference} (no key needed) |
GET /api/bookings/track/{id} or /api/bookings/v4/track/{id} | GET /api/v5/bookings/track/{id} |
Account, configuration and reference data
Section titled “Account, configuration and reference data”| v4 | v5 |
|---|---|
GET /api/member | GET /api/v5/member |
GET /api/members/payment-methods | GET /api/v5/members/payment-methods |
GET /api/bookings/v4/api_details | GET /api/v5/bookings/v4/api_details |
POST /api/bookings/v4/set_api_settings | POST /api/v5/bookings/v4/set_api_settings |
POST /api/bookings/v4/test_api_key_settings | POST /api/v5/bookings/v4/test_api_key_settings |
GET /api/bookings/sync | GET /api/v5/bookings/sync |
GET /api/couriers | GET /api/v5/couriers |
GET /api/locations, /api/locations/page/{page} | GET /api/v5/locations, /api/v5/locations/page/{page} |
GET /api/locations/search | GET /api/v5/locations/search |
GET /api/locations/postcode/{postCode} | GET /api/v5/locations/postcode/{postCode} |
GET /api/locations/states | GET /api/v5/locations/states |
POST /api/locations/validate-route | POST /api/v5/locations/validate-route |
GET, POST /api/orders | GET, POST /api/v5/orders |
POST /api/orders/create-simple | POST /api/v5/orders/create-simple |
GET, PUT /api/orders/{id} | GET, PUT /api/v5/orders/{id} |
Response bodies are not always identical to v4, so check each endpoint’s
reference page as you move it. The API key configuration endpoints keep v4 in
their v5 path; those are their only paths. Collection points have their own page:
collection points.
Behaviour that changes
Section titled “Behaviour that changes”| Area | On v5 |
|---|---|
| Authentication | api-key header only. No Basic auth. X-API-Key, api_key and Authorization: Bearer are not read. |
| Creating a booking | Every quote creates a draft booking and returns its id. Booking and paying always happen in a second call, POST /api/v5/bookings/{id}/confirm. |
| Quote response | quotes is keyed by courier id; that key is the courier you confirm with. Ignore the label URL in the quote response, which points at the old host, and use GET /api/v5/bookings/{id}/label. |
| Booking response | status is a display label and status_code is the code to use. label is a v5 path. quotes and quote_errors are only on the quote response, not on GET /api/v5/bookings/{id}. |
| Payment | Send payment_method (an id from GET /api/v5/members/payment-methods, or "demo") on confirm. Leaving it out bills a credit account, which most accounts do not have, so the confirm returns 403 NO_PAYMENT_METHOD. Raw card details are rejected. |
| Confirm body | pickup_date and pickup-date are both accepted, as are pickup_time and pickup-time. |
| Booking list | Leaves out unconfirmed quotes, returns at most 100 bookings, and returns 404 with an empty body when there are none. |
| Errors | Several JSON shapes, all described in errors. An unknown path under /api/v5 returns 404 {"error":"legacy_public_route_not_mounted"}. |
| Rate limits | 600 requests a minute per key, retry-after on 429, no X-RateLimit-* headers. |
| Webhooks | None. Poll labels and tracking. |
Cancelling a booking
Section titled “Cancelling a booking”Use POST /api/v5/bookings/{id}/cancel with a required reason for eligible account-credit and demo bookings. The response distinguishes an immediate cancellation from a request submitted to support. Card and PayPal bookings return 422; use the members area or contact support for those. Delete unconfirmed drafts with DELETE /api/v5/bookings/{id}.
Not available on v5
Section titled “Not available on v5”- Creating member accounts (
POST /api/members). New accounts sign up at members.transdirect.com.au/sign-up. - Choosing a collection point on create (
collection_point_id). The v5 quote and confirm bodies do not accept it. /transvirtualregeneralabeland/zetaregeneralabel. v5 has only the TNT, TGE and Northline regenerate-label routes listed above.
Next steps
Section titled “Next steps”- Quickstart: the full v5 flow in about 10 minutes.
- API overview: conventions, errors and rate limits.
- SDKs and versioning: the TypeScript SDK and generating clients.