Skip to main content
GET
/
api
/
v1
/
lookups
/
numbering-ranges
Get Numbering Ranges
curl --request GET \
  --url https://api.example.com/api/v1/lookups/numbering-ranges \
  --header 'Authorization: <authorization>' \
  --header 'X-Factus-Token: <x-factus-token>'
{
  "400": {},
  "401": {},
  "success": true,
  "message": "<string>",
  "data": [
    {
      "id": 123,
      "document": "<string>",
      "prefix": "<string>",
      "from": 123,
      "to": 123,
      "current": 123,
      "resolution_number": "<string>",
      "technical_key": "<string>",
      "is_active": true
    }
  ],
  "errors": "<any>"
}

Overview

This endpoint returns a list of available numbering ranges configured in the Factus platform. Numbering ranges are used to assign consecutive numbers to electronic invoices and other documents according to DIAN regulations.

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 numbering range objects.
success
boolean
Indicates if the request was successful
message
string
Human-readable message about the operation result
data
array
Array of numbering range objects
id
integer
Unique identifier for the numbering range
document
string
Type of document this range applies to (e.g., “Invoice”, “Credit Note”)
prefix
string
Prefix for document numbers in this range
from
integer
Starting number of the range
to
integer
Ending number of the range
current
integer
Current number in the sequence
resolution_number
string
DIAN resolution number authorizing this range
technical_key
string
Technical key associated with the numbering range
is_active
boolean
Whether this numbering range is currently active
errors
any
default:"null"
Error details if the request failed

Example Request

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

Example Response

200 - Success
{
  "success": true,
  "message": "Rangos de numeración obtenidos exitosamente",
  "data": [
    {
      "id": 1,
      "document": "Invoice",
      "prefix": "FV",
      "from": 1,
      "to": 5000,
      "current": 125,
      "resolution_number": "18760000001",
      "technical_key": "abc123def456",
      "is_active": true
    },
    {
      "id": 2,
      "document": "Credit Note",
      "prefix": "NC",
      "from": 1,
      "to": 1000,
      "current": 15,
      "resolution_number": "18760000002",
      "technical_key": "xyz789uvw012",
      "is_active": true
    },
    {
      "id": 3,
      "document": "Invoice",
      "prefix": "FV-OLD",
      "from": 1,
      "to": 1000,
      "current": 1000,
      "resolution_number": "18760000000",
      "technical_key": null,
      "is_active": false
    }
  ],
  "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.

Usage Notes

  • Only active numbering ranges (is_active: true) should be used for creating new documents
  • The current field indicates the next number that will be assigned
  • Each range has a specific DIAN resolution number that authorizes its use
  • When a range reaches its to limit, a new range must be configured with a new DIAN resolution

Build docs developers (and LLMs) love