Skip to content

Create a terminal under a branch

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

tenantId
required
string
branchId
required
string
Media typeapplication/json
object
code
required

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.

string
Example
00001
name
required

Name to recognize the terminal by in the app and the API; documents do not show it.

string
Example
Caja 1
isDefault

Make 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.

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.

Duplicate terminal code under this branch.