curl -X POST http://localhost/fss/public/api/v1/countries/index \
-H "Content-Type: application/json" \
-d '{}'
const response = await fetch('http://localhost/fss/public/api/v1/countries/index', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({})
});
const data = await response.json();
{
"status": "success",
"data": [
{
"id": 1,
"name": "United States",
"code": "US"
},
{
"id": 2,
"name": "Canada",
"code": "CA"
}
]
}
{
"status": "error",
"message": "Failed to fetch countries"
}
Get Countries
Get list of available countries
POST
/
api
/
v1
/
countries
/
index
curl -X POST http://localhost/fss/public/api/v1/countries/index \
-H "Content-Type: application/json" \
-d '{}'
const response = await fetch('http://localhost/fss/public/api/v1/countries/index', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({})
});
const data = await response.json();
{
"status": "success",
"data": [
{
"id": 1,
"name": "United States",
"code": "US"
},
{
"id": 2,
"name": "Canada",
"code": "CA"
}
]
}
{
"status": "error",
"message": "Failed to fetch countries"
}
Get Countries
Get a list of all available countries.Endpoint
POST /api/v1/countries/index
This endpoint does not require authentication
Headers
string
required
Your API access token. You can also set this globally in the API playground.
string
required
The platform making the request:
WEB, IOS, or ANDROID.Request Body
{}
Response
string
Success status
array
Array of countries
curl -X POST http://localhost/fss/public/api/v1/countries/index \
-H "Content-Type: application/json" \
-d '{}'
const response = await fetch('http://localhost/fss/public/api/v1/countries/index', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({})
});
const data = await response.json();
{
"status": "success",
"data": [
{
"id": 1,
"name": "United States",
"code": "US"
},
{
"id": 2,
"name": "Canada",
"code": "CA"
}
]
}
{
"status": "error",
"message": "Failed to fetch countries"
}
