Get country by short name
curl --request GET \
--url https://store.salesive.com/api/v1/country \
--header 'Authorization: Bearer <token>' \
--header 'x-shop-id: <api-key>'import requests
url = "https://store.salesive.com/api/v1/country"
headers = {
"Authorization": "Bearer <token>",
"x-shop-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'x-shop-id': '<api-key>'}
};
fetch('https://store.salesive.com/api/v1/country', 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://store.salesive.com/api/v1/country",
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>",
"x-shop-id: <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://store.salesive.com/api/v1/country"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-shop-id", "<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://store.salesive.com/api/v1/country")
.header("Authorization", "Bearer <token>")
.header("x-shop-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/country")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-shop-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Country retrieved",
"data": {
"name": "Nigeria",
"shortName": "NG",
"phone": "234",
"currency": "NGN"
}
}Country
Get country by short name
Retrieve country information including states and cities by its short name.
GET
/
country
Get country by short name
curl --request GET \
--url https://store.salesive.com/api/v1/country \
--header 'Authorization: Bearer <token>' \
--header 'x-shop-id: <api-key>'import requests
url = "https://store.salesive.com/api/v1/country"
headers = {
"Authorization": "Bearer <token>",
"x-shop-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'x-shop-id': '<api-key>'}
};
fetch('https://store.salesive.com/api/v1/country', 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://store.salesive.com/api/v1/country",
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>",
"x-shop-id: <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://store.salesive.com/api/v1/country"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-shop-id", "<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://store.salesive.com/api/v1/country")
.header("Authorization", "Bearer <token>")
.header("x-shop-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/country")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-shop-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Country retrieved",
"data": {
"name": "Nigeria",
"shortName": "NG",
"phone": "234",
"currency": "NGN"
}
}Request
GET /country?shortName=NG
x-shop-id: {{shopId}}
Headers
| Header | Type | Description |
|---|---|---|
x-shop-id | string | Identify the shop context. |
Query parameters
| Parameter | Type | Description |
|---|---|---|
shortName | string | Country short name (e.g., NG, US, GB). Defaults to NG. |
Request examples
Get Nigeria (default)
GET /country
Get United States
GET /country?shortName=US
Get United Kingdom
GET /country?shortName=GB
Successful response
{
"status": 200,
"success": true,
"message": "Country retrieved",
"data": {
"name": "Nigeria",
"native": "Nigeria",
"phone": "234",
"continent": "AF",
"capital": "Abuja",
"currency": "NGN",
"languages": ["en"],
"emoji": "🇳🇬",
"emojiU": "U+1F1F3 U+1F1EC",
"states": {
"Abia": [
{
"id": "30691",
"name": "Aba",
"state_id": "2647"
}
],
"Lagos": [
{
"id": "30001",
"name": "Ikeja",
"state_id": "2339"
}
]
}
}
}
Error response
{
"status": 404,
"success": false,
"message": "Country not found",
"data": {}
}
Authorizations
JWT issued by the Salesive Store API for authenticated shoppers.
Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.
Headers
Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.
Query Parameters
Country short name (e.g., NG, US, GB). Defaults to NG if not provided.
Was this page helpful?

