Skip to Content
v1.5Official documentation for the LX CloudPos API · stable in production
v1.5 (current)Endpoint referenceNext consecutive number

Next consecutive number

GET /api/v1/consecutivos/proximo?tipo={01|02|03|04}

Returns the next consecutive number that would be assigned to a document of the given type, without consuming it (it doesn’t affect the sequence). Useful for showing the user a tentative number before confirming issuance.

Authentication

AttributeValue
Required scopefacturas:read

Query params

ParameterValuesDescription
tipo01, 02, 03, 04Document type

Responses

200 OK

{ "tipo": "01", "proximo": 1234 }

400 Bad Request

{ "error": "Tipo no válido. Use 01 (FE), 02 (ND), 03 (NC) o 04 (TE)." }

When to use it

  • Show the user the estimated number before confirming the sale.
  • Pre-validate the integrator’s internal pipeline.
  • Sync with accounting systems that need to know the current range.

Caution

This is an estimated value. If another process issues a document between the query and the issuance, the actual number can differ. Critical logic must not be based on this value; the actual numeroConsecutivo must be taken from the response of POST /facturas.