Numbering matrix — consecutivo counters per (branch, terminal, docType)
const url = 'https://api.emite.cr/v1/tenants/example/sequences';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.emite.cr/v1/tenants/example/sequences \ --header 'Authorization: Bearer <token>'Returns the next consecutivo for every active terminal × emission document type (01, 02, 03, 04, 08, 09, 10), plus the MensajeReceptor types (05/06/07) for the terminal they are numbered from — the default branch's default terminal. Default branch first, then by code. Scoped to the request's environment (a session's active one, or the API key's); a cell that never emitted reports nextConsecutive: 1.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Tenant UUID.
Responses
Section titled “Responses”object
Branch UUID.
3-digit branch code (001).
Branch display name.
Terminal UUID.
5-digit terminal code (00001).
Terminal display name.
Hacienda document type (01..10).
Hacienda document type name (always Spanish, never translated).
Last number treated as used (0 if never emitted for this tuple).
Number the next document will carry (= lastConsecutive + 1).
True when this tuple already has a counter row with last_consecutive > 0. Advisory only (raising the counter is always allowed); the UI shows a "affects future docs only" hint.
Example
[ { "branchCode": "001", "terminalCode": "00001", "docType": "01" }]Missing or invalid JWT / API key
Tenant boundary violation or insufficient scope.