Skip to main content
GET
/
api
/
v1
/
lookups
/
municipalities
Get Municipalities
curl --request GET \
  --url https://api.example.com/api/v1/lookups/municipalities \
  --header 'Authorization: <authorization>' \
  --header 'X-Factus-Token: <x-factus-token>'
{
  "400": {},
  "401": {},
  "success": true,
  "message": "<string>",
  "data": [
    {
      "id": 123,
      "name": "<string>",
      "code": "<string>",
      "department": "<string>"
    }
  ],
  "errors": "<any>"
}

Overview

This endpoint returns a complete list of Colombian municipalities. Each municipality includes its unique identifier, name, code, and the department it belongs to.

Authentication

This endpoint requires both Bearer token authentication and a Factus API token.
Authorization
string
required
Bearer token for API authenticationFormat: Bearer <your_access_token>
X-Factus-Token
string
required
Your Factus API token for accessing the e-invoicing platform

Response

Returns a standardized API response containing an array of municipality objects.
success
boolean
Indicates if the request was successful
message
string
Human-readable message about the operation result
data
array
Array of municipality objects
id
integer
Unique identifier for the municipality
name
string
Name of the municipality
code
string
Official municipality code
department
string
Name of the department the municipality belongs to
errors
any
default:"null"
Error details if the request failed

Example Request

cURL
curl --request GET \
  --url https://api.yourapp.com/api/v1/lookups/municipalities \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
  --header 'X-Factus-Token: your_factus_token_here'

Example Response

200 - Success
{
  "success": true,
  "message": "Municipios obtenidos exitosamente",
  "data": [
    {
      "id": 1,
      "name": "Bogotá D.C.",
      "code": "11001",
      "department": "Bogotá D.C."
    },
    {
      "id": 2,
      "name": "Medellín",
      "code": "05001",
      "department": "Antioquia"
    },
    {
      "id": 3,
      "name": "Cali",
      "code": "76001",
      "department": "Valle del Cauca"
    },
    {
      "id": 4,
      "name": "Barranquilla",
      "code": "08001",
      "department": "Atlántico"
    }
  ],
  "errors": null
}
400 - Bad Request
{
  "detail": "Error al obtener datos de Factus: Invalid token"
}
401 - Unauthorized
{
  "detail": "Not authenticated"
}

Error Responses

400
Bad Request
Invalid request or error communicating with Factus API. Check the detail field for specific error information.
401
Unauthorized
Missing or invalid authentication credentials. Ensure both Authorization header and X-Factus-Token are provided.

Build docs developers (and LLMs) love