List booking items
Endpoint
Section titled “Endpoint”GET /api/bookings/v4/{id}/itemsReturns all items associated with a 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 200 with an array of item objects:
[ { "id": 1, "description": "Carton", "weight": 5, "length": 40, "width": 30, "height": 20, "quantity": 1 }, { "id": 2, "description": "Satchel", "weight": 2.5, "length": 25, "width": 15, "height": 15, "quantity": 2 }]Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
id | integer | Unique item ID |
description | string | Packaging type |
weight | number | Weight in kilograms |
length | number | Length in centimetres |
width | number | Width in centimetres |
height | number | Height in centimetres |
quantity | integer | Number of identical items |
The parent booking is only identified by the path ({id}); item objects do not include a booking_id field.
Error responses
Section titled “Error responses”| Status code | Meaning |
|---|---|
401 | Unauthorised |
404 | Booking not found or has no items |