Skip to Content
MySagra 1.4.0 is released 🎉
API ReferenceCash Registers

Cash Registers

Manage cash registers used at the point of sale. Each cash register has a default printer and can be enabled or disabled.

Cash Register Object

{ "id": "clx1a2b3c4d5e6f7g8h9i0j1", "name": "Bar Cash Register", "enabled": true, "defaultPrinterId": "clx1a2b3c4d5e6f7g8h9i0j1" }
FieldTypeDescription
idstringUnique identifier (CUID)
namestringCash register name
enabledbooleanWhether the cash register is active
defaultPrinterIdstringDefault printer ID

GET /v1/cash-registers

Retrieve all cash registers.

Authentication: Bearer token

Query Parameters

ParameterTypeDescription
includestringSet to printer to include printer details
enabledbooleanFilter by enabled status

Response 200 OK

[ { "id": "clx1a2b3c4d5e6f7g8h9i0j1", "name": "Bar Cash Register", "enabled": true, "defaultPrinterId": "clx1a2b3c4d5e6f7g8h9i0j1" } ]

GET /v1/cash-registers/{id}

Retrieve a single cash register by ID.

Authentication: Bearer token

Path Parameters

ParameterTypeDescription
idstringCash register ID (CUID)

Query Parameters

ParameterTypeDescription
includestringSet to printer to include printer details

Response 200 OK

Returns a Cash Register Object.

Errors

StatusDescription
404Cash register not found

POST /v1/cash-registers

Create a new cash register.

Authentication: Bearer token (admin)

Request Body

{ "name": "Bar Cash Register", "enabled": true, "defaultPrinterId": "clx1a2b3c4d5e6f7g8h9i0j1" }
FieldTypeRequiredDescription
namestringYesCash register name
enabledbooleanNoActive status (default: true)
defaultPrinterIdstringYesDefault printer ID

Response 201 Created

Returns the created Cash Register Object.

Errors

StatusDescription
400Invalid input

PUT /v1/cash-registers/{id}

Update an existing cash register.

Authentication: Bearer token (admin)

Path Parameters

ParameterTypeDescription
idstringCash register ID (CUID)

Request Body

Same as POST.

Response 200 OK

Returns the updated Cash Register Object.

Errors

StatusDescription
404Cash register not found

PATCH /v1/cash-registers/{id}

Update the enabled status of a cash register.

Authentication: Bearer token (admin)

Path Parameters

ParameterTypeDescription
idstringCash register ID (CUID)

Request Body

{ "enabled": false }
FieldTypeRequiredDescription
enabledbooleanYesNew enabled status

Response 200 OK

Returns the updated Cash Register Object.

Errors

StatusDescription
404Cash register not found

DELETE /v1/cash-registers/{id}

Delete a cash register.

Authentication: Bearer token (admin)

Path Parameters

ParameterTypeDescription
idstringCash register ID (CUID)

Response 200 OK

Errors

StatusDescription
404Cash register not found
Last updated on