List Countries
Get a list of your products on Terraswitch.
GET {{ BASE_URL }}/v1/countries/list
Optional Query Parameters
Property
Data Type
Description
Example
limit
string
Number of records per page
50
page
string
Page number to view
1
order
string
Arrangement of records in descending or ascending order
"asc" or "desc"
import Axios from 'axios';
// set the api url
const API_URL = `${BASE_URL}/v1/countries/list`;
// make request using axios
Axios({
method: "GET",
url: `${API_URL}`,
headers: {
lg: 'en',
ch: 'web'
Authorization: `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
}
}).then((resp) => {
console.log(resp)
}).catch((err) => {
console.log(err)
})
{
"error": false,
"errors": [],
"count": 1,
"total": 238,
"pagination": {
"next": {
"page": 2,
"limit": 1
}
},
"data": [
{
"name": "Cyprus",
"countryCode": "CY",
"code3": "CYP",
"capital": "Nicosia",
"region": "Europe",
"subregion": "Southern Europe",
"currencyImage": "",
"flag": "https://storage.googleapis.com/concreap-buckets/Cyprus_flag",
"states": [
{
"code": "04",
"name": "Ammochostos"
},
{
"code": "06",
"name": "Keryneia"
},
{
"code": "03",
"name": "Larnaka"
},
{
"code": "01",
"name": "Lefkosia"
},
{
"code": "02",
"name": "Lemesos"
},
{
"code": "05",
"name": "Pafos"
}
],
"timezones": [
{
"name": "Asia/Famagusta",
"displayName": "Asia/Famagusta",
"label": "(UTC+02:00)Asia/Famagusta",
"countries": [
"CY"
],
"utcOffset": 120,
"utcOffsetStr": "+02:00"
},
{
"name": "Asia/Nicosia",
"displayName": "Asia/Nicosia",
"label": "(UTC+02:00)Asia/Nicosia",
"countries": [
"CY"
],
"utcOffset": 120,
"utcOffsetStr": "+02:00"
}
],
"createdAt": "2024-01-20T09:21:36.233Z",
"updatedAt": "2024-01-20T09:21:36.233Z"
}
],
"message": "successful",
"status": 200
}
Last updated