Documentation
Feedback
Guides
API Reference

API Reference
Filter By
Post
Get
Put
Delete
Patch

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

SummaryMethodPath
Assign one storefront rolePOST/api/license-manager/storefront/roles/assign
Revoke storefront role from userDELETE/api/license-manager/storefront/user/roles
Assign storefront roles or create user with storefront rolesPOST/api/license-manager/storefront/user/roles
Check storefront user resource accessGET/api/license-manager/storefront/users/{userId}/resources/{resourceKey}/granted
Remove storefront userDELETE/api/license-manager/storefront/remove/users/{userId}
Fetch storefront user roles by IDGET/api/license-manager/storefront/users/{userId}/roles
Fetch storefront user roles by emailGET/api/license-manager/storefront/users/{email}/roles
Fetch storefront user detailsGET/api/license-manager/storefront/users/{userId}

Loading API specification...