Storefront Roles API
The Storefront Roles API allows you to manage user roles and resource access within the VTEX License Manager for storefront users. You can assign storefront roles to existing users, or create new users with assigned roles in a single request. The API also allows you to revoke storefront roles, check user access to resources, remove users, and fetch user roles and details.
This feature is available only for stores using B2B Buyer Portal, currently available for select accounts.
All endpoints require the Storefront Roles feature to be enabled for your account. Requests to accounts without this feature enabled will receive a 403 Forbidden response.
Learn more about the available storefront roles and resources at the Storefront Roles guide.
Common parameters
| Parameter name | Description | Type |
|---|---|---|
X-VTEX-API-AppKey |
Unique identifier of the application key. | Authentication header. |
X-VTEX-API-AppToken |
Secret token of the application key. | Authentication header. |
VtexIdclientAutCookie |
User token, valid for 24 hours. | Authentication header. |
Endpoints
Storefront Roles
| Summary | Method | Path |
|---|---|---|
| Assign one storefront role | POST | /api/license-manager/storefront/roles/assign |
| Revoke storefront role from user | DELETE | /api/license-manager/storefront/user/roles |
| Assign storefront roles or create user with storefront roles | POST | /api/license-manager/storefront/user/roles |
| Check storefront user resource access | GET | /api/license-manager/storefront/users/{userId}/resources/{resourceKey}/granted |
| Remove storefront user | DELETE | /api/license-manager/storefront/remove/users/{userId} |
| Fetch storefront user roles by ID | GET | /api/license-manager/storefront/users/{userId}/roles |
| Fetch storefront user roles by email | GET | /api/license-manager/storefront/users/{email}/roles |
| Fetch storefront user details | GET | /api/license-manager/storefront/users/{userId} |