Skip to content

Production numbering matrix — next consecutivo per (branch, terminal, docType)

GET
/v1/partner/tenants/{id}/sequences
curl --request GET \
--url https://api.emite.cr/v1/partner/tenants/example/sequences

Read side of the seed below: every active terminal × emission document type, plus the MensajeReceptor types (05/06/07) for the default terminal. Always PRODUCTION, whatever the tenant is currently emitting in: a migrating business sets its numbering BEFORE it goes live, and sandbox counters always start at 1 and are never seeded. Without this read, a numbering screen could neither show where each terminal stands nor tell a decrease apart from a raise before the write fails.

id
required
string
x-partner-key
string

Partner app credential (ecp_*)

Media typeapplication/json
Array<object>
object
branchId
required

Branch UUID.

string format: uuid
branchCode
required

3-digit branch code (001).

string
branchName
required

Branch display name.

string
terminalId
required

Terminal UUID.

string format: uuid
terminalCode
required

5-digit terminal code (00001).

string
terminalName
required

Terminal display name.

string
docType
required

Hacienda document type (01..10).

string
Allowed values: 01 02 03 04 05 06 07 08 09 10
docTypeName
required

Hacienda document type name (always Spanish, never translated).

string
lastConsecutive
required

Last number treated as used (0 if never emitted for this tuple).

number
nextConsecutive
required

Number the next document will carry (= lastConsecutive + 1).

number
hasEmitted
required

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.

boolean
Example
[
{
"branchCode": "001",
"terminalCode": "00001",
"docType": "01"
}
]