Reference
List states
The states (or regions) of one country.
GET
/v1/countries/{countryId}/statesBearer tokenReturns JSONSuccess 200
Sorted by name. Send search with at least two letters to narrow the list; it matches the English and the Arabic name.
Request
Headers
| Field | Type | Description |
|---|---|---|
Authorizationrequired | string | The access token from Get token, as "Bearer <token>". |
Path parameters
| Field | Type | Description |
|---|---|---|
countryIdrequired | string | The country's id, from List countries. |
Query parameters
| Field | Type | Description |
|---|---|---|
searchoptional | string | Narrow the list by name. At least two letters. |
limitoptional | number | The most rows to return, 1 to 500. Default 100. |
Example request
curl -X GET "https://api.swiftazu.com/v1/countries/cfde4319-9563-4d6a-9afa-0f72dad3c718/states" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Response
Example response · 200
[
{
"id": "73ff99bd-ca0e-4ec7-a60e-f314c57c0046",
"name": "Dubai",
"nameAr": "دبي",
"stateCode": "AE-DU"
}
]Errors
| HTTP | Code | Meaning |
|---|---|---|
| 404 | country_not_found | No country has this id. |
Every call can also return the shared errors listed on the Overview page. Overview