Get Countries
curl --request GET \
--url https://waas-staging.embedly.ng/api/v1/utilities/countries/get \
--header 'x-api-key: <api-key>'import requests
url = "https://waas-staging.embedly.ng/api/v1/utilities/countries/get"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://waas-staging.embedly.ng/api/v1/utilities/countries/get', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://waas-staging.embedly.ng/api/v1/utilities/countries/get",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://waas-staging.embedly.ng/api/v1/utilities/countries/get"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://waas-staging.embedly.ng/api/v1/utilities/countries/get")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://waas-staging.embedly.ng/api/v1/utilities/countries/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "00",
"success": true,
"message": "Retrieved successfully",
"data": [
{
"id": "08dd5d6c-a9b4-452d-8872-4ada3d46b506",
"name": "United States",
"countryCodeTwo": "US",
"countryCodeThree": "USA"
},
{
"id": "08dd7754-454d-4ab0-8ed1-5eed930ad067",
"name": "Ghana",
"countryCodeTwo": "GH",
"countryCodeThree": "GHA"
},
{
"id": "08dd7764-e2ab-455e-8359-84809550f17c",
"name": "Togo",
"countryCodeTwo": "TG",
"countryCodeThree": "TGO"
},
{
"id": "08dd782b-134c-4e7c-8726-4524b8e41fa8",
"name": "Brazil",
"countryCodeTwo": "BR",
"countryCodeThree": "BRA"
},
{
"id": "c15ad9ae-c4d7-4342-b70f-de5508627e3b",
"name": "Nigeria",
"countryCodeTwo": "NG",
"countryCodeThree": "NGA"
}
]
}
{
"code": "400",
"success": false,
"message": "Invalid Admin Key",
"data": null
}
{
"code": "500",
"success": false,
"message": "An unexpected error occurred",
"data": null
}
Utils
Get Countries
The endpoint allows you to retrieves the list and details of Countries.
GET
/
utilities
/
countries
/
get
Get Countries
curl --request GET \
--url https://waas-staging.embedly.ng/api/v1/utilities/countries/get \
--header 'x-api-key: <api-key>'import requests
url = "https://waas-staging.embedly.ng/api/v1/utilities/countries/get"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://waas-staging.embedly.ng/api/v1/utilities/countries/get', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://waas-staging.embedly.ng/api/v1/utilities/countries/get",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://waas-staging.embedly.ng/api/v1/utilities/countries/get"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://waas-staging.embedly.ng/api/v1/utilities/countries/get")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://waas-staging.embedly.ng/api/v1/utilities/countries/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "00",
"success": true,
"message": "Retrieved successfully",
"data": [
{
"id": "08dd5d6c-a9b4-452d-8872-4ada3d46b506",
"name": "United States",
"countryCodeTwo": "US",
"countryCodeThree": "USA"
},
{
"id": "08dd7754-454d-4ab0-8ed1-5eed930ad067",
"name": "Ghana",
"countryCodeTwo": "GH",
"countryCodeThree": "GHA"
},
{
"id": "08dd7764-e2ab-455e-8359-84809550f17c",
"name": "Togo",
"countryCodeTwo": "TG",
"countryCodeThree": "TGO"
},
{
"id": "08dd782b-134c-4e7c-8726-4524b8e41fa8",
"name": "Brazil",
"countryCodeTwo": "BR",
"countryCodeThree": "BRA"
},
{
"id": "c15ad9ae-c4d7-4342-b70f-de5508627e3b",
"name": "Nigeria",
"countryCodeTwo": "NG",
"countryCodeThree": "NGA"
}
]
}
{
"code": "400",
"success": false,
"message": "Invalid Admin Key",
"data": null
}
{
"code": "500",
"success": false,
"message": "An unexpected error occurred",
"data": null
}
Response
{
"code": "00",
"success": true,
"message": "Retrieved successfully",
"data": [
{
"id": "08dd5d6c-a9b4-452d-8872-4ada3d46b506",
"name": "United States",
"countryCodeTwo": "US",
"countryCodeThree": "USA"
},
{
"id": "08dd7754-454d-4ab0-8ed1-5eed930ad067",
"name": "Ghana",
"countryCodeTwo": "GH",
"countryCodeThree": "GHA"
},
{
"id": "08dd7764-e2ab-455e-8359-84809550f17c",
"name": "Togo",
"countryCodeTwo": "TG",
"countryCodeThree": "TGO"
},
{
"id": "08dd782b-134c-4e7c-8726-4524b8e41fa8",
"name": "Brazil",
"countryCodeTwo": "BR",
"countryCodeThree": "BRA"
},
{
"id": "c15ad9ae-c4d7-4342-b70f-de5508627e3b",
"name": "Nigeria",
"countryCodeTwo": "NG",
"countryCodeThree": "NGA"
}
]
}
{
"code": "400",
"success": false,
"message": "Invalid Admin Key",
"data": null
}
{
"code": "500",
"success": false,
"message": "An unexpected error occurred",
"data": null
}
⌘I