Reference
List cities
The cities of one state that your shipping company covers.
GET
/v1/states/{stateId}/citiesBearer tokenReturns JSONSuccess 200
Only covered cities are listed. tier (1 to 10) is the city's own tier, else its state's, else the country's, else 1. servesPickup and servesDelivery say which side the shipping company serves; delivery is only possible when servesDelivery is true, and an order to any other city is refused when it is created. Sorted by name. Send search with at least two letters to narrow the list.
Request
Headers
| Field | Type | Description |
|---|---|---|
Authorizationrequired | string | The access token from Get token, as "Bearer <token>". |
Path parameters
| Field | Type | Description |
|---|---|---|
stateIdrequired | string | The state's id, from List states. |
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/states/73ff99bd-ca0e-4ec7-a60e-f314c57c0046/cities" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Response
Example response · 200
[
{
"id": "23a058c2-9b96-460b-92d8-1196cba2f562",
"name": "Dubai",
"nameAr": "دبي",
"countryId": "cfde4319-9563-4d6a-9afa-0f72dad3c718",
"stateId": "73ff99bd-ca0e-4ec7-a60e-f314c57c0046",
"tier": 1,
"servesPickup": true,
"servesDelivery": true
}
]Errors
| HTTP | Code | Meaning |
|---|---|---|
| 404 | state_not_found | No state has this id. |
Every call can also return the shared errors listed on the Overview page. Overview