Contains API calls that can be used against the City entity.
1.Get Cities
Returns list of all cities for a given province.In order to access this endpoint ensure that you do a GET request with an Authorization header containing your access token.
Headers:
Authorization : {token}
Result codes
403 Forbidden
200 OK
400 Bad request
500 Internal server error
Result
City object returned will have the following fields:
Name | Type | Description |
---|---|---|
Id | int | City Id |
CountryId | int | Country Id |
ProvinceId | int | Province Id |
Name | string | City Name |
Response format
[
{
"Id": 375,
"Name": "Cape Town",
"ProvinceId": 9,
"CountryId": 1
},
{
"Id": 1368,
"Name": "Asokoro",
"ProvinceId": 11,
"CountryId": 361
},
{
"Id": 2254,
"Name": "New York City",
"ProvinceId": 80,
"CountryId": 432
}
]
2.Get Cities
Returns list of all cities in South Africa
In order to access this endpoint ensure that you do a GET request with an Authorization header containing your access token.
Parameters:
id: string - province id
Headers:
Authorization : {token}
Result codes
403 Forbidden
200 OK
400 Bad request
500 Internal server error
Result
City object returned will have the following fields:
Name | Type | Description |
---|---|---|
Id | int | Id |
Name | string | City Name |
ProvinceId | int | ProvinceId |
CountryId | int | CountryId |
Response format
[
{
"Id": 2253,
"Name": "Buffalo",
"ProvinceId": 80,
"CountryId": 432
},
{
"Id": 2254,
"Name": "New York City",
"ProvinceId": 80,
"CountryId": 432
},
{
"Id": 2255,
"Name": "Rochester",
"ProvinceId": 80,
"CountryId": 432
}
]