List Regions
List Regions
GET
https://api.ocamba.com/v2/ocamba/regions
Returns a list of RegionsQuery parameters
parametersResponse schemas
›
200
application/json
curl -X GET \
"https://api.ocamba.com/v2/ocamba/regions" \
-H "Authorization: Bearer {TOKEN}"const url = 'https://api.ocamba.com/v2/ocamba/regions';
const options = {
method: 'GET',
headers: {
Authorization: `Bearer {TOKEN}`
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v2/ocamba/regions");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
200 OK
{
"total": 3150,
"items": [
{
"id": "831053",
"name": "Kosovo",
"country_code": "RS",
"full_name": "Kosovo, RS"
},
{
"id": "2661876",
"name": "Aargau",
"country_code": "CH",
"full_name": "Aargau, CH"
},
{
"id": "2565340",
"name": "Abia State",
"country_code": "NG",
"full_name": "Abia State, NG"
},
{
"id": "11153151",
"name": "Abidjan",
"country_code": "CI",
"full_name": "Abidjan, CI"
}
]
}
Responses
Tip
Searchable field is name, id and full_name.
Sortable fields are name, id, country_code and full_name.
Filterable fields are id, name, country_code and full_name.