Roles
1.0.0
API Overview
The Roles API provides endpoints for managing access roles and their associated users and permissions within Salesforce Commerce Cloud.
Overview
This API allows administrators to create, retrieve, update, and delete access roles. It also supports managing user assignments to roles, retrieving and setting role permissions, and searching for users within a specific role.
Key Features
- Role Management: Create, retrieve, and delete access roles
- Permission Management: Get and set permissions for access roles
- User Assignment: Assign and unassign users to/from roles
- User Search: Search for users assigned to a specific role using complex queries
Searchable Attributes (User Search)
The following attributes can be used in user search queries within a role:
login: The user login identifier (String)email: The user email address (String)firstName: The user first name (String)lastName: The user last name (String)externalId: The external identifier (String)lastLoginDate: The date of last login (Date)
Sortable Attributes (User Search)
Search results can be sorted by:
login: Sort by user loginemail: Sort by email addressfirstName: Sort by first namelastName: Sort by last nameexternalId: Sort by external identifierlastLoginDate: Sort by last login date
Use Cases
- Access Control: Define and manage role-based access control for Business Manager
- User Management: Assign users to appropriate roles for their job functions
- Permission Auditing: Review and update role permissions
- Compliance: Ensure proper access controls are in place
Authentication
This API requires OAuth 2.0 authentication with the appropriate scopes:
sfcc.roles- Read access to role resourcessfcc.roles.rw- Read and write access to role resources
Best Practices
- Use the Administrator role carefully as permission changes are limited for system roles
- Review role permissions regularly for security compliance
- Use the user search endpoint for efficient user-role lookups
- Avoid deleting roles that have active user assignments
https://{shortCode}.api.commercecloud.salesforce.com/merchant/roles/v1
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!