Skip to content

Get Country By ID

Get a single country by its ID. Requires authentication.

Endpoint

GET /v1/accounts/country/get-by/?id={country_id}

Authentication

Required

Query Parameters

Parameter Type Required Description
id integer Yes Country ID

Response

Success (200 OK)

{
  "id": 1,
  "name": "Azerbaijan",
  "created": "2025-01-15T10:30:00Z"
}

Error Responses

Not Found (404)

{
  "error": "Country not found"
}

Missing ID Parameter (400)

{
  "message": "Param not send!"
}

Unauthorized (401)

{
  "error": "Missing token on header!"
}

Example Request

curl -X GET "https://api.luxmart.site/v1/accounts/country/get-by/?id=1" \
  -H "Authorization: Token your_access_token"

Notes

  • Only returns non-deleted countries
  • Returns 404 if country is not found or has been deleted