Create a terminal under a branch
const url = 'https://api.emite.cr/v1/tenants/example/branches/example/terminals';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"code":"00001","name":"Caja 1","isDefault":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.emite.cr/v1/tenants/example/branches/example/terminals \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "code": "00001", "name": "Caja 1", "isDefault": true }'A terminal (caja / POS) keeps its own consecutivo counters: its 5-digit code follows the branch code in every consecutivo (and so in every clave) issued from it — map each physical POS device to its own terminal so devices never share a counter. The code is zero-padded and can never be changed afterwards. With isDefault: true the new terminal becomes the one a document of this branch uses when it names no terminalCode, and the branch's previous default loses the flag. The code must be unique within the branch; 404 for a branch that is not the company's. Requires terminals:write, which API keys cannot hold.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Terminal (caja / POS) number, 1–5 digits, zero-padded to 5 (2 → 00002): the five digits after the branch code in every consecutivo issued from it. Unique within its branch, and immutable once created.
Example
00001Name to recognize the terminal by in the app and the API; documents do not show it.
Example
Caja 1Make it the branch's default terminal — the one a document of this branch uses when it names no terminalCode — taking the flag from the previous one. Defaults to false.
Example
trueResponses
Section titled “Responses”object
Id of the terminal — the {terminalId} of the terminal routes.
Id of the branch the terminal belongs to.
Terminal number, 5 digits: the five digits after the branch code in every consecutivo issued from it, and the terminalCode a document names to be issued from it. Unique within its branch; fixed once created.
Name of the terminal, for the app and the API; documents do not show it.
Whether it is its branch's default terminal — the one a document of that branch uses when it names no terminalCode. At most one per branch; with none, creating a document of that branch that names no terminal answers 412 TENANT_NOT_CONFIGURED.
Example
{ "code": "00001", "name": "Terminal Principal"}Missing or invalid JWT / API key
Tenant boundary violation or insufficient scope.
Duplicate terminal code under this branch.