Skip to content

List states by country

GET /api/locations/states

Returns states/territories for a country, plus flags for whether a state and/or postcode are required when addressing in that country.

Public — no authentication required.

ParameterTypeRequiredDescription
countrystringNoISO country code (e.g. AU). Defaults depend on implementation; pass explicitly for international.
Terminal window
curl -G \
"https://www.transdirect.com.au/api/locations/states" \
--data-urlencode "country=AU"

A successful response includes the country code, whether state/postcode fields are required, and a list of states. Exact field names follow the locations contract (code, name, required flags). Use this when building international address forms so you know which fields to collect.