The computer asks to join
A new computer uses the organization’s POS registration key to ask for registration with Request a POS registration. It receives a request id and a secret token, shown once, to follow its request. A computer that already has an active device or an open request in the organization is refused. This is limited to 5 per minute. The computer can check where it stands with Check POS registration status, using its token.The manager decides
Dr Chabi lists the waiting computers with List POS registration requests and opens one with View a POS registration request. Then:- Approve a POS registration lets the computer finish.
- Reject a POS registration refuses it. A request that is already approved cannot be rejected.
- Delete a POS registration request removes a request made by mistake. A completed or a rejected request cannot be deleted.
The computer starts syncing
Once approved, the computer finishes its registration with Finish POS registration. Exowpee creates its access to the sync service and an active POS device, and gives the computer the connection details and the access token. If it asks again, it gets the same details, until the device’s credentials are renewed or the device is revoked; after that, asking again is refused. If this is the only active device of the organization, a first snapshot of the catalogue is queued. After that, the device works with its own access token, not with a member’s login:- Fetch sync connection settings gives the settings it needs to sync.
- Fetch measurement types (POS) downloads the measurement types and their units.
- Report device sync status tells Exowpee that the device is alive and how far it has synced. Exowpee tells the device whether it must update, rotate its credentials or resync. When several apply, the order is update, rotate credentials, resync, then nothing.
Follow and steer the devices
List POS sync devices and View a POS sync device show each device with its sync state. After a large change of the catalogue, a counter looks out of date, so Dr Chabi asks a device to resync with Ask a device to resync. At its next heartbeat, the device is told to reload its catalogue. The request is cleared when the device reports that it has synced after the request.Renew the credentials
For safety, Dr Chabi asks a device to renew its credentials with Ask a device to renew credentials. At its next heartbeat the device is told to rotate. It then renews them with Renew device credentials, which gives a new secret once and stops the previous one. This is refused if nobody asked for a rotation. The API token stays valid.Retire a device
When a computer is lost, Dr Chabi revokes the device with Revoke a POS sync device. Its access to the sync service is deleted first, so any running sync stops. If the sync service refuses, nothing changes and the device stays active. A revoked device cannot be restored: the computer must register again.The rules
- Without a valid device token, the device calls are refused with 401. A revoked device is refused too.
- The sync topic of the organization must have been provisioned, or the calls that need it are refused as not ready.
- A cash register computer can also name its POS device when it asks for a link: see Connect cash register computers.
All the actions of this topic
- Fetch measurement types (POS): Lets a registered POS sync device download the list of measurement types with their units.
- Fetch sync connection settings: Lets a registered POS device read the connection settings it needs to sync.
- Report device sync status: A POS device reports it is alive and how far it has synced, and is told whether it must update, rotate credentials or resync.
- Renew device credentials: A POS device that was asked to rotate receives new sync credentials and the old ones stop working.
- List POS sync devices: Lists the POS devices registered to sync the catalogue, filtered by status, name or computer.
- View a POS sync device: Shows one registered POS device with its sync state.
- Ask a device to renew credentials: Flags a POS device so that it replaces its sync credentials the next time it checks in.
- Revoke a POS sync device: Permanently cuts off a POS device from syncing, for example when it is lost or retired.
- Ask a device to resync: Flags a POS device so that it reloads its catalogue data on its next check-in.
- Request a POS registration: A new point-of-sale computer asks to be linked to an organization. It receives a request id and a secret token to follow the request until a manager approves it.
- List POS registration requests: Shows the requests from point-of-sale computers waiting to be linked to your organization, filterable by status or computer.
- Check POS registration status: A point-of-sale computer checks whether its registration request is still pending, approved or rejected.
- Finish POS registration: An approved point-of-sale computer collects its connection details and access token to start syncing the catalog. Calling it again returns the same details.
- View a POS registration request: Shows one registration request from a point-of-sale computer.
- Delete a POS registration request: Removes a registration request that has not yet been completed, for example one made by mistake.
- Approve a POS registration: Authorizes a waiting point-of-sale computer so it can finish linking itself to your organization.
- Reject a POS registration: Refuses a waiting point-of-sale computer so it cannot link to your organization.