Get public list of enabled countries
GET/company/country/
Returns a paginated list of countries enabled in the system. This endpoint provides the countries available for use in forms, filters, and geographic selections.
Objective
To provide frontend applications and external integrations with an updated list of countries supported by the platform for company registration, address creation, and logistics operations.
Use Cases
- Populating country selectors in registration forms
- Displaying available service regions to users
- Filtering auctions or deliveries by geographic area
- Validating country codes provided by users
Authentication
This is a PUBLIC endpoint. No authentication is required.
Important Notes
- Only returns countries with
enabled: true - Countries with
deleted: trueorenabled: falseare excluded - The fields
_id,deleted,enabled,createdAt,updatedAt,__vare filtered from the response - Only the
codefield is guaranteed in all records - The optional fields
nameandisomay be present for some countries - Pagination is implemented with mongoose-paginate-v2
- The default page size comes from
process.env.ITEMS_PAGE(typically 25)
Example Request:
# Get the first page with the default limit (25)
GET /company/country/
# Get the second page with 10 results
GET /company/country/?page=2&limit=10
# Get all available countries (if less than 50)
GET /company/country/?limit=50
Example Response:
{
status: 200,
data: {
docs: [
{code: es},
{code: pt},
{code: fr},
{code: de, name: Germany, iso: DEU}
],
totalDocs: 22,
limit: 25,
page: 1,
totalPages: 1,
pagingCounter: 1,
hasPrevPage: false,
hasNextPage: false,
prevPage: null,
nextPage: null
}
}
Request
Responses
- 200
- 500
Successful operation. Returns the paginated list of enabled countries.
The response includes the complete pagination metadata from mongoose-paginate-v2.
Response Headers
Internal server error