iotoms Docs

Sign in on a register

POST
/api/v1/auth/registration

Authenticates a user for a specific merchant and register (point-of-sale device) and returns an access token tied to that register. The register must be active and not terminated.

How to use it

  1. Get the merchant identifier and a register ID (from List registers) for the device.
  2. Send username, password, merchantTenant and registerId; the register must be ACTIVE and not terminated.
  3. Use the returned token as a Bearer token and send tenant as X-TenantID on later requests.

Request Body

application/json
  1. body
username*string

The user's sign-in name within the merchant account.

password*string

The user's password.

merchantTenant*string

Merchant identifier (letters, digits, - and _ only). The merchant must exist.

Match^[A-Za-z0-9_-]+$
registerId*integer

ID of the register to sign in on; it must exist, be ACTIVE and not be terminated.

Formatint64

Response Body

OK

*/*
  1. response
status*string

Outcome of the request: SUCCESS when it worked; errors return an error status with the reason in message.

message*string

Short human-readable message describing the outcome.

data?

The register-bound access token and the user, merchant and register it was issued for.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/auth/registration' \  -H 'Content-Type: application/json' \  -d '{  "username": "string",  "password": "string",  "merchantTenant": "string",  "registerId": 0}'
Example Response
{  "status": "string",  "message": "string",  "data": {    "token": "string",    "username": "string",    "tenant": "string",    "registerId": 0  }}