Skip to main content

Get all countries including disabled ones (Admin only)

GET 

/company/country/all

Returns a paginated list of ALL countries in the system, including those with enabled: false or deleted: true. This endpoint is intended for the administrative management of the country catalog.

Objective

To provide system administrators with complete visibility of all countries for management purposes, including the ability to view disabled or logically deleted records.

Use Cases

  • Country management interface in the admin panel
  • Review disabled countries before re-enabling them
  • Audit changes to the country catalog over time
  • Restore logically deleted countries

Authentication

Required: Administrator role (admin or dev) Middleware: m.isAdmin

Differences from the Public Endpoint

  • GET /company/country/: Returns only countries with enabled: true (public)
  • GET /company/country/all: Returns ALL countries including disabled ones (admin only)

Example Request:

GET /company/country/all?page=1&limit=50
Authorization: Bearer {admin_jwt_token}

Example Response:

{
status: 200,
data: {
docs: [
{code: es},
{code: pt},
{code: xx}
],
totalDocs: 30,
limit: 50,
page: 1,
totalPages: 1,
pagingCounter: 1,
hasPrevPage: false,
hasNextPage: false,
prevPage: null,
nextPage: null
}
}

Request

Responses

Operation successful

Response Headers