Rest API

Transdirect Public API V4

The Transdirect API is a standard REST API, with JSON responses, and can be easily integrated into new and existing systems. It allows for instant live quoting as well as booking of jobs.

Introduction

  • Authentication is via HTTP basic authentication using your member email and password. API is only accessible via HTTPS.
  • Another way is using the generated API in members area and create a Custom header “Api-key: [API-KEY-GENERATED]”.
  • The api is accessible at https://www.transdirect.com.au/api/.
  • JSON only including input – 415 error on invalid content types.
  • All times are in ISO8601 format.

Reference

1. Simple Quote / Get a simple quote

At a minimum the body must contain the fields below. Following creation you can update the booking from the returned booking id by using the PUT or PATCH methods. The country field in from/to is set to “AU” by default.

Method : POST
URL : https://www.transdirect.com.au/api/quotes

Request
HEADERS: Content-Type:application/json
BODY: {
“declared_value”: “1000.00”,
“items”: [
{
“weight”: “38.63”,
“height”: “0.25”,
“width”: “1.65”,
“length”: “3.32”,
“quantity”: 1,
“description”: “carton”
},
{
“weight”: “39.63”,
“height”: “1.25”,
“width”: “2.65”,
“length”: “4.32”,
“quantity”: 2,
“description”: “carton”
}
],
“sender”: {
“postcode”: “2000”,
“suburb”: “SYDNEY”,
“type”: “business”,
“country”: “AU”
},
“receiver”: {
“postcode”: “3000”,
“suburb”: “MELBOURNE”,
“type”: “business”,
“country”: “AU”
}
}

Response
HEADERS: Content-Type:application/json
BODY: {
“declared_value”: 1000,
“items”: [
{
“id”: 1177622,
“description”: “carton”,
“weight”: 38.63,
“length”: 3.32,
“width”: 1.65,
“height”: 0.25,
“quantity”: 1
},
{
“id”: 1177623,
“description”: “carton”,
“weight”: 39.63,
“length”: 4.32,
“width”: 2.65,
“height”: 1.25,
“quantity”: 2
}
],
“quotes”: {
“allied”: {
“total”: 79.24,
“price_insurance_ex”: 72.09,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “1-2 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
},
“tnt_overnight_express”: {
“total”: 34.915,
“price_insurance_ex”: 27.765,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “4 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
},
“tnt_road_express”: {
“total”: 41.845,
“price_insurance_ex”: 34.695,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “4 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
}
},
“tailgate_pickup”: true,
“tailgate_delivery”: true
}

2. Bookings

Get a quick quote, this will return a booking id that can be further updated with sender, receiver and other shipping options.

i. Create Booking
At a minimum the body must contain the fields below. Following creation you can update the booking from the returned booking id by using the PUT or PATCH methods. The country field in from/to is set to “AU” by default.

Method : POST
URL : https://www.transdirect.com.au/api/quotes

Request
HEADERS: Content-Type:application/json
BODY: {
“declared_value”: “1000.00”,
“items”: [
{
“weight”: “38.63”,
“height”: “0.25”,
“width”: “1.65”,
“length”: “3.32”,
“quantity”: 1,
“description”: “carton”
},
{
“weight”: “39.63”,
“height”: “1.25”,
“width”: “2.65”,
“length”: “4.32”,
“quantity”: 2,
“description”: “carton”
}
],
“sender”: {
“postcode”: “2000”,
“suburb”: “SYDNEY”,
“type”: “business”,
“country”: “AU”
},
“receiver”: {
“postcode”: “3000”,
“suburb”: “MELBOURNE”,
“type”: “business”,
“country”: “AU”
}
}

Response
HEADERS: Content-Type:application/json
BODY: {
“declared_value”: 1000,
“items”: [
{
“id”: 1177622,
“description”: “carton”,
“weight”: 38.63,
“length”: 3.32,
“width”: 1.65,
“height”: 0.25,
“quantity”: 1
},
{
“id”: 1177623,
“description”: “carton”,
“weight”: 39.63,
“length”: 4.32,
“width”: 2.65,
“height”: 1.25,
“quantity”: 2
}
],
“quotes”: {
“allied”: {
“total”: 79.24,
“price_insurance_ex”: 72.09,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “1-2 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
},
“tnt_overnight_express”: {
“total”: 34.915,
“price_insurance_ex”: 27.765,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “4 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
},
“tnt_road_express”: {
“total”: 41.845,
“price_insurance_ex”: 34.695,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “4 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
}
},
“tailgate_pickup”: true,
“tailgate_delivery”: true
}

ii. Get bookings based on since and sort

Method : POST
URL : https://www.transdirect.com.au/api/bookings/?since=&sort=
Parameters

Name Description Type
since Timestamp in ISO 8601 format: YYYY-MM-DD+HH:MM:SS Only bookings created at or after this time are returned. Example `2015-04-15+11:42:00 string
sort The sort order by field of the bookings returned. Options are booking_time, pickup_date, cost, etc. Example booking_time (default) string

Response
HEADERS: Content-Type:application/json
BODY: {
“id”: 725514,
“booked_at”: “2015-04-15T16:22:57+1000”,
“booked_by”: “sender”,
“created_at”: “2015-05-18T13:08:20+1000”,
“declared_value”: 0,
“insured_value”: 0,
“description”: “”,
“items”: [
{
“id”: 1177483,
“description”: “Carton”,
“weight”: 10,
“length”: 10,
“width”: 10,
“height”: 10,
“quantity”: 1
}
],
“label”: “http://www.dev.transdirect.com.au/api/bookings/725514/label”,
“notifications”: {
“email”: false,
“sms”: false
},
“quotes”: {
“allied”: {
“total”: 79.24,
“price_insurance_ex”: 72.09,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “1-2 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
},
“tnt_overnight_express”: {
“total”: 34.915,
“price_insurance_ex”: 27.765,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “4 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
},
“tnt_road_express”: {
“total”: 41.845,
“price_insurance_ex”: 34.695,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “4 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
}
},
“receiver”: {
“id”: 1500592,
“address”: “”,
“company_name”: “”,
“email”: “”,
“name”: “”,
“postcode”: “2001”,
“phone”: “”,
“state”: “NSW”,
“suburb”: “SYDNEY”,
“type”: “residential”,
“country”: “AU”
},
“sender”: {
“id”: 1500591,
“address”: “”,
“company_name”: “”,
“email”: “”,
“name”: “”,
“postcode”: “2001”,
“phone”: “”,
“state”: “NSW”,
“suburb”: “SYDNEY”,
“type”: “business”,
“country”: “AU”
},
“pickup_window”: [],
“connote”: “”,
“charged_weight”: 10,
“scanned_weight”: 0,
“special_instructions”: ” – NO REDELIVERY OR REDIRECTION WITHOUT PERMISSION FROM TRANSDIRECT”,
“status”: “pending_payment”,
“updated_at”: “2015-05-18T13:08:28+1000”,
“tailgate_pickup”: false,
“tailgate_delivery”: false
},
{
“id”: 725546,
“booked_at”: “2015-04-20T17:04:37+1000”,
“booked_by”: “sender”,
“created_at”: “2015-05-18T13:08:28+1000”,
“declared_value”: 0,
“insured_value”: 0,
“description”: “”,
“items”: [
{
“id”: 1177528,
“description”: “Carton”,
“weight”: 1,
“length”: 8,
“width”: 8,
“height”: 8,
“quantity”: 8
}
],
“label”: “http://www.dev.transdirect.com.au/api/bookings/725546/label”,
“notifications”: {
“email”: false,
“sms”: false
},
“quotes”: {
“allied”: {
“total”: 79.24,
“price_insurance_ex”: 72.09,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “1-2 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
},
“tnt_overnight_express”: {
“total”: 34.915,
“price_insurance_ex”: 27.765,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “4 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
},
“tnt_road_express”: {
“total”: 41.845,
“price_insurance_ex”: 34.695,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “4 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
}
},
“receiver”: {
“id”: 1500658,
“address”: “”,
“company_name”: “”,
“email”: “”,
“name”: “”,
“postcode”: “2006”,
“phone”: “”,
“state”: “NSW”,
“suburb”: “THE UNIVERSITY OF SYDNEY”,
“type”: “business”,
“country”: “AU”
},
“sender”: {
“id”: 1500657,
“address”: “”,
“company_name”: “”,
“email”: “”,
“name”: “”,
“postcode”: “2001”,
“phone”: “”,
“state”: “NSW”,
“suburb”: “SYDNEY”,
“type”: “business”,
“country”: “AU”
},
“pickup_window”: [],
“connote”: “”,
“charged_weight”: 8,
“scanned_weight”: 0,
“special_instructions”: ” – NO REDELIVERY OR REDIRECTION WITHOUT PERMISSION FROM TRANSDIRECT”,
“status”: “pending_payment”,
“updated_at”: “2015-05-18T13:08:36+1000”,
“tailgate_pickup”: false,
“tailgate_delivery”: false
}

iii. Get a single booking

Method : GET
URL : https://www.transdirect.com.au/api/bookings/id
Parameters

Name Description Type
id ID of the booking Integer

Response
HEADERS: Content-Type:application/json
BODY: {
“id”: 623630,
“booked_at”: “2015-01-08T14:42:07+1100”,
“booked_by”: “sender”,
“created_at”: “2015-05-18T13:44:25+1000”,
“declared_value”: 0,
“insured_value”: 0,
“description”: “TEST BOOKINGS”,
“items”: [
{
“id”: 1055686,
“description”: “Carton”,
“weight”: 5,
“length”: 5,
“width”: 10,
“height”: 5,
“quantity”: 1
}
],
“label”: “http://www.dev.transdirect.com.au/api/bookings/623630/label”,
“notifications”: {
“email”: false,
“sms”: false
},
“quotes”: {
“allied”: {
“total”: 79.24,
“price_insurance_ex”: 72.09,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “1-2 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
},
“tnt_overnight_express”: {
“total”: 34.915,
“price_insurance_ex”: 27.765,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “4 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
},
“tnt_road_express”: {
“total”: 41.845,
“price_insurance_ex”: 34.695,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “4 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
}
},
“receiver”: {
“id”: 1285798,
“address”: “1|TEST”,
“company_name”: “TEST Company”,
“email”: “jorge@bywave.com.au”,
“name”: “TEST BOOKINGS”,
“postcode”: “2000”,
“phone”: “1111111111”,
“state”: “NSW”,
“suburb”: “SYDNEY”,
“type”: “business”,
“country”: “AU”
},
“sender”: {
“id”: 1285797,
“address”: “1|TEST”,
“company_name”: “”,
“email”: “jorge@bywave.com.au”,
“name”: “TEST BOOKINGS”,
“postcode”: “2000”,
“phone”: “1111111111”,
“state”: “NSW”,
“suburb”: “SYDNEY”,
“type”: “residential”,
“country”: “AU”
},
“pickup_window”: [
“2015-01-12T12:00:00+1100”,
“2015-01-12T17:00:00+1100”
],
“connote”: “IRE000623630”,
“charged_weight”: 5,
“scanned_weight”: 0,
“special_instructions”: ” – NO REDELIVERY OR REDIRECTION WITHOUT PERMISSION FROM TRANSDIRECT”,
“status”: “confirmed”,
“updated_at”: “2015-05-18T13:44:44+1000”,
“tailgate_pickup”: false,
“tailgate_delivery”: false
}

iv. Update a booking

Method : PUT
URL : https://www.transdirect.com.au/api/bookings/id
Parameters

Name Description Type
id ID of the booking Integer

Request
HEADERS: Content-Type:application/json
BODY: {
“declared_value”: 10000,
“description”: “TEST BOOKINGS 2”,
“items”: [
{
“description”: “Carton”,
“weight”: 5,
“length”: 5,
“width”: 10,
“height”: 5,
“quantity”: 12
}
],
“receiver”: {
“postcode”: “2000”,
“type”: “business”,
“country”: “AU”
},
“sender”: {
“postcode”: “2000”,
“type”: “residential”,
“country”: “AU”
},
“tailgate_pickup”: false,
“tailgate_delivery”: false
}

Response
HEADERS: Content-Type:application/json
BODY: {
“declared_value”: 10000,
“description”: “TEST BOOKINGS 2”,
“items”: [
{
“description”: “Carton”,
“weight”: 5,
“length”: 5,
“width”: 10,
“height”: 5,
“quantity”: 12
}
],
“receiver”: {
“postcode”: “2000”,
“type”: “business”,
“country”: “AU”
},
“sender”: {
“postcode”: “2000”,
“type”: “residential”,
“country”: “AU”
},
“tailgate_pickup”: false,
“tailgate_delivery”: false
}

v. Remove a booking

Method : DELETE
URL : https://www.transdirect.com.au/api/bookings/id
Parameters

Name Description Type
id ID of the booking Integer

Response
204

3. Booking Confirmation

Notes: By default, the booking will have status of “demo”, for testing, when a booking is confirmed. When everything is finalized, please contact support to allow your account to “confirm” a live booking. This will take money from customer’s credit (website account credit)

Method : POST
URL : https://www.transdirect.com.au/api/bookings/id/confirm

Request
HEADERS: Content-Type:application/json
BODY: {
“courier”: “allied”,
“pickup-date”: “2015-08-27”
}

Response
204

4. Tracking Booking

Notes: This will return tracking of booking – status, date, time and depot

Method : GET
URL : https://www.transdirect.com.au/api/bookings/track/id

Response
HTML table format

5. Booking Items

i. Get all items in a booking
Notes: This will return tracking of booking – status, date, time and depot

Method : GET
URL : https://www.transdirect.com.au/api/bookings/id/items
Parameters

Name Description Type
id ID of the booking Integer

Response
[
{
“id”: 1055686,
“description”: “Carton”,
“weight”: 5,
“length”: 5,
“width”: 10,
“height”: 5,
“quantity”: 1
}
]

ii. Add an item to a booking
Notes: This will return tracking of booking – status, date, time and depot

Method : POST
URL : https://www.transdirect.com.au/api/bookings/id/items
Parameters

Name Description Type
id ID of the booking Integer

Request
HEADERS: Content-Type:application/json
Body: {
“weight”: 10,
“height”: 10,
“width”: 10,
“length”: 10,
“quantity”: 5,
“description”: “carton”
}

Response
201
[
{
“id”: 1177642,
“description”: “carton”,
“weight”: 10,
“length”: 10,
“width”: 10,
“height”: 10,
“quantity”: 5
}
]

iii. Get an item
Method : GET
URL : https://www.transdirect.com.au/api/bookings/id/items/item_id
Parameters

Name Description Type
id ID of the booking Integer
item_id ID of the item Integer

Response
200
HEADERS: Content-Type:application/json
Body: {
“id”: 1177642,
“description”: “carton”,
“weight”: 10,
“length”: 10,
“width”: 10,
“height”: 10,
“quantity”: 5
}

vi. Update an item

Method : PUT
URL : https://www.transdirect.com.au/api/bookings/id/items/item_id
Parameters

Name Description Type
id ID of the booking Integer
item_id ID of the item Integer

Request
HEADERS: Content-Type:application/json
Body: {
“height”: 5
}

Response
HEADERS: Content-Type:application/json
{
“id”: 523459,
“weight”: 10,
“height”: 5,
“width”: 10,
“length”: 10,
“quantity”: 5,
“description”: “carton”
}

v. Remove an item from a booking

Method : DELETE
URL : https://www.transdirect.com.au/api/bookings/id/items/item_id
Parameters

Name Description Type
id ID of the booking Integer
item_id ID of the item Integer

Response
204

6. Booking PDF

i. Booking Label

Method : GET
URL : https://www.transdirect.com.au/api/bookings/id/label

Response
200
HEADERS:
Content-Type:application/pdf
Content-Disposition:attachment; filename=”label.pdf”

ii. Booking Invoice

Method : GET
URL : https://www.transdirect.com.au/api/bookings/id/invoice
Parameters

Name Description Type
id ID of the booking Integer
item_id ID of the item Integer

Response
200
HEADERS:
Content-Type:application/pdf
Content-Disposition:attachment; filename=”invoice.pdf”

iii. Booking TNT Label

Method : GET
URL : https://www.transdirect.com.au/api/bookings/id/tntregeneralabel

Response
200
HEADERS:
Content-Type:application/pdf
Content-Disposition:attachment; filename=”label.pdf”

7. Get the currently authenticated member

Method : GET
URL : https://www.transdirect.com.au/api/member

Response
HEADERS: Content-Type:application/json
{
“id”: 503,
“company_name”: “Bywave Testing Account”,
“contact_name”: “Chris”,
“address”: “2”,
“suburb”: “”,
“postcode”: 2117,
“state”: “NSW”,
“phone”: “0”,
“discount_factor”: 0,
“credit_limit”: 3000,
“credit_limit_available”: 2941.2,
“charge_type”: “”,
“last_invoice_timestamp”: “0”,
“terms”: “0”,
“active”: “no”
}

8. Locations

A location is a unique postcode/suburb combination. A suburb might have multiple locations with different postcodes and similarly a postcode will have many locations for each suburb within the postcode.

i. Get Locations
Method : GET
URL : https://www.transdirect.com.au/api/locations

Response
200
HEADERS: Content-Type:application/json
{
“next_page”: “https://www.transdirect.com.au/api/locations/page/2”,
“code”: 200,
“locations”: {
“1”: {
“id”: “1”,
“locality”: “AUSTRALIAN NATIONAL UNIVERSITY”,
“postcode”: “0200”,
“state”: “ACT”,
“priority”: “1”
},
“2”: {
“id”: “2”,
“locality”: “BARTON”,
“postcode”: “0221”,
“state”: “ACT”,
“priority”: “1”
},
“3”: {
“id”: “3”,
“locality”: “DARWIN”,
“postcode”: “0800”,
“state”: “NT”,
“priority”: “1”
}
}
}

ii. Search Locations

Method : GET
URL : https://www.transdirect.com.au/api/locations?q=Parameters

Name Description Type
q Search term. This will be matched on postcode or suburb name. Example 4000 String

Response
200
HEADERS: Content-Type:application/json
{
“locations”: {
“8742”: {
“id”: “8742”,
“locality”: “BRISBANE ADELAIDE STREET”,
“postcode”: “4000”,
“state”: “QLD”,
“priority”: “10”
},
“8743”: {
“id”: “8743”,
“locality”: “BRISBANE CITY”,
“postcode”: “4000”,
“state”: “QLD”,
“priority”: “10”
},
“8744”: {
“id”: “8744”,
“locality”: “BRISBANE GPO”,
“postcode”: “4000”,
“state”: “QLD”,
“priority”: “10”
},
“8745”: {
“id”: “8745”,
“locality”: “PETRIE TERRACE”,
“postcode”: “4000”,
“state”: “QLD”,
“priority”: “10”
},
“8746”: {
“id”: “8746”,
“locality”: “SPRING HILL”,
“postcode”: “4000”,
“state”: “QLD”,
“priority”: “10”
},
“16640”: {
“id”: “16640”,
“locality”: “BRISBANE”,
“postcode”: “4000”,
“state”: “QLD”,
“priority”: “10”
}
}
}

iii. Get Locations Within Postcode

Method : GET
URL : https://www.transdirect.com.au/api/locations/postcode/postCodeParameters

Name Description Type
postCode Post code to search for locations. Example 2000 for Sydney String

Response
200
HEADERS: Content-Type:application/json
{
“locations”: [
{
“locality”: “BARANGAROO”,
“postcode”: “2000”,
“state”: “NSW”
},
{
“locality”: “DAWES POINT”,
“postcode”: “2000”,
“state”: “NSW”
},
{
“locality”: “HAYMARKET”,
“postcode”: “2000”,
“state”: “NSW”
},
{
“locality”: “MILLERS POINT”,
“postcode”: “2000”,
“state”: “NSW”
},
{
“locality”: “PARLIAMENT HOUSE”,
“postcode”: “2000”,
“state”: “NSW”
},
{
“locality”: “SYDNEY”,
“postcode”: “2000”,
“state”: “NSW”
},
{
“locality”: “SYDNEY SOUTH”,
“postcode”: “2000”,
“state”: “NSW”
},
{
“locality”: “THE ROCKS”,
“postcode”: “2000”,
“state”: “NSW”
}
]
}

9. Orders

Saved an order which will be available by the member for future processing
i. Create Orders

Method : POST
URL : https://www.transdirect.com.au/api/orders

Request
HEADERS: Content-Type:application/json
Body: {
“transdirect_order_id”: 12345,
“order_id”: “4444”,
“goods_summary”: “This is a test”,
“goods_dump”: “Another test”,
“imported_from”: “Woocommerce”,
“purchased_time”: “2015-06-01T16:06:52+1000”,
“sale_price”: 10.2,
“selected_courier”: “toll”,
“paid_time”: “2015-06-01T16:06:52+1000”,
“buyer_name”: “John Doe”,
“buyer_email”: “john@testemail.com.au”,
“delivery”: {
“name”: “John Doe”,
“email”: “”,
“phone”: “123456789”,
“address”: “216 Moggill Rd”
}
}

Response
HEADERS: Content-Type:application/json
{
“id”: “4”,
“transdirect_order_id”: 12345,
“transdirect_member_id”: “503”,
“transdirect_order_status”: “pending”,
“order_id”: “4444”,
“goods_summary”: “This is a test”,
“goods_dump”: “Another test”,
“imported_from”: “Woocommerce”,
“imported_time”: “2015-06-01T16:28:21+1000”,
“purchased_time”: “2015-06-01T16:06:52+1000”,
“sale_price”: 10.2,
“selected_courier”: “toll”,
“courier_price”: 14.2,
“paid_time”: “2015-06-01T16:06:52+1000”,
“buyer_name”: “John Doe”,
“buyer_email”: “john@testemail.com.au”,
“delivery”: {
“name”: “John Doe”,
“email”: “”,
“phone”: “123456789”,
“address”: “216 Moggill Rd”
}
}

ii. Get Saved Orders

Method : GET
URL : https://www.transdirect.com.au/api/orders/?since=
Parameters

Name Description Type
since Timestamp in ISO 8601 format: YYYY-MM-DD+HH:MM:SS Only bookings created at or after this time are returned. Example `2015-04-15+11:42:00 String

Response
HEADERS: Content-Type:application/json
[
{
“id”: “4”,
“transdirect_order_id”: 12346,
“transdirect_member_id”: “503”,
“transdirect_order_status”: “pending”,
“order_id”: “4444”,
“goods_summary”: “This is a test”,
“goods_dump”: “Another test”,
“imported_from”: “Woocommerce”,
“imported_time”: “2015-06-01T16:28:21+1000”,
“purchased_time”: “2015-06-01T16:06:52+1000”,
“sale_price”: 10.2,
“selected_courier”: “toll”,
“courier_price”: 25.2,
“paid_time”: “2015-06-01T16:06:52+1000”,
“buyer_name”: “John Doe”,
“buyer_email”: “john@testemail.com.au”,
“delivery”: {
“name”: “John Doe”,
“email”: “”,
“phone”: “123456789”,
“address”: “216 Moggill Rd”
}
},
{
“id”: “5”,
“transdirect_order_id”: 12345,
“transdirect_member_id”: “503”,
“transdirect_order_status”: “pending”,
“order_id”: “5555”,
“goods_summary”: “This is a test”,
“goods_dump”: “Another test”,
“imported_from”: “Woocommerce”,
“imported_time”: “2015-06-01T16:28:21+1000”,
“purchased_time”: “2015-06-01T16:06:52+1000”,
“sale_price”: 4.2,
“selected_courier”: “toll”,
“courier_price”: 15.2,
“paid_time”: “2015-06-01T16:06:52+1000”,
“buyer_name”: “John Doe”,
“buyer_email”: “john@testemail.com.au”,
“delivery”: {
“name”: “John Doe”,
“email”: “”,
“phone”: “123456789”,
“address”: “216 Moggill Rd”
}
}
]

ii. Get a single order

Method : GET
URL : https://www.transdirect.com.au/api/orders/id
Parameters

Name Description Type
id ID of the saved order. Integer

Response
HEADERS: Content-Type:application/json
{
“id”: 623630,
“booked_at”: “2015-01-08T14:42:07+1100”,
“booked_by”: “sender”,
“created_at”: “2015-05-18T13:44:25+1000”,
“declared_value”: 0,
“insured_value”: 0,
“description”: “TEST BOOKINGS”,
“items”: [
{
“id”: 1055686,
“description”: “Carton”,
“weight”: 5,
“length”: 5,
“width”: 10,
“height”: 5,
“quantity”: 1
}
],
“label”: “http://www.dev.transdirect.com.au/api/bookings/623630/label”,
“notifications”: {
“email”: false,
“sms”: false
},
“quotes”: {
“allied”: {
“total”: 79.24,
“price_insurance_ex”: 72.09,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “1-2 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
},
“tnt_overnight_express”: {
“total”: 34.915,
“price_insurance_ex”: 27.765,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “4 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
},
“tnt_road_express”: {
“total”: 41.845,
“price_insurance_ex”: 34.695,
“fee”: 7.15,
“insured_amount”: 4500,
“service”: “road”,
“transit_time”: “4 days”,
“pickup_dates”: [
“2015-08-27”,
“2015-08-28”
],
“pickup_time”: {
“from”: “14:00”,
“to”: “18:00”
}
}
},
“receiver”: {
“id”: 1285798,
“address”: “1|TEST”,
“company_name”: “TEST Company”,
“email”: “jorge@bywave.com.au”,
“name”: “TEST BOOKINGS”,
“postcode”: “2000”,
“phone”: “1111111111”,
“state”: “NSW”,
“suburb”: “SYDNEY”,
“type”: “business”,
“country”: “AU”
},
“sender”: {
“id”: 1285797,
“address”: “1|TEST”,
“company_name”: “”,
“email”: “jorge@bywave.com.au”,
“name”: “TEST BOOKINGS”,
“postcode”: “2000”,
“phone”: “1111111111”,
“state”: “NSW”,
“suburb”: “SYDNEY”,
“type”: “residential”,
“country”: “AU”
},
“pickup_window”: [
“2015-01-12T12:00:00+1100”,
“2015-01-12T17:00:00+1100”
],
“connote”: “IRE000623630”,
“charged_weight”: 5,
“scanned_weight”: 0,
“special_instructions”: ” – NO REDELIVERY OR REDIRECTION WITHOUT PERMISSION FROM TRANSDIRECT”,
“status”: “confirmed”,
“updated_at”: “2015-05-18T13:44:44+1000”,
“tailgate_pickup”: false,
“tailgate_delivery”: false
}

ii. Update an order

Method : GET
URL : https://www.transdirect.com.au/api/orders/id
Parameters

Name Description Type
id ID of the saved order. Integer

Request
HEADERS: Content-Type:application/json
Body: {
“transdirect_order_id”: 12345,
“order_id”: “4444”,
“goods_summary”: “This is a test”,
“goods_dump”: “Another test”,
“imported_from”: “Woocommerce”,
“purchased_time”: “2015-06-01T16:06:52+1000”,
“sale_price”: 10.2,
“selected_courier”: “toll”,
“paid_time”: “2015-06-01T16:06:52+1000”,
“buyer_name”: “John Doe”,
“buyer_email”: “john@testemail.com.au”,
“delivery”: {
“name”: “John Doe”,
“email”: “”,
“phone”: “123456789”,
“address”: “216 Moggill Rd”
}
}

Response
HEADERS: Content-Type:application/json

{
“id”: “4”,
“transdirect_order_id”: 817155,
“transdirect_member_id”: “503”,
“transdirect_order_status”: “pending”,
“order_id”: “4444”,
“goods_summary”: “This is a test”,
“goods_dump”: “Another test”,
“imported_from”: “Woocommerce”,
“imported_time”: “2015-06-01T16:28:21+1000”,
“purchased_time”: “2015-06-01T16:06:52+1000”,
“sale_price”: 10.2,
“selected_courier”: “toll”,
“courier_price”: 13.2,
“paid_time”: “2015-06-01T16:06:52+1000”,
“buyer_name”: “John Doe”,
“buyer_email”: “john@testemail.com.au”,
“delivery”: {
“name”: “John Doe”,
“email”: “”,
“phone”: “123456789”,
“address”: “216 Moggill Rd”
}
}

ii. Remove an order

Method : GET
URL : https://www.transdirect.com.au/api/orders/id
Parameters

Name Description Type
id ID of the saved order. Integer

Response
204

10. Fetch all couriers supported

List all couriers supported

Method : GET
URL : https://www.transdirect.com.au/api/couriers

Response
{
“Allied”: “allied”,
“Couriers Please”: “couriers_please”,
“Direct Couriers”: {
“Regular”: “direct_couriers_regular”,
“Express”: “direct_couriers_express”,
“Elite”: “direct_couriers_elite”
},
“Fastway”: “fastway”,
“Mainfreight”: “mainfreight”,
“Northline”: “northline”,
“TNT Express”: {
“TNT 9AM”: “tnt_nine_express”,
“TNT 10AM”: “tnt_ten_express”,
“TNT 12PM”: “tnt_twelve_express”,
“TNT Overnight”: “tnt_overnight_express”,
“TNT Road Express”: “tnt_road_express”
},
“Toll”: {
“Toll Ipec”: “toll”,
“Toll Priority”: “toll_priority”,
“Toll Priority Overnight”: “toll_priority_overnight”,
“Toll Priority Same Day”: “toll_priority_sameday”
}
}

We’ve got you covered. Send with Transdirect and start saving today!Get a Quote