Skip to main content

Get Areas

curl https://api.example.com/api/catalogos/areas \
  -H "Authorization: Bearer <your-token>"
Retrieves a list of all operational areas ordered alphabetically by name.

HTTP Request

GET /api/catalogos/areas

Authentication

This endpoint requires authentication via Bearer token.

Headers

Authorization
string
required
Bearer token for authentication

Response

Returns an array of area objects.
id
number
Unique identifier for the area
nombre
string
Name of the operational area

Example Response

[
  {
    "id": 1,
    "nombre": "Area Norte"
  },
  {
    "id": 2,
    "nombre": "Area Sur"
  },
  {
    "id": 3,
    "nombre": "Area Centro"
  }
]

Error Response

{
  "error": "Error message"
}

Implementation Details

  • Data is fetched from the areas_operacion table
  • Results are ordered alphabetically by nombre
  • Only active areas are returned

Build docs developers (and LLMs) love