List Countries
List Countries
GET
https://api.ocamba.com/v2/ocamba/countries
Returns a list of CountriesQuery parameters
parametersResponse schemas
›
200
application/json
curl -X GET \
"https://api.ocamba.com/v2/ocamba/countries" \
-H "Authorization: Bearer {TOKEN}"
const url = 'https://api.ocamba.com/v2/ocamba/countries';
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/countries");
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": 256,
"items": [
{
"id": "AF",
"code": "AF",
"code3": "AFG",
"name": "Afghanistan"
},
{
"id": "AX",
"code": "AX",
"code3": "AXA",
"name": "Aland Islands"
},
{
"id": "DZ",
"code": "DZ",
"code3": "DZA",
"name": "Algeria"
}
]
}
Responses
Tip
Searchable field is name. Sortable fields are: name, code, code3 and id.
Filterable fields are: name, code, code3 and id.