Skip to content

Get a booking item

Get a single item line on a booking.

GET /api/v5/bookings/{id}/items/{item_id}

Requires your API key in the api-key header.

ParameterTypeDescription
idintegerThe Transdirect booking id.
item_idintegerThe item line id, from list booking items or the booking’s items array.
Terminal window
curl https://api.transdirect.com.au/api/v5/bookings/623630/items/46885332 \
-H "api-key: $TD_API_KEY"
import { client, getApiV5BookingsByIdItemsByItemId } from '@transdirect/api-sdk';
client.setConfig({ headers: { 'api-key': process.env.TD_API_KEY! } });
const { data: item } = await getApiV5BookingsByIdItemsByItemId({
path: { id: '623630', item_id: '46885332' },
});

200 OK

{
"id": 46885332,
"description": "Carton",
"weight": 5,
"length": 40,
"width": 30,
"height": 20,
"quantity": 1
}

Weight is in kg and dimensions are in cm, for one item. quantity is the number of identical items on the line.

StatusBodyCause
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.
404{"error":"item_not_found"}The item is not on this booking.

Open the API Explorer, add your key, and find Get a booking item.