Skip to content

Update an item

PUT /api/bookings/v4/{id}/items/{item_id}

Updates the details of an existing item within a booking. You only need to include the fields you want to change.

ParameterTypeRequiredDescription
idintegerYesThe booking ID
item_idintegerYesThe item ID
FieldTypeRequiredDescription
weightnumberNoWeight in kilograms
heightnumberNoHeight in centimetres
widthnumberNoWidth in centimetres
lengthnumberNoLength in centimetres
quantityintegerNoNumber of identical items (minimum 1)
descriptionstringNoDescription of the item contents
Terminal window
curl -X PUT \
-H "Api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"weight": 7.5,
"description": "Updated electronics parcel"
}' \
https://www.transdirect.com.au/api/bookings/v4/123456/items/1

A successful response returns a 200 status code with the updated item.

{
"id": 1,
"booking_id": 123456,
"weight": 7.5,
"height": 20,
"width": 30,
"length": 40,
"quantity": 1,
"description": "Updated electronics parcel"
}
Status codeMeaning
400Bad request — invalid field values
401Unauthorised — invalid credentials or API key
404Not found — the booking or item does not exist, or does not belong to your account
422Unprocessable entity — validation errors (e.g. weight must be greater than 0)