Skip to content

Powered by Grav CMS + Helios Theme

Point of sale registers and devices (add-on)

The registers a till sells from, their card readers, and the browsers paired to them.

Provided by the KahunaCart Point of Sale plugin. Everything here takes kahunacart.pos.manage. A register's ref is printed on its orders and receipts and can't change once the register has sold. A register that has had a shift is switched off, never deleted. A device's token is never returned: pairing is done at the till by a manager. See Registers and devices.

List the registers

GET /api/v1/kahunacart/pos/admin/registers Permission kahunacart.pos.manage

Every till register in the store: its name, its short ref (printed on orders and receipts), the pickup location it sells at, its card reader, how it offers receipts, whether it is switched on, the shift open on it now and the devices paired to it. Also answers the store's pickup locations, the places a register can sell at.

Get a register

GET /api/v1/kahunacart/pos/admin/registers/{id} Permission kahunacart.pos.manage

One register, as list_registers gives it.

Parameters

Name Type Description
id required integer The register id.

Add a register

POST /api/v1/kahunacart/pos/admin/registers Permission kahunacart.pos.manage

Add a register. It needs a name, a ref (letters, numbers, dots, dashes and underscores, unique, and fixed once the register has sold) and the pickup location it sells at. A card reader is a provider slug and a reader id from that provider's reader list, or left out for none. A browser then becomes this register's till when a manager pairs it at /pos.

Parameters

Name Type Description
name required string What staff call it, such as Front counter.
ref required string The short name on orders and receipts, such as till-1.
location_id required integer The pickup location the register sells at.
reader_provider optional string The slug of a payment provider with card readers.
reader_id optional string The reader's id at that provider.
receipt_mode optional string Print a receipt after every sale, ask each time, or offer none.
One of: print, ask, none
enabled optional boolean Whether the register can sell. Defaults to true.

Change a register

PATCH /api/v1/kahunacart/pos/admin/registers/{id} Permission kahunacart.pos.manage

Change a register. Only the fields sent change. Send reader_provider and reader_id as empty strings to take the reader off. The ref cannot change once the register has sold, because it is on its orders and receipts.

Parameters

Name Type Description
id required integer The register id.
name optional string 190 characters or fewer.
ref optional string
location_id optional integer
reader_provider optional string
reader_id optional string
receipt_mode optional string
One of: print, ask, none
enabled optional boolean

Delete a register

DELETE /api/v1/kahunacart/pos/admin/registers/{id} Permission kahunacart.pos.manage

Delete a register that has never had a shift, and revoke the devices paired to it. A register that has sold stays for its history: switch it off with update_register instead.

Parameters

Name Type Description
id required integer The register id.

List the paired devices

GET /api/v1/kahunacart/pos/admin/devices Permission kahunacart.pos.manage

The browsers paired as tills: their label, their register, who paired them and when, and when each was last used. Revoked devices are left out unless revoked is 1.

Parameters

Name Type Description
register_id optional integer Only this register's devices.
revoked optional integer 1 includes revoked devices.
One of: 0, 1

Revoke a paired device

DELETE /api/v1/kahunacart/pos/admin/devices/{id} Permission kahunacart.pos.manage

Stop a paired browser from working as a till, for a lost or replaced tablet. It has to be paired again by a manager to sell.

Parameters

Name Type Description
id required integer The device id.