> For the complete documentation index, see [llms.txt](https://docs.flowretail.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowretail.com/api/user.md).

# User

User

## Get full account info

> Get full account information for a logged-in user. This will return information for all tenants the user has access to.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"User","description":"User"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"AccountResponse":{"content":{"application/json":{"schema":{"type":"object","properties":{"globalRoles":{"type":"array","items":{"type":"string"}},"defaultTenantUid":{"$ref":"#/components/schemas/UID"},"tenants":{"type":"array","items":{"$ref":"#/components/schemas/TenantUserResponseSchema"}}},"required":["globalRoles","defaultTenantUid","tenants"]}}},"description":"User account response"}},"schemas":{"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"TenantUserResponseSchema":{"title":"TenantUserResponseSchema","type":"object","required":["accountType","createdAt","displayName","email","externalId","firstname","lastAccessed","lastModifiedAt","lastname","mobile","status","storeAccess","tenantUid","tenantName","tenantRole","tenantUserUid","userCode","languageCode","permissions"],"properties":{"accountType":{"$ref":"#/components/schemas/TenantAccountTypeENUM"},"createdAt":{"format":"date-time","type":"string"},"defaultStoreUid":{"$ref":"#/components/schemas/OptionalUID"},"displayName":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"externalId":{"type":"string"},"firstname":{"type":"string"},"lastAccessed":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastname":{"type":"string"},"mobile":{"type":"string"},"status":{"$ref":"#/components/schemas/TenantUserStatusENUM"},"storeAccess":{"type":"array","items":{"$ref":"#/components/schemas/UserStoreAccessResponseSchema"}},"tenantUid":{"$ref":"#/components/schemas/UID"},"tenantName":{"type":"string"},"tenantRole":{"$ref":"#/components/schemas/TenantRoleENUM"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"userCode":{"type":"string"},"languageCode":{"$ref":"#/components/schemas/LanguageCode"},"permissions":{"$ref":"#/components/schemas/TenantUserPermissionResponseSchema"}},"description":""},"TenantAccountTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| FULL | Access to backoffice and onboarding of new devices|\n| REGULAR | Can only login to already onboarded devices|\n| SUPPORT | Support account|\n| INTEGRATION | Computer integration account|","enum":["FULL","REGULAR","SUPPORT","INTEGRATION"],"title":"TenantAccountTypeENUM","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"EmailTYPE":{"title":"Email","type":"string"},"TenantUserStatusENUM":{"title":"TenantUserStatusENUM","enum":["PENDING_INVITE","ACTIVE","INACTIVE"],"type":"string"},"UserStoreAccessResponseSchema":{"title":"UserStoreAccessResponseSchema","type":"object","required":["createdAt","lastModifiedAt","storeAccessUid","storeUid","storeRole"],"properties":{"createdAt":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"storeAccessUid":{"$ref":"#/components/schemas/UID"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeRole":{"$ref":"#/components/schemas/StoreRoleENUM"}}},"StoreRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ADMIN | Store admin.|\n| BACKOFFICE | Access to all backoffice functionality (price changes, purhcase order, etc)|\n| REGULAR | Access to app funtionality (product lookup, create sales, delivery)|","enum":["ADMIN","BACKOFFICE","REGULAR"],"title":"StoreRoleENUM","type":"string"},"TenantRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| BLOCKED | Blocked from this tenant|\n| ACCESS | Only access to the tenant.|\n| ADMIN | Tenant admin, allow full access to tenant and can add users and new stores.|\n| BACKOFFICE | Access to product, pricelists, etc.|","enum":["ACCESS","ADMIN","BACKOFFICE","BLOCKED"],"title":"TenantRoleENUM","type":"string"},"LanguageCode":{"title":"LanguageCode","description":"ISO 639-1 code for language","type":"string"},"TenantUserPermissionResponseSchema":{"title":"TenantUserPermissionResponseSchema","type":"object","required":["tenant","stores","organizations"],"properties":{"tenant":{"type":"array","items":{"type":"string"}},"stores":{"type":"array","items":{"$ref":"#/components/schemas/StorePermissionResponseSchema"}},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationPermissionResponseSchema"}}}},"StorePermissionResponseSchema":{"title":"StorePermissionResponseSchema","type":"object","required":["store","permissions"],"properties":{"store":{"$ref":"#/components/schemas/BasicStoreResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicStoreResponseSchema":{"title":"BasicStoreResponseSchema","type":"object","required":["name","storeUid","organizationUid","organizationName"],"properties":{"name":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"organizationUid":{"$ref":"#/components/schemas/UID"},"organizationName":{"type":"string"}}},"OrganizationPermissionResponseSchema":{"title":"OrganizationPermissionResponseSchema","type":"object","required":["organization","permissions"],"properties":{"organization":{"$ref":"#/components/schemas/BasicOrganizationResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicOrganizationResponseSchema":{"title":"BasicOrganizationResponseSchema","type":"object","required":["name","organizationUid"],"properties":{"name":{"type":"string"},"organizationUid":{"$ref":"#/components/schemas/UID"}}}}},"paths":{"/account":{"get":{"description":"Get full account information for a logged-in user. This will return information for all tenants the user has access to.","operationId":"get-account","responses":{"200":{"$ref":"#/components/responses/AccountResponse"}},"summary":"Get full account info","tags":["User"]}}}}
```

## Login user

> Login as a tenant user\
> \
> Requires a valid deviceToken

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"User","description":"User"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"deviceToken":[]}],"components":{"securitySchemes":{"deviceToken":{"description":"The devicetoken is only used for to attach devices and tie it to a tenant","scheme":"bearer","type":"http"}},"responses":{"AccountLoginResponse":{"content":{"application/json":{"schema":{"properties":{"accessToken":{"type":"string"},"tenantUser":{"$ref":"#/components/schemas/TenantUserResponseSchema"}},"required":["accessToken","tenantUser"],"type":"object"}}},"description":"Example response"}},"schemas":{"TenantUserResponseSchema":{"title":"TenantUserResponseSchema","type":"object","required":["accountType","createdAt","displayName","email","externalId","firstname","lastAccessed","lastModifiedAt","lastname","mobile","status","storeAccess","tenantUid","tenantName","tenantRole","tenantUserUid","userCode","languageCode","permissions"],"properties":{"accountType":{"$ref":"#/components/schemas/TenantAccountTypeENUM"},"createdAt":{"format":"date-time","type":"string"},"defaultStoreUid":{"$ref":"#/components/schemas/OptionalUID"},"displayName":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"externalId":{"type":"string"},"firstname":{"type":"string"},"lastAccessed":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastname":{"type":"string"},"mobile":{"type":"string"},"status":{"$ref":"#/components/schemas/TenantUserStatusENUM"},"storeAccess":{"type":"array","items":{"$ref":"#/components/schemas/UserStoreAccessResponseSchema"}},"tenantUid":{"$ref":"#/components/schemas/UID"},"tenantName":{"type":"string"},"tenantRole":{"$ref":"#/components/schemas/TenantRoleENUM"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"userCode":{"type":"string"},"languageCode":{"$ref":"#/components/schemas/LanguageCode"},"permissions":{"$ref":"#/components/schemas/TenantUserPermissionResponseSchema"}},"description":""},"TenantAccountTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| FULL | Access to backoffice and onboarding of new devices|\n| REGULAR | Can only login to already onboarded devices|\n| SUPPORT | Support account|\n| INTEGRATION | Computer integration account|","enum":["FULL","REGULAR","SUPPORT","INTEGRATION"],"title":"TenantAccountTypeENUM","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"EmailTYPE":{"title":"Email","type":"string"},"TenantUserStatusENUM":{"title":"TenantUserStatusENUM","enum":["PENDING_INVITE","ACTIVE","INACTIVE"],"type":"string"},"UserStoreAccessResponseSchema":{"title":"UserStoreAccessResponseSchema","type":"object","required":["createdAt","lastModifiedAt","storeAccessUid","storeUid","storeRole"],"properties":{"createdAt":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"storeAccessUid":{"$ref":"#/components/schemas/UID"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeRole":{"$ref":"#/components/schemas/StoreRoleENUM"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"StoreRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ADMIN | Store admin.|\n| BACKOFFICE | Access to all backoffice functionality (price changes, purhcase order, etc)|\n| REGULAR | Access to app funtionality (product lookup, create sales, delivery)|","enum":["ADMIN","BACKOFFICE","REGULAR"],"title":"StoreRoleENUM","type":"string"},"TenantRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| BLOCKED | Blocked from this tenant|\n| ACCESS | Only access to the tenant.|\n| ADMIN | Tenant admin, allow full access to tenant and can add users and new stores.|\n| BACKOFFICE | Access to product, pricelists, etc.|","enum":["ACCESS","ADMIN","BACKOFFICE","BLOCKED"],"title":"TenantRoleENUM","type":"string"},"LanguageCode":{"title":"LanguageCode","description":"ISO 639-1 code for language","type":"string"},"TenantUserPermissionResponseSchema":{"title":"TenantUserPermissionResponseSchema","type":"object","required":["tenant","stores","organizations"],"properties":{"tenant":{"type":"array","items":{"type":"string"}},"stores":{"type":"array","items":{"$ref":"#/components/schemas/StorePermissionResponseSchema"}},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationPermissionResponseSchema"}}}},"StorePermissionResponseSchema":{"title":"StorePermissionResponseSchema","type":"object","required":["store","permissions"],"properties":{"store":{"$ref":"#/components/schemas/BasicStoreResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicStoreResponseSchema":{"title":"BasicStoreResponseSchema","type":"object","required":["name","storeUid","organizationUid","organizationName"],"properties":{"name":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"organizationUid":{"$ref":"#/components/schemas/UID"},"organizationName":{"type":"string"}}},"OrganizationPermissionResponseSchema":{"title":"OrganizationPermissionResponseSchema","type":"object","required":["organization","permissions"],"properties":{"organization":{"$ref":"#/components/schemas/BasicOrganizationResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicOrganizationResponseSchema":{"title":"BasicOrganizationResponseSchema","type":"object","required":["name","organizationUid"],"properties":{"name":{"type":"string"},"organizationUid":{"$ref":"#/components/schemas/UID"}}},"AccountLoginRequestSchema":{"title":"AccountLoginRequestSchema","type":"object","properties":{"password":{"type":"string"},"userCode":{"type":"string"}},"required":["userCode","password"]}},"requestBodies":{"AccountLoginRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountLoginRequestSchema"}}}}}},"paths":{"/account":{"post":{"summary":"Login user","operationId":"post-account","responses":{"200":{"$ref":"#/components/responses/AccountLoginResponse"}},"description":"Login as a tenant user\n\nRequires a valid deviceToken","requestBody":{"$ref":"#/components/requestBodies/AccountLoginRequest"},"tags":["User"]}}}}
```

## Update global account information

> Update global information about logged in user

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"User","description":"User"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"AccountUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountUpdateSchema"}}}}},"schemas":{"AccountUpdateSchema":{"title":"AccountUpdateSchema","type":"object","properties":{"defaultTenantUid":{"$ref":"#/components/schemas/UID"}},"required":["defaultTenantUid"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"TenantUserResponseSchema":{"title":"TenantUserResponseSchema","type":"object","required":["accountType","createdAt","displayName","email","externalId","firstname","lastAccessed","lastModifiedAt","lastname","mobile","status","storeAccess","tenantUid","tenantName","tenantRole","tenantUserUid","userCode","languageCode","permissions"],"properties":{"accountType":{"$ref":"#/components/schemas/TenantAccountTypeENUM"},"createdAt":{"format":"date-time","type":"string"},"defaultStoreUid":{"$ref":"#/components/schemas/OptionalUID"},"displayName":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"externalId":{"type":"string"},"firstname":{"type":"string"},"lastAccessed":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastname":{"type":"string"},"mobile":{"type":"string"},"status":{"$ref":"#/components/schemas/TenantUserStatusENUM"},"storeAccess":{"type":"array","items":{"$ref":"#/components/schemas/UserStoreAccessResponseSchema"}},"tenantUid":{"$ref":"#/components/schemas/UID"},"tenantName":{"type":"string"},"tenantRole":{"$ref":"#/components/schemas/TenantRoleENUM"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"userCode":{"type":"string"},"languageCode":{"$ref":"#/components/schemas/LanguageCode"},"permissions":{"$ref":"#/components/schemas/TenantUserPermissionResponseSchema"}},"description":""},"TenantAccountTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| FULL | Access to backoffice and onboarding of new devices|\n| REGULAR | Can only login to already onboarded devices|\n| SUPPORT | Support account|\n| INTEGRATION | Computer integration account|","enum":["FULL","REGULAR","SUPPORT","INTEGRATION"],"title":"TenantAccountTypeENUM","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"EmailTYPE":{"title":"Email","type":"string"},"TenantUserStatusENUM":{"title":"TenantUserStatusENUM","enum":["PENDING_INVITE","ACTIVE","INACTIVE"],"type":"string"},"UserStoreAccessResponseSchema":{"title":"UserStoreAccessResponseSchema","type":"object","required":["createdAt","lastModifiedAt","storeAccessUid","storeUid","storeRole"],"properties":{"createdAt":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"storeAccessUid":{"$ref":"#/components/schemas/UID"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeRole":{"$ref":"#/components/schemas/StoreRoleENUM"}}},"StoreRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ADMIN | Store admin.|\n| BACKOFFICE | Access to all backoffice functionality (price changes, purhcase order, etc)|\n| REGULAR | Access to app funtionality (product lookup, create sales, delivery)|","enum":["ADMIN","BACKOFFICE","REGULAR"],"title":"StoreRoleENUM","type":"string"},"TenantRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| BLOCKED | Blocked from this tenant|\n| ACCESS | Only access to the tenant.|\n| ADMIN | Tenant admin, allow full access to tenant and can add users and new stores.|\n| BACKOFFICE | Access to product, pricelists, etc.|","enum":["ACCESS","ADMIN","BACKOFFICE","BLOCKED"],"title":"TenantRoleENUM","type":"string"},"LanguageCode":{"title":"LanguageCode","description":"ISO 639-1 code for language","type":"string"},"TenantUserPermissionResponseSchema":{"title":"TenantUserPermissionResponseSchema","type":"object","required":["tenant","stores","organizations"],"properties":{"tenant":{"type":"array","items":{"type":"string"}},"stores":{"type":"array","items":{"$ref":"#/components/schemas/StorePermissionResponseSchema"}},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationPermissionResponseSchema"}}}},"StorePermissionResponseSchema":{"title":"StorePermissionResponseSchema","type":"object","required":["store","permissions"],"properties":{"store":{"$ref":"#/components/schemas/BasicStoreResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicStoreResponseSchema":{"title":"BasicStoreResponseSchema","type":"object","required":["name","storeUid","organizationUid","organizationName"],"properties":{"name":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"organizationUid":{"$ref":"#/components/schemas/UID"},"organizationName":{"type":"string"}}},"OrganizationPermissionResponseSchema":{"title":"OrganizationPermissionResponseSchema","type":"object","required":["organization","permissions"],"properties":{"organization":{"$ref":"#/components/schemas/BasicOrganizationResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicOrganizationResponseSchema":{"title":"BasicOrganizationResponseSchema","type":"object","required":["name","organizationUid"],"properties":{"name":{"type":"string"},"organizationUid":{"$ref":"#/components/schemas/UID"}}}},"responses":{"AccountResponse":{"content":{"application/json":{"schema":{"type":"object","properties":{"globalRoles":{"type":"array","items":{"type":"string"}},"defaultTenantUid":{"$ref":"#/components/schemas/UID"},"tenants":{"type":"array","items":{"$ref":"#/components/schemas/TenantUserResponseSchema"}}},"required":["globalRoles","defaultTenantUid","tenants"]}}},"description":"User account response"}}},"paths":{"/account":{"put":{"description":"Update global information about logged in user","operationId":"put-account","requestBody":{"$ref":"#/components/requestBodies/AccountUpdateRequest"},"responses":{"200":{"$ref":"#/components/responses/AccountResponse"}},"summary":"Update global account information","tags":["User"]}}}}
```

## Get account info for a specific tenant

> Get tenant information about logged-in user

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"User","description":"User"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"TenantUserResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUserResponseSchema"}}},"description":"Tenant user respose"}},"schemas":{"TenantUserResponseSchema":{"title":"TenantUserResponseSchema","type":"object","required":["accountType","createdAt","displayName","email","externalId","firstname","lastAccessed","lastModifiedAt","lastname","mobile","status","storeAccess","tenantUid","tenantName","tenantRole","tenantUserUid","userCode","languageCode","permissions"],"properties":{"accountType":{"$ref":"#/components/schemas/TenantAccountTypeENUM"},"createdAt":{"format":"date-time","type":"string"},"defaultStoreUid":{"$ref":"#/components/schemas/OptionalUID"},"displayName":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"externalId":{"type":"string"},"firstname":{"type":"string"},"lastAccessed":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastname":{"type":"string"},"mobile":{"type":"string"},"status":{"$ref":"#/components/schemas/TenantUserStatusENUM"},"storeAccess":{"type":"array","items":{"$ref":"#/components/schemas/UserStoreAccessResponseSchema"}},"tenantUid":{"$ref":"#/components/schemas/UID"},"tenantName":{"type":"string"},"tenantRole":{"$ref":"#/components/schemas/TenantRoleENUM"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"userCode":{"type":"string"},"languageCode":{"$ref":"#/components/schemas/LanguageCode"},"permissions":{"$ref":"#/components/schemas/TenantUserPermissionResponseSchema"}},"description":""},"TenantAccountTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| FULL | Access to backoffice and onboarding of new devices|\n| REGULAR | Can only login to already onboarded devices|\n| SUPPORT | Support account|\n| INTEGRATION | Computer integration account|","enum":["FULL","REGULAR","SUPPORT","INTEGRATION"],"title":"TenantAccountTypeENUM","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"EmailTYPE":{"title":"Email","type":"string"},"TenantUserStatusENUM":{"title":"TenantUserStatusENUM","enum":["PENDING_INVITE","ACTIVE","INACTIVE"],"type":"string"},"UserStoreAccessResponseSchema":{"title":"UserStoreAccessResponseSchema","type":"object","required":["createdAt","lastModifiedAt","storeAccessUid","storeUid","storeRole"],"properties":{"createdAt":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"storeAccessUid":{"$ref":"#/components/schemas/UID"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeRole":{"$ref":"#/components/schemas/StoreRoleENUM"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"StoreRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ADMIN | Store admin.|\n| BACKOFFICE | Access to all backoffice functionality (price changes, purhcase order, etc)|\n| REGULAR | Access to app funtionality (product lookup, create sales, delivery)|","enum":["ADMIN","BACKOFFICE","REGULAR"],"title":"StoreRoleENUM","type":"string"},"TenantRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| BLOCKED | Blocked from this tenant|\n| ACCESS | Only access to the tenant.|\n| ADMIN | Tenant admin, allow full access to tenant and can add users and new stores.|\n| BACKOFFICE | Access to product, pricelists, etc.|","enum":["ACCESS","ADMIN","BACKOFFICE","BLOCKED"],"title":"TenantRoleENUM","type":"string"},"LanguageCode":{"title":"LanguageCode","description":"ISO 639-1 code for language","type":"string"},"TenantUserPermissionResponseSchema":{"title":"TenantUserPermissionResponseSchema","type":"object","required":["tenant","stores","organizations"],"properties":{"tenant":{"type":"array","items":{"type":"string"}},"stores":{"type":"array","items":{"$ref":"#/components/schemas/StorePermissionResponseSchema"}},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationPermissionResponseSchema"}}}},"StorePermissionResponseSchema":{"title":"StorePermissionResponseSchema","type":"object","required":["store","permissions"],"properties":{"store":{"$ref":"#/components/schemas/BasicStoreResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicStoreResponseSchema":{"title":"BasicStoreResponseSchema","type":"object","required":["name","storeUid","organizationUid","organizationName"],"properties":{"name":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"organizationUid":{"$ref":"#/components/schemas/UID"},"organizationName":{"type":"string"}}},"OrganizationPermissionResponseSchema":{"title":"OrganizationPermissionResponseSchema","type":"object","required":["organization","permissions"],"properties":{"organization":{"$ref":"#/components/schemas/BasicOrganizationResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicOrganizationResponseSchema":{"title":"BasicOrganizationResponseSchema","type":"object","required":["name","organizationUid"],"properties":{"name":{"type":"string"},"organizationUid":{"$ref":"#/components/schemas/UID"}}}}},"paths":{"/tenants/{tenantUid}/account":{"get":{"description":"Get tenant information about logged-in user","operationId":"get-tenants-account","responses":{"200":{"$ref":"#/components/responses/TenantUserResponse"}},"summary":"Get account info for a specific tenant","tags":["User"]}}}}
```

## Generate accessToken from authToken

> Generate access token from auth token

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"User","description":"User"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"authToken":[]}],"components":{"securitySchemes":{"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"}},"responses":{"TenantUserResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUserResponseSchema"}}},"description":"Tenant user respose"}},"schemas":{"TenantUserResponseSchema":{"title":"TenantUserResponseSchema","type":"object","required":["accountType","createdAt","displayName","email","externalId","firstname","lastAccessed","lastModifiedAt","lastname","mobile","status","storeAccess","tenantUid","tenantName","tenantRole","tenantUserUid","userCode","languageCode","permissions"],"properties":{"accountType":{"$ref":"#/components/schemas/TenantAccountTypeENUM"},"createdAt":{"format":"date-time","type":"string"},"defaultStoreUid":{"$ref":"#/components/schemas/OptionalUID"},"displayName":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"externalId":{"type":"string"},"firstname":{"type":"string"},"lastAccessed":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastname":{"type":"string"},"mobile":{"type":"string"},"status":{"$ref":"#/components/schemas/TenantUserStatusENUM"},"storeAccess":{"type":"array","items":{"$ref":"#/components/schemas/UserStoreAccessResponseSchema"}},"tenantUid":{"$ref":"#/components/schemas/UID"},"tenantName":{"type":"string"},"tenantRole":{"$ref":"#/components/schemas/TenantRoleENUM"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"userCode":{"type":"string"},"languageCode":{"$ref":"#/components/schemas/LanguageCode"},"permissions":{"$ref":"#/components/schemas/TenantUserPermissionResponseSchema"}},"description":""},"TenantAccountTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| FULL | Access to backoffice and onboarding of new devices|\n| REGULAR | Can only login to already onboarded devices|\n| SUPPORT | Support account|\n| INTEGRATION | Computer integration account|","enum":["FULL","REGULAR","SUPPORT","INTEGRATION"],"title":"TenantAccountTypeENUM","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"EmailTYPE":{"title":"Email","type":"string"},"TenantUserStatusENUM":{"title":"TenantUserStatusENUM","enum":["PENDING_INVITE","ACTIVE","INACTIVE"],"type":"string"},"UserStoreAccessResponseSchema":{"title":"UserStoreAccessResponseSchema","type":"object","required":["createdAt","lastModifiedAt","storeAccessUid","storeUid","storeRole"],"properties":{"createdAt":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"storeAccessUid":{"$ref":"#/components/schemas/UID"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeRole":{"$ref":"#/components/schemas/StoreRoleENUM"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"StoreRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ADMIN | Store admin.|\n| BACKOFFICE | Access to all backoffice functionality (price changes, purhcase order, etc)|\n| REGULAR | Access to app funtionality (product lookup, create sales, delivery)|","enum":["ADMIN","BACKOFFICE","REGULAR"],"title":"StoreRoleENUM","type":"string"},"TenantRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| BLOCKED | Blocked from this tenant|\n| ACCESS | Only access to the tenant.|\n| ADMIN | Tenant admin, allow full access to tenant and can add users and new stores.|\n| BACKOFFICE | Access to product, pricelists, etc.|","enum":["ACCESS","ADMIN","BACKOFFICE","BLOCKED"],"title":"TenantRoleENUM","type":"string"},"LanguageCode":{"title":"LanguageCode","description":"ISO 639-1 code for language","type":"string"},"TenantUserPermissionResponseSchema":{"title":"TenantUserPermissionResponseSchema","type":"object","required":["tenant","stores","organizations"],"properties":{"tenant":{"type":"array","items":{"type":"string"}},"stores":{"type":"array","items":{"$ref":"#/components/schemas/StorePermissionResponseSchema"}},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationPermissionResponseSchema"}}}},"StorePermissionResponseSchema":{"title":"StorePermissionResponseSchema","type":"object","required":["store","permissions"],"properties":{"store":{"$ref":"#/components/schemas/BasicStoreResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicStoreResponseSchema":{"title":"BasicStoreResponseSchema","type":"object","required":["name","storeUid","organizationUid","organizationName"],"properties":{"name":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"organizationUid":{"$ref":"#/components/schemas/UID"},"organizationName":{"type":"string"}}},"OrganizationPermissionResponseSchema":{"title":"OrganizationPermissionResponseSchema","type":"object","required":["organization","permissions"],"properties":{"organization":{"$ref":"#/components/schemas/BasicOrganizationResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicOrganizationResponseSchema":{"title":"BasicOrganizationResponseSchema","type":"object","required":["name","organizationUid"],"properties":{"name":{"type":"string"},"organizationUid":{"$ref":"#/components/schemas/UID"}}}}},"paths":{"/tenants/{tenantUid}/account":{"post":{"summary":"Generate accessToken from authToken","operationId":"post-tenants-account","responses":{"200":{"$ref":"#/components/responses/TenantUserResponse"}},"description":"Generate access token from auth token","tags":["User"]}}}}
```

## Update account info

> Update information about logged in user

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"User","description":"User"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"TenantAccountUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantAccountUpdateSchema"}}}}},"schemas":{"TenantAccountUpdateSchema":{"description":"Update the tenant account","title":"TenantAccountUpdateSchema","type":"object","properties":{"defaultStoreUid":{"$ref":"#/components/schemas/OptionalUID"},"displayName":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"firstname":{"type":"string"},"lastname":{"type":"string"},"mobile":{"type":"string"},"password":{"type":"string"},"languageCode":{"$ref":"#/components/schemas/LanguageCode"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"EmailTYPE":{"title":"Email","type":"string"},"LanguageCode":{"title":"LanguageCode","description":"ISO 639-1 code for language","type":"string"},"TenantUserResponseSchema":{"title":"TenantUserResponseSchema","type":"object","required":["accountType","createdAt","displayName","email","externalId","firstname","lastAccessed","lastModifiedAt","lastname","mobile","status","storeAccess","tenantUid","tenantName","tenantRole","tenantUserUid","userCode","languageCode","permissions"],"properties":{"accountType":{"$ref":"#/components/schemas/TenantAccountTypeENUM"},"createdAt":{"format":"date-time","type":"string"},"defaultStoreUid":{"$ref":"#/components/schemas/OptionalUID"},"displayName":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"externalId":{"type":"string"},"firstname":{"type":"string"},"lastAccessed":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastname":{"type":"string"},"mobile":{"type":"string"},"status":{"$ref":"#/components/schemas/TenantUserStatusENUM"},"storeAccess":{"type":"array","items":{"$ref":"#/components/schemas/UserStoreAccessResponseSchema"}},"tenantUid":{"$ref":"#/components/schemas/UID"},"tenantName":{"type":"string"},"tenantRole":{"$ref":"#/components/schemas/TenantRoleENUM"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"userCode":{"type":"string"},"languageCode":{"$ref":"#/components/schemas/LanguageCode"},"permissions":{"$ref":"#/components/schemas/TenantUserPermissionResponseSchema"}},"description":""},"TenantAccountTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| FULL | Access to backoffice and onboarding of new devices|\n| REGULAR | Can only login to already onboarded devices|\n| SUPPORT | Support account|\n| INTEGRATION | Computer integration account|","enum":["FULL","REGULAR","SUPPORT","INTEGRATION"],"title":"TenantAccountTypeENUM","type":"string"},"TenantUserStatusENUM":{"title":"TenantUserStatusENUM","enum":["PENDING_INVITE","ACTIVE","INACTIVE"],"type":"string"},"UserStoreAccessResponseSchema":{"title":"UserStoreAccessResponseSchema","type":"object","required":["createdAt","lastModifiedAt","storeAccessUid","storeUid","storeRole"],"properties":{"createdAt":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"storeAccessUid":{"$ref":"#/components/schemas/UID"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeRole":{"$ref":"#/components/schemas/StoreRoleENUM"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"StoreRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ADMIN | Store admin.|\n| BACKOFFICE | Access to all backoffice functionality (price changes, purhcase order, etc)|\n| REGULAR | Access to app funtionality (product lookup, create sales, delivery)|","enum":["ADMIN","BACKOFFICE","REGULAR"],"title":"StoreRoleENUM","type":"string"},"TenantRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| BLOCKED | Blocked from this tenant|\n| ACCESS | Only access to the tenant.|\n| ADMIN | Tenant admin, allow full access to tenant and can add users and new stores.|\n| BACKOFFICE | Access to product, pricelists, etc.|","enum":["ACCESS","ADMIN","BACKOFFICE","BLOCKED"],"title":"TenantRoleENUM","type":"string"},"TenantUserPermissionResponseSchema":{"title":"TenantUserPermissionResponseSchema","type":"object","required":["tenant","stores","organizations"],"properties":{"tenant":{"type":"array","items":{"type":"string"}},"stores":{"type":"array","items":{"$ref":"#/components/schemas/StorePermissionResponseSchema"}},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationPermissionResponseSchema"}}}},"StorePermissionResponseSchema":{"title":"StorePermissionResponseSchema","type":"object","required":["store","permissions"],"properties":{"store":{"$ref":"#/components/schemas/BasicStoreResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicStoreResponseSchema":{"title":"BasicStoreResponseSchema","type":"object","required":["name","storeUid","organizationUid","organizationName"],"properties":{"name":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"organizationUid":{"$ref":"#/components/schemas/UID"},"organizationName":{"type":"string"}}},"OrganizationPermissionResponseSchema":{"title":"OrganizationPermissionResponseSchema","type":"object","required":["organization","permissions"],"properties":{"organization":{"$ref":"#/components/schemas/BasicOrganizationResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicOrganizationResponseSchema":{"title":"BasicOrganizationResponseSchema","type":"object","required":["name","organizationUid"],"properties":{"name":{"type":"string"},"organizationUid":{"$ref":"#/components/schemas/UID"}}}},"responses":{"TenantUserResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUserResponseSchema"}}},"description":"Tenant user respose"}}},"paths":{"/tenants/{tenantUid}/account":{"put":{"description":"Update information about logged in user","operationId":"put-tenants-account","requestBody":{"$ref":"#/components/requestBodies/TenantAccountUpdateRequest"},"responses":{"200":{"$ref":"#/components/responses/TenantUserResponse"}},"summary":"Update account info","tags":["User"]}}}}
```

## Get tenant invitation information

> Get information about invitation to a tenant

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"User","description":"User"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[],"paths":{"/account/invite":{"get":{"description":"Get information about invitation to a tenant","operationId":"get-account-invite","parameters":[{"description":"invite token","in":"header","name":"x-invite-token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/TenantInviteInformationResponse"}},"summary":"Get tenant invitation information","tags":["User"]}}},"components":{"responses":{"TenantInviteInformationResponse":{"content":{"application/json":{"schema":{"properties":{"tenant":{"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"},"user":{"properties":{"displayName":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"firstname":{"type":"string"},"lastname":{"type":"string"},"mobile":{"type":"string"},"status":{"type":"string"}},"required":["email","mobile","firstname","lastname","displayName","status"],"type":"object"}},"required":["tenant","user"],"type":"object"}}},"description":"Example response"}},"schemas":{"EmailTYPE":{"title":"Email","type":"string"}}}}
```

## Accept tenant invitation

> Accept invitation to a tenant

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"User","description":"User"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"authToken":[]}],"components":{"securitySchemes":{"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"}},"requestBodies":{"TenantAccountAcceptInviteRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantAccountAcceptInviteSchema"}}}}},"schemas":{"TenantAccountAcceptInviteSchema":{"description":"Accept an invitation","title":"TenantAccountAcceptInviteSchema","type":"object","properties":{"inviteToken":{"type":"string"}},"required":["inviteToken"]},"TenantUserResponseSchema":{"title":"TenantUserResponseSchema","type":"object","required":["accountType","createdAt","displayName","email","externalId","firstname","lastAccessed","lastModifiedAt","lastname","mobile","status","storeAccess","tenantUid","tenantName","tenantRole","tenantUserUid","userCode","languageCode","permissions"],"properties":{"accountType":{"$ref":"#/components/schemas/TenantAccountTypeENUM"},"createdAt":{"format":"date-time","type":"string"},"defaultStoreUid":{"$ref":"#/components/schemas/OptionalUID"},"displayName":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"externalId":{"type":"string"},"firstname":{"type":"string"},"lastAccessed":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastname":{"type":"string"},"mobile":{"type":"string"},"status":{"$ref":"#/components/schemas/TenantUserStatusENUM"},"storeAccess":{"type":"array","items":{"$ref":"#/components/schemas/UserStoreAccessResponseSchema"}},"tenantUid":{"$ref":"#/components/schemas/UID"},"tenantName":{"type":"string"},"tenantRole":{"$ref":"#/components/schemas/TenantRoleENUM"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"userCode":{"type":"string"},"languageCode":{"$ref":"#/components/schemas/LanguageCode"},"permissions":{"$ref":"#/components/schemas/TenantUserPermissionResponseSchema"}},"description":""},"TenantAccountTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| FULL | Access to backoffice and onboarding of new devices|\n| REGULAR | Can only login to already onboarded devices|\n| SUPPORT | Support account|\n| INTEGRATION | Computer integration account|","enum":["FULL","REGULAR","SUPPORT","INTEGRATION"],"title":"TenantAccountTypeENUM","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"EmailTYPE":{"title":"Email","type":"string"},"TenantUserStatusENUM":{"title":"TenantUserStatusENUM","enum":["PENDING_INVITE","ACTIVE","INACTIVE"],"type":"string"},"UserStoreAccessResponseSchema":{"title":"UserStoreAccessResponseSchema","type":"object","required":["createdAt","lastModifiedAt","storeAccessUid","storeUid","storeRole"],"properties":{"createdAt":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"storeAccessUid":{"$ref":"#/components/schemas/UID"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeRole":{"$ref":"#/components/schemas/StoreRoleENUM"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"StoreRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ADMIN | Store admin.|\n| BACKOFFICE | Access to all backoffice functionality (price changes, purhcase order, etc)|\n| REGULAR | Access to app funtionality (product lookup, create sales, delivery)|","enum":["ADMIN","BACKOFFICE","REGULAR"],"title":"StoreRoleENUM","type":"string"},"TenantRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| BLOCKED | Blocked from this tenant|\n| ACCESS | Only access to the tenant.|\n| ADMIN | Tenant admin, allow full access to tenant and can add users and new stores.|\n| BACKOFFICE | Access to product, pricelists, etc.|","enum":["ACCESS","ADMIN","BACKOFFICE","BLOCKED"],"title":"TenantRoleENUM","type":"string"},"LanguageCode":{"title":"LanguageCode","description":"ISO 639-1 code for language","type":"string"},"TenantUserPermissionResponseSchema":{"title":"TenantUserPermissionResponseSchema","type":"object","required":["tenant","stores","organizations"],"properties":{"tenant":{"type":"array","items":{"type":"string"}},"stores":{"type":"array","items":{"$ref":"#/components/schemas/StorePermissionResponseSchema"}},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationPermissionResponseSchema"}}}},"StorePermissionResponseSchema":{"title":"StorePermissionResponseSchema","type":"object","required":["store","permissions"],"properties":{"store":{"$ref":"#/components/schemas/BasicStoreResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicStoreResponseSchema":{"title":"BasicStoreResponseSchema","type":"object","required":["name","storeUid","organizationUid","organizationName"],"properties":{"name":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"organizationUid":{"$ref":"#/components/schemas/UID"},"organizationName":{"type":"string"}}},"OrganizationPermissionResponseSchema":{"title":"OrganizationPermissionResponseSchema","type":"object","required":["organization","permissions"],"properties":{"organization":{"$ref":"#/components/schemas/BasicOrganizationResponseSchema"},"permissions":{"type":"array","items":{"type":"string"}}}},"BasicOrganizationResponseSchema":{"title":"BasicOrganizationResponseSchema","type":"object","required":["name","organizationUid"],"properties":{"name":{"type":"string"},"organizationUid":{"$ref":"#/components/schemas/UID"}}}},"responses":{"TenantUserResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUserResponseSchema"}}},"description":"Tenant user respose"}}},"paths":{"/account/invite":{"put":{"description":"Accept invitation to a tenant","operationId":"put-account-invite","requestBody":{"$ref":"#/components/requestBodies/TenantAccountAcceptInviteRequest"},"responses":{"200":{"$ref":"#/components/responses/TenantUserResponse"}},"summary":"Accept tenant invitation","tags":["User"]}}}}
```

## List subscribers

> List subscribers for a store.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"User","description":"User"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"SubscriberListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","required":["items","paging"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SubscriberResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}}}}}}},"schemas":{"SubscriberResponseSchema":{"title":"SubscriberResponseSchema","type":"object","required":["subscriberUid","subscription","tenantUser","createdAt","createdBy"],"properties":{"subscriberUid":{"$ref":"#/components/schemas/UID"},"subscription":{"$ref":"#/components/schemas/SubscriberSubscription"},"tenantUser":{"$ref":"#/components/schemas/SubscriberTenantUser"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SubscriberSubscription":{"title":"SubscriberSubscription","type":"object","required":["type","name"],"properties":{"type":{"$ref":"#/components/schemas/SubscriberSubscriptionType"},"name":{"type":"string"}}},"SubscriberSubscriptionType":{"title":"SubscriberSubscriptionType","type":"string","enum":["SALES_SUMMARY_REPORT"]},"SubscriberTenantUser":{"title":"SubscriberTenantUser","type":"object","required":["tenantUserUid","displayName","email"],"properties":{"tenantUserUid":{"$ref":"#/components/schemas/UID"},"displayName":{"type":"string"},"email":{"type":"string"}}},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"},"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"}},"parameters":{"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"},"subscriberSubscriptionTypeQuery":{"name":"subscriptionType","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SubscriberSubscriptionType"},"description":"Reference to subscription type"},"tenantUserUidsQuery":{"name":"tenantUserUids","in":"query","required":false,"schema":{"items":{"$ref":"#/components/schemas/UID"},"type":"array"},"description":"Filter on tenant users"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/subscribers":{"get":{"summary":"List subscribers","tags":["User"],"responses":{"200":{"$ref":"#/components/responses/SubscriberListResponse"}},"operationId":"get-subscribers","description":"List subscribers for a store.","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"},{"$ref":"#/components/parameters/subscriberSubscriptionTypeQuery"},{"$ref":"#/components/parameters/tenantUserUidsQuery"}]}}}}
```

## Create subscriber

> Create new subscriber.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"User","description":"User"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"SubscriberResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberResponseSchema"}}}}},"schemas":{"SubscriberResponseSchema":{"title":"SubscriberResponseSchema","type":"object","required":["subscriberUid","subscription","tenantUser","createdAt","createdBy"],"properties":{"subscriberUid":{"$ref":"#/components/schemas/UID"},"subscription":{"$ref":"#/components/schemas/SubscriberSubscription"},"tenantUser":{"$ref":"#/components/schemas/SubscriberTenantUser"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SubscriberSubscription":{"title":"SubscriberSubscription","type":"object","required":["type","name"],"properties":{"type":{"$ref":"#/components/schemas/SubscriberSubscriptionType"},"name":{"type":"string"}}},"SubscriberSubscriptionType":{"title":"SubscriberSubscriptionType","type":"string","enum":["SALES_SUMMARY_REPORT"]},"SubscriberTenantUser":{"title":"SubscriberTenantUser","type":"object","required":["tenantUserUid","displayName","email"],"properties":{"tenantUserUid":{"$ref":"#/components/schemas/UID"},"displayName":{"type":"string"},"email":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"}},"requestBodies":{"SubscriberCreateRequest":{"content":{"application/json":{"schema":{"type":"object","required":["tenantUserUid","subscriptionType"],"properties":{"subscriberUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"subscriptionType":{"$ref":"#/components/schemas/SubscriberSubscriptionType"}}}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/subscribers":{"post":{"summary":"Create subscriber","tags":["User"],"responses":{"201":{"$ref":"#/components/responses/SubscriberResponse"}},"operationId":"post-subscribers","description":"Create new subscriber.","requestBody":{"$ref":"#/components/requestBodies/SubscriberCreateRequest"}}}}}
```

## Get subscriber

> Get a subscriber.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"User","description":"User"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"SubscriberResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberResponseSchema"}}}}},"schemas":{"SubscriberResponseSchema":{"title":"SubscriberResponseSchema","type":"object","required":["subscriberUid","subscription","tenantUser","createdAt","createdBy"],"properties":{"subscriberUid":{"$ref":"#/components/schemas/UID"},"subscription":{"$ref":"#/components/schemas/SubscriberSubscription"},"tenantUser":{"$ref":"#/components/schemas/SubscriberTenantUser"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SubscriberSubscription":{"title":"SubscriberSubscription","type":"object","required":["type","name"],"properties":{"type":{"$ref":"#/components/schemas/SubscriberSubscriptionType"},"name":{"type":"string"}}},"SubscriberSubscriptionType":{"title":"SubscriberSubscriptionType","type":"string","enum":["SALES_SUMMARY_REPORT"]},"SubscriberTenantUser":{"title":"SubscriberTenantUser","type":"object","required":["tenantUserUid","displayName","email"],"properties":{"tenantUserUid":{"$ref":"#/components/schemas/UID"},"displayName":{"type":"string"},"email":{"type":"string"}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/subscribers/{subscriberUid}":{"get":{"summary":"Get subscriber","tags":["User"],"responses":{"200":{"$ref":"#/components/responses/SubscriberResponse"}},"operationId":"get-subscribers-subscriberUid","description":"Get a subscriber."}}}}
```

## Delete subscriber

> Delete a subscriber.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"User","description":"User"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/subscribers/{subscriberUid}":{"delete":{"summary":"Delete subscriber","tags":["User"],"responses":{"204":{"description":"No Content"}},"operationId":"delete-subscribers-subscriberUid","description":"Delete a subscriber."}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowretail.com/api/user.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
