Update a terminal
const url = 'https://api.emite.cr/v1/tenants/example/branches/example/terminals/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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 PATCH \ --url https://api.emite.cr/v1/tenants/example/branches/example/terminals/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Caja 1", "isDefault": true }'Only name and isDefault can change. The code is immutable — it is part of every consecutivo already issued from the terminal — and a body that sends it is rejected with 400. isDefault: true makes it the branch's default terminal and clears the flag on the previous one. isDefault: false on the current default only clears it: the branch is then left with NO default terminal, and creating a document of that branch that names no terminalCode answers 412 TENANT_NOT_CONFIGURED until another terminal is made the default. 404 for a terminal or 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
New name for the terminal. Omit it to keep the current one.
Example
Caja 1true makes it the branch's default terminal (the one a document of the branch uses when it names no terminalCode) and clears the flag on the previous one. false only clears it here: a branch left with no default terminal cannot emit a document that names none (412 TENANT_NOT_CONFIGURED).
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.
Terminal not found.