This API lists all countries.
| Property | Value |
|---|---|
| URL | {{APP_URL}}/api/v1/countries |
| HTTP Method | GET |
| Content Type | application/json |
| Authentication | APIKEY header |
This endpoint has no URL or content parameters.
Below is an example HTTP raw request for the API request.
GET {{APP_URL}}/api/v1/countries
Content-Type: application/json
APIKEY: {{APIKEY}}
On a successful request, the API will return a response like the following:
{
"status": true,
"message": null,
"data": [
{
"id": 1,
"code": 4,
"name": "Afghanistan",
"iso2": "AF",
"iso3": "AFG",
"postalCodePattern": null,
"isPostalCodeRequired": true
},
{
"id": 2,
"code": 248,
"name": "Aland Islands",
"iso2": "AX",
"iso3": "ALA",
"postalCodePattern": null,
"isPostalCodeRequired": true
},
{
"id": 83,
"code": 276,
"name": "Germany",
"iso2": "DE",
"iso3": "DEU",
"postalCodePattern": null,
"isPostalCodeRequired": true
}
]
}
If the API request fails, the API will return an error response like the following:
{
"status": false,
"errors": [
{
"message": "Unknown error"
}
]
}