Returns list all provinces
In order to access this endpoint ensure that you do a GET request with an Authorization header containing your access token.
Get all Provinces
Returns list of all provinces in the system
Headers:
Authorization : {token}
Result codes
403 Forbidden
200 OK
400 Bad request
500 Internal server error
Result
Province object returned will have the following fields:
Field Name | Type | Description |
---|---|---|
Id | int | Province Id |
Name | string | Province Name |
CountryId | int | This is the country Id 1 = South Africa |
Response format
[
{
"Id": 8,
"Name": "Northern Cape",
"CountryId": 1
},
{
"Id": 9,
"Name": "Western Cape",
"CountryId": 1
},
{
"Id": 10,
"Name": "Abia",
"CountryId": 361
},
{
"Id": 11,
"Name": "Abuja",
"CountryId": 361
},
]
Get provinces per country
Returns list or provinces in a country
Parameters:
id: string - country id
Headers:
Authorization : {token}
Result codes
403 Forbidden
200 OK
400 Bad request
500 Internal server error
Result
Province object returned will have the following fields:
Field Name | Type | Description |
---|---|---|
Id | int | Province Id |
Name | string | Province Name |
CountryId | int | This is the country Id 1 = South Africa |
Response format
[
{
"Id": 46,
"Name": "Alabama",
"CountryId": 432
},
{
"Id": 47,
"Name": "Alaska",
"CountryId": 432
},
{
"Id": 48,
"Name": "American Samoa",
"CountryId": 432
},
{
"Id": 49,
"Name": "Arizona",
"CountryId": 432
}
]