Skip to content

Update a terminal

PATCH
/v1/tenants/{tenantId}/branches/{branchId}/terminals/{terminalId}
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.

tenantId
required
string
branchId
required
string
terminalId
required
string
Media typeapplication/json
object
name

New name for the terminal. Omit it to keep the current one.

string
Example
Caja 1
isDefault

true 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).

boolean
Example
true
Media typeapplication/json
object
id
required

Id of the terminal — the {terminalId} of the terminal routes.

string format: uuid
branchId
required

Id of the branch the terminal belongs to.

string format: uuid
code
required

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.

string
name
required

Name of the terminal, for the app and the API; documents do not show it.

string
isDefault
required

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.

boolean
Example
{
"code": "00001",
"name": "Terminal Principal"
}

Missing or invalid JWT / API key

Tenant boundary violation or insufficient scope.

Terminal not found.