Sign in on a register
POST
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
- Get the merchant identifier and a register ID (from List registers) for the device.
- Send username, password, merchantTenant and registerId; the register must be ACTIVE and not terminated.
- Use the returned token as a Bearer token and send tenant as X-TenantID on later requests.
application/json- body
username*stringThe user's sign-in name within the merchant account.
password*stringThe user's password.
merchantTenant*stringMerchant identifier (letters, digits, - and _ only). The merchant must exist.
Match
^[A-Za-z0-9_-]+$registerId*integerID of the register to sign in on; it must exist, be ACTIVE and not be terminated.
Format
int64OK
*/*- response
status*stringOutcome of the request: SUCCESS when it worked; errors return an error status with the reason in message.
message*stringShort 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 }}