Skip to content

Countries ​

Part of the Support API. Base URL https://your-domain.com/admin/api/v1 — replace the host with your own installation and the token placeholder with a real Bearer token (see Authentication).

List countries ​

GET /admin/api/v1/support/countries

Retrieve a paginated list of countries with filtering and sorting

🔒 Requires a valid Bearer token.

Query parameters

ParameterTypeRequiredDescriptionExample
includestringNoComma-separated list of relationships to include. Available options: currency, statescurrency
filter[id]stringNoComma-separated list of IDs to filter by
filter[name]stringNoFilter by country name (partial match)
filter[code]stringNoFilter by country code (exact match)
filter[phone_code]stringNoFilter by phone code (partial match)
filter[currency_id]integerNoFilter by currency ID
sortstringYesSort fieldname
pageintegerYesPage number1
bash
curl -X GET "https://your-domain.com/admin/api/v1/support/countries?include=currency&sort=name&page=1" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/support/countries?include=currency&sort=name&page=1", {
  method: "GET",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/support/countries?include=currency&sort=name&page=1', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/support/countries?include=currency&sort=name&page=1"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "data": [
    {
      "id": 1,
      "name": "Andorra",
      "code": "AD",
      "phone_code": "376",
      "state_required": false,
      "zip_required": true,
      "currency_id": 125,
      "created_at": "2026-10-09T07:12:47.000000Z",
      "updated_at": "2026-10-09T07:12:47.000000Z"
    },
    {
      "id": 1,
      "name": "Andorra",
      "code": "AD",
      "phone_code": "376",
      "state_required": false,
      "zip_required": true,
      "currency_id": 125,
      "created_at": "2026-10-09T07:12:47.000000Z",
      "updated_at": "2026-10-09T07:12:47.000000Z"
    }
  ],
  "links": {
    "first": "/?page=1",
    "last": "/?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "page": null,
        "active": false
      },
      {
        "url": "/?page=1",
        "label": "1",
        "page": 1,
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "page": null,
        "active": false
      }
    ],
    "path": "/",
    "per_page": 10,
    "to": 2,
    "total": 2
  }
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Show country ​

GET /admin/api/v1/support/countries/{id}

Retrieve a specific country by its ID

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
idintegerYesThe country ID

Query parameters

ParameterTypeRequiredDescriptionExample
includestringNoComma-separated list of relationships to include. Available options: currency, statescurrency,states
bash
curl -X GET "https://your-domain.com/admin/api/v1/support/countries/{id}?include=currency%2Cstates" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/support/countries/{id}?include=currency%2Cstates", {
  method: "GET",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/support/countries/{id}?include=currency%2Cstates', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/support/countries/{id}?include=currency%2Cstates"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "data": {
    "id": 1,
    "name": "Andorra",
    "code": "AD",
    "phone_code": "376",
    "state_required": false,
    "zip_required": true,
    "currency_id": 125,
    "created_at": "2026-10-09T07:12:47.000000Z",
    "updated_at": "2026-10-09T07:12:47.000000Z"
  }
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Released under the MIT License.