Get Country by Code
curl --request GET \
--url https://qa-lynx.nayax.com/operational/v1/countries/{CountryCode} \
--header 'Authorization: Bearer <token>'import requests
url = "https://qa-lynx.nayax.com/operational/v1/countries/{CountryCode}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://qa-lynx.nayax.com/operational/v1/countries/{CountryCode}', 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://qa-lynx.nayax.com/operational/v1/countries/{CountryCode}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://qa-lynx.nayax.com/operational/v1/countries/{CountryCode}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://qa-lynx.nayax.com/operational/v1/countries/{CountryCode}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-lynx.nayax.com/operational/v1/countries/{CountryCode}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"CountryID": 123,
"CountryCode": "<string>",
"CountryName": "<string>",
"CountryDialingCode": 123,
"CountryReference": 123,
"CountryISONumericCode": 123
}Lookups
Get Country by Code
Retrieves the details of a specific country identified by CountryCode.
Get Country by Code
curl --request GET \
--url https://qa-lynx.nayax.com/operational/v1/countries/{CountryCode} \
--header 'Authorization: Bearer <token>'import requests
url = "https://qa-lynx.nayax.com/operational/v1/countries/{CountryCode}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://qa-lynx.nayax.com/operational/v1/countries/{CountryCode}', 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://qa-lynx.nayax.com/operational/v1/countries/{CountryCode}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://qa-lynx.nayax.com/operational/v1/countries/{CountryCode}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://qa-lynx.nayax.com/operational/v1/countries/{CountryCode}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-lynx.nayax.com/operational/v1/countries/{CountryCode}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"CountryID": 123,
"CountryCode": "<string>",
"CountryName": "<string>",
"CountryDialingCode": 123,
"CountryReference": 123,
"CountryISONumericCode": 123
}Authorizations
Enter your Bearer token. It's required to authenticate API requests.
Path Parameters
The unique code of the country to be retrieved.
Response
200 - application/json
The details of the country associated with the specified code.
Represents detailed information about a country, including its identifiers, name, and dialing code.
The unique identifier of the country.
The ISO 3166-1 alpha-2 code of the country (e.g., "US" for the United States).
The full name of the country.
The international dialing code for the country (e.g., 1 for the United States).
An internal reference number associated with the country.
The ISO 3166-1 numeric code of the country (e.g., 840 for the United States).
Was this page helpful?