Company Roles and Permissions
Get All Company Permissions
GET https://api-b2b.bigcommerce.com/api/v3/io/companies/permissionsRequest
Authentication
- authToken in header
Parameters
- q in query - stringEnter a Company permission name to return partial and exact matches.
example
Response
Body
codeinteger
dataarray[object]
200 - SUCCESS
Create a Company Permission
POST https://api-b2b.bigcommerce.com/api/v3/io/companies/permissionsRequest
Create a custom Company permission.
Note that the permission’s name
and code
values cannot match an existing permission.
Authentication
- authToken in header
Body
namestring
requiredThe name of the Company permission.<= 200 charactersExample: Get addressesdescriptionstring
requiredThe simple description for the Company permission. See Permission Codes for a more detailed description of each predefined Company permission.<= 512 charactersExample: Get addressescodestring
requiredmoduleNamestring
The name of the module to which the permission belongs. This corresponds to the organizational section containing the permission when managing Company roles from the B2B Edition control panel.<= 50 charactersExample: address
Example 1
Response
Body
codeinteger
Default: 200
dataobject
200 - SUCCESS
Update a Company Permission
PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/permissions/{permissionId}Request
Updates an existing custom Company permission.
Predefined permissions cannot be updated.
Authentication
- authToken in header
Parameters
- permissionId in path - integerrequiredThe unique identifier for a Company permission.
Body
namestring
requiredThe name of the Company permission.<= 200 charactersExample: Get addressesdescriptionstring
requiredThe simple description for the Company permission. See Permission Codes for a more detailed description of each predefined Company permission.<= 512 charactersExample: Get addressescodestring
requiredmoduleNamestring
The name of the module to which the permission belongs. This corresponds to the organizational section containing the permission when managing Company roles from the B2B Edition control panel.<= 50 charactersExample: address
Example 1
Response
Body
codeinteger
Default: 200
dataobject
Example 1
Delete Company Permission
DELETE https://api-b2b.bigcommerce.com/api/v3/io/companies/permissions/{permissionId}Request
Deletes a custom Company permission.
Predefined permissions cannot be deleted.
Authentication
- authToken in header
Parameters
- permissionId in path - integerrequiredThe unique identifier for a Company permission.
example
Response
Body
codeinteger
dataobject
200 - SUCCESS
Get Company Roles
GET https://api-b2b.bigcommerce.com/api/v3/io/companies/rolesRequest
Authentication
- authToken in header
Parameters
- q in query - stringEnter a Company role name to return partial and exact matches.
- offset in query0 - integerThe number of results to skip before returning the first result. If left blank, this defaults to
0
. - limit in query with default of 10 - integerDetermines the number of records to return per page. If left blank, this defaults to
10
.
example
Response
Body
codeinteger
dataobject
Example 1
Create a Company Role
POST https://api-b2b.bigcommerce.com/api/v3/io/companies/rolesRequest
Create a custom Company user role.
When adding predefined Company permissions to a user role, refer to Permission Codes for their name
and code
values.
Some permissions require prerequisites that must also be enabled in the role, and assigned to the same or higher permission level. See B2B Edition Buyer Roles and Permissions in the Help Center to learn more.
Authentication
- authToken in header
Body
namestring
requiredThe name of the Company user role. This name is visible to system users and Company users.<= 200 charactersExample: Sales Manager
Example 1
Response
Body
codeinteger
dataobject
Example 1
Get Company Role Details
GET https://api-b2b.bigcommerce.com/api/v3/io/companies/roles/{roleId}Request
Authentication
- authToken in header
Parameters
- roleId in path - integerrequiredThe unique identifier for a Company user role.
example
Response
Body
codeinteger
dataobject
Example 1
Update Company Role
PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/roles/{roleId}Request
Updates the name and permissions of a custom Company user role. You cannot update predefined roles.
When formatting the request body, you must add all permissions that you wish to keep in the role, including its existing permissions. See Permission Codes for a list of predefined permission name
and code
values.
Authentication
- authToken in header
Parameters
- roleId in path - integerrequiredThe unique identifier for a Company user role.
Body
namestring
requiredThe name of the Company user role. This name is visible to system users and Company users.<= 200 charactersExample: Sales Manager
Example 1
Response
Body
codeinteger
dataobject
Example 1
Delete a Company Role
DELETE https://api-b2b.bigcommerce.com/api/v3/io/companies/roles/{roleId}Request
Authentication
- authToken in header
Parameters
- roleId in path - integerrequiredThe unique identifier for a Company user role.
example
Response
Body
codeinteger
dataobject