Skip to content

Customs declaration

POST /api/bookings/v4/{id}/custom_declaration

Creates a customs declaration for an international booking. Required for shipments where the sender or receiver is outside Australia (and the selected courier supports customs declarations).

ParameterTypeRequiredDescription
idintegerYesThe unique booking ID.

Send the declaration either nested under custom_declaration (v4 PHP style) or as a flat body (v5 accepts both).

FieldTypeRequiredDescription
namestringYesDeclarant / sender contact name.
emailstringYesDeclarant email.
phonestringYesDeclarant phone.
company_namestringNoCompany name.
street_numberstringYesStreet number of the declarant address.
street_namestringYesStreet name.
street_typestringYesStreet type (e.g. "St", "Rd", "Ave").
booking_party_details_typestring | integerNoParty type: 1 / "commercial" for business, or 0 / "private" for individual. Defaults to commercial.
reason_of_shipmentstringYesReason for export (e.g. sale, gift, sample).
itemsarrayYesGoods line items (at least one).
postcodestringNoDeclarant postcode.
suburbstringNoDeclarant suburb.
statestringNoDeclarant state.
countrystringNoDeclarant country code.
FieldTypeRequiredDescription
itemstringYesName of the goods line item.
weightnumberYesWeight per line in kilograms.
quantityintegerYesNumber of units.
invoice_valuenumberYesDeclared invoice value for the line.
invoice_descriptionstringYesCustoms description of the goods.
manufacturer_countrystringYesCountry of manufacture (ISO code or country name).
Terminal window
curl -X POST \
-H "Api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"custom_declaration": {
"name": "Jane Smith",
"email": "jane@example.com",
"phone": "0400000000",
"company_name": "Example Pty Ltd",
"street_number": "123",
"street_name": "George",
"street_type": "St",
"booking_party_details_type": "1",
"reason_of_shipment": "sale",
"items": [
{
"item": "Cotton t-shirt",
"weight": 0.2,
"quantity": 5,
"invoice_value": 25.00,
"invoice_description": "Cotton t-shirt",
"manufacturer_country": "AU"
},
{
"item": "Leather belt",
"weight": 0.3,
"quantity": 2,
"invoice_value": 45.00,
"invoice_description": "Leather belt",
"manufacturer_country": "AU"
}
]
}
}' \
https://www.transdirect.com.au/api/bookings/v4/12345678/custom_declaration

A successful request returns 200 with a short confirmation (not an echo of the declaration body):

{
"status": "success",
"message": "Custom Declaration Successfully created"
}
GET /api/bookings/v4/{id}/custom_declaration

Returns (or redirects to) the customs declaration PDF for the booking when one has been generated.

A customs declaration is required when:

  • The receiver is in a country other than Australia, or
  • The sender is in a country other than Australia

…and the selected courier supports customs forms. Document-only international services may reject a declaration.

Status codeDescription
400Bad request — missing required fields, domestic shipment, courier not set, or courier does not support customs. Response body includes an errors array.
401Unauthorised — invalid or missing credentials.
404 / 401Booking not found or not accessible.
500Server error while processing the declaration.