Get an item
Endpoint
Section titled “Endpoint”GET /api/bookings/v4/{id}/items/{item_id}Returns the details of a specific item within a booking.
Path parameters
Section titled “Path parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The booking ID |
item_id | integer | Yes | The item 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/items/1Response
Section titled “Response”A successful response returns a 200 status code with the item object.
{ "id": 1, "booking_id": 123456, "weight": 5, "height": 20, "width": 30, "length": 40, "quantity": 1, "description": "Electronics"}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 or item does not exist, or does not belong to your account |