Skip to content

Sender and receiver addresses

Read just the pickup or delivery address of a booking. To change an address, send sender or receiver to update a booking.

GET /api/v5/bookings/{id}/sender
GET /api/v5/bookings/{id}/receiver

Requires your API key in the api-key header.

ParameterTypeDescription
idintegerThe Transdirect booking id.
Terminal window
curl https://api.transdirect.com.au/api/v5/bookings/623630/sender \
-H "api-key: $TD_API_KEY"
import { client, getApiV5BookingsByIdSender, getApiV5BookingsByIdReceiver } from '@transdirect/api-sdk';
client.setConfig({ headers: { 'api-key': process.env.TD_API_KEY! } });
const { data: from } = await getApiV5BookingsByIdSender({ path: { id: '623630' } });
const { data: to } = await getApiV5BookingsByIdReceiver({ path: { id: '623630' } });
console.log(from?.sender.suburb, '->', to?.receiver.suburb);

200 OK. The address is wrapped in a sender or receiver key.

{
"sender": {
"id": 69194889,
"address": "1 Martin Place",
"company_name": "Example Books Pty Ltd",
"email": "dispatch@example.com",
"name": "Sam Taylor",
"postcode": "2000",
"phone": "0291234567",
"state": "NSW",
"suburb": "SYDNEY",
"type": "business",
"country": "AU"
}
}

/receiver returns {"receiver": {...}} with the same fields.

FieldDescription
idAddress record id.
name, company_nameContact name and business name.
addressStreet address.
suburb, state, postcodeLocality. postcode is a string.
countryTwo-letter ISO country code, for example AU.
typebusiness or residential.
phone, emailContact details.

Fields you have not filled in come back as empty strings or null.

StatusBodyCause
400EmptyThe booking has no address of that kind.
401{"error":"missing_api_key"} or {"error":"invalid_api_key"}No key, or a key that is not active.
404{"error":"booking_not_found"}No booking with that id belongs to your account.
429{"error":"rate_limited"}More than 600 requests a minute on this key. Wait for the retry-after seconds.

Open the API Explorer, add your key, and find Get booking sender details or Get booking receiver details.