List booking items
Endpoint
Section titled “Endpoint”GET /api/bookings/v4/{id}/itemsReturns all items associated with a booking. Each item represents a parcel or package within the booking.
Path parameters
Section titled “Path parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The booking ID |
Request
Section titled “Request”curl -X GET \ -H "Api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ https://www.transdirect.com.au/api/bookings/v4/123456/itemsResponse
Section titled “Response”A successful response returns a 200 status code with an array of item objects.
[ { "id": 1, "booking_id": 123456, "weight": 5, "height": 20, "width": 30, "length": 40, "quantity": 1, "description": "Electronics" }, { "id": 2, "booking_id": 123456, "weight": 2.5, "height": 15, "width": 15, "length": 25, "quantity": 2, "description": "Books" }]Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
id | integer | Unique item ID |
booking_id | integer | The parent booking ID |
weight | number | Weight in kilograms |
height | number | Height in centimetres |
width | number | Width in centimetres |
length | number | Length in centimetres |
quantity | integer | Number of identical items |
description | string | Description of the item contents |
Error responses
Section titled “Error responses”| Status code | Meaning |
|---|---|
401 | Unauthorised — invalid credentials or API key |
404 | Not found — the booking does not exist or does not belong to your account |