Skip to content

Delete a booking item

Remove an item line from a draft booking. The booking’s charged weight is recalculated.

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

Requires your API key in the api-key header.

Make item changes before you confirm. Transdirect prices the booking again at confirm from the items it holds then.

ParameterTypeDescription
idintegerThe Transdirect booking id.
item_idintegerThe item line id.
Terminal window
curl -X DELETE https://api.transdirect.com.au/api/v5/bookings/623630/items/46885333 \
-H "api-key: $TD_API_KEY"
import { client, deleteApiV5BookingsByIdItemsByItemId } from '@transdirect/api-sdk';
client.setConfig({ headers: { 'api-key': process.env.TD_API_KEY! } });
const { response } = await deleteApiV5BookingsByIdItemsByItemId({
path: { id: '623630', item_id: '46885333' },
});
// response.status === 204 on success

204 No Content with an empty body.

StatusBodyCause
400{"errors":["Cannot update. Booking has been processed."]}The booking has already been paid.
400{"errors":"Cannot update items is Multipick bookings"}The booking is a multi-pickup booking.
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 Delete a booking item.