Generate an access token, or refresh an unlock token issued by verify-pin
Generate an access token for the logged-in user, or refresh an unlock token issued by the tenant user verify-pin operation. Both answer AccountLoginResponse: the token, and the user it was issued for. Under an auth token it mints an access token for the logged-in user. Under an access token it is the refresh for an unlock token issued by post-tenants-users-verifypin. It answers a fresh unlock token for the same user, with the platform's access-token lifetime counted from the refresh, carrying the same claims as the unlock token it refreshes: the screen account, carried as it stands, and the original unlock time, which never moves. A screen account deleted since the unlock stays in the unlock token; every write under that unlock token records no screen account, as the event's screenAccountTenantUserUid describes. The refresh is refused with a 401 once that unlock is older than 12 hours, and the person then unlocks again with their PIN. The refresh reads the user again and is refused with a 401 when their PIN is locked (pinLocked), so a user locked mid-shift keeps the unlock token they hold only until it expires. A user who can no longer log in is refused before the refresh is judged, with the 403 the platform answers on every operation to a user without access to the tenant: a user deactivated mid-shift loses the unlock token on their next request, here and everywhere else. The refresh does not read the screen account again: deactivating it or locking its PIN ends no unlock token already issued through it. Any other access token — one that carries no unlock time, such as a device login's from post-account — is refused with a 401: this operation never extends a token that is not an unlock token.
Access token recevied after user login with a deviceToken
Reference to a tenant.
^[A-Za-z0-9-_]+Example response
The token cannot be refreshed: the unlock is older than 12 hours, the user's PIN is locked, or the token is not an unlock token: an access token that carries no unlock time, or an integration token.
POST /v2/tenants/{tenantUid}/account HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"accessToken": "text",
"tenantUser": {
"accountType": "FULL",
"createdAt": "2026-01-01T00:00:00.000Z",
"defaultStoreUid": "text",
"displayName": "text",
"email": "text",
"externalId": "text",
"firstname": "text",
"lastAccessed": "2026-01-01T00:00:00.000Z",
"lastModifiedAt": "2026-01-01T00:00:00.000Z",
"lastname": "text",
"mobile": "text",
"pinLocked": true,
"pinLockedUntil": "2026-01-01T00:00:00.000Z",
"status": "PENDING_INVITE",
"storeAccess": [
{
"createdAt": "2026-01-01T00:00:00.000Z",
"lastModifiedAt": "2026-01-01T00:00:00.000Z",
"storeAccessUid": "text",
"storeUid": "text",
"storeRole": "ADMIN"
}
],
"tenantUid": "text",
"tenantName": "text",
"tenantRole": "ACCESS",
"tenantUserUid": "text",
"userCode": "text",
"languageCode": "text",
"permissions": {
"tenant": [
"text"
],
"stores": [
{
"store": {
"name": "text",
"storeUid": "text",
"organizationUid": "text",
"organizationName": "text"
},
"permissions": [
"text"
]
}
],
"organizations": [
{
"organization": {
"name": "text",
"organizationUid": "text"
},
"permissions": [
"text"
]
}
]
}
}
}Last updated
Was this helpful?

