Skip to content

Get All Countries

Get a paginated list of all countries. Public endpoint.

Endpoint

GET /v1/accounts/country/

Authentication

Not required (public endpoint)

Query Parameters

Parameter Type Required Description
page integer Yes Page number (starts at 1)
count integer Yes Items per page (max 100)
search string No Search by country name (case-insensitive)

Response

Success (200 OK)

{
  "count": 10,
  "data": [
    {
      "id": 1,
      "name": "Azerbaijan",
      "created": "2025-01-15T10:30:00Z"
    },
    {
      "id": 2,
      "name": "Turkey",
      "created": "2025-01-15T10:30:00Z"
    }
  ]
}

Error Responses

Pagination Error (400)

{
  "error": "page cannot be zero or minus"
}

Example Request

curl -X GET "https://api.luxmart.site/v1/accounts/country/?page=1&count=20&search=azer"

Notes

  • Only returns non-deleted countries
  • Search matches against country name
  • Results are ordered by ID descending (newest first)
  • This is a public endpoint, no authentication required