Users
Get All B2B users
GET https://api-b2b.bigcommerce.com/api/v3/io/usersRequest
Authentication
- X-Auth-Token in header
Parameters
- X-Store-Hash in header - stringrequiredThe unique store hash associated with a BigCommerce store that has B2B Edition enabled.Example: abc123
- offset in query0 - integerThe number of items to skip before starting to collect the result set.
- limit in query with default of 10 - integerThe maximum number of results to return.
- companyId in query - integerIf included, filters users in the response based on their Company ID as reported by the Server to Server Companies endpoints.Example: 42
- roles in query - array
Filters users according to their assigned role ID. This filter is limited to admin (
0
), senior buyer (1
), and junior buyer (2
).By default, custom roles are treated as junior buyer, but they can be differentiated in the response data by the
companyRoleId
andcompanyRoleName
fields. For more information, see Company Roles and Permissions.Type: array[integer]Allowed: 0 | 1 | 2
- minModified in query - stringFilters results by the
updatedAt
field, returning only those with a Unix timestamp later thanminModified
.Example: 1751310365 - maxModified in query - stringFilters results by the
updatedAt
field, returning only those with a Unix timestamp earlier thanmaxModified
.Example: 1751310365 - minCreated in query - stringFilters results by the
createdAt
field, returning only those with a Unix timestamp later thanminCreated
.Example: 1751310365 - maxCreated in query - stringFilters results by the
createdAt
field, returning only those with a Unix timestamp earlier thanmaxCreated
.Example: 1751310365 - email in query - stringFilters users by email address. This field requires an exact match.Example: user@example.com
- channelId in query - integerFilters users by their assigned BigCommerce channel ID.Example: 1
- isIncludeExtraFields in query - stringIndicates whether to include extra fields in the response. A value of
1
indicates they will be included, while a value of0
indicates they will not.Allowed: 0 | 1
- q in query - stringBroader search term for filtering on supported fields. Currently this includes Company, email, and name fields.Example: Smith
example
Response
Body
codeinteger
Operation status code.Default: 200
dataarray[object]
example
Create A Company User
POST https://api-b2b.bigcommerce.com/api/v3/io/usersRequest
Create a Company user within an existing Company.
With Independent Company behavior enabled, B2B Edition Company accounts are the source of truth for defining a Company user’s customer group assignment.
On stores without Independent Company behavior, each Company account has a one-to-one relationship with its customer group.
If no default customer group is configured, or the set value of customerGroupId
is 0, the B2B Company will not be associated with any customer group. The Company users will have their corresponding customer records assigned to No Group in BigCommerce.
Authentication
- X-Auth-Token in header
Parameters
- X-Store-Hash in header - stringrequiredThe unique store hash associated with a BigCommerce store that has B2B Edition enabled.Example: abc123
Body
firstNamestring
requiredUser's first name.Example: MarielastNamestring
requiredUser's last name.Example: Curieemailstring
requiredUser's email address. This must be unique within B2B Edition.Example: john.doe@example.comphoneNumberstring
User's phone number.Example: +1-555-123-4567roleinteger
requiredNumeric code representing the user's role as admin (0
), senior buyer (1
), or junior buyer (2
).Allowed: 0 | 1 | 2
Example: 1companyRoleIdinteger
Numeric code representing the user's Company-specific role. When present this field overrides the value of therole
field.Example: 10uuidstring
External identifier for the user. This field may be used to represent any external user ID. Using the nameuuid
, B2B Edition does not require the field to be unique.Example: user-uuid-1extraFieldsarray[object]
companyIdinteger
requiredThe unique numeric ID associated with the user's B2B Edition Company account.Example: 42acceptWelcomeEmailboolean
Indicates whether the user will receive a welcome email when the account is created.originChannelIdinteger
The ID of the originating channel. A value of0
will unset the user's origin channel, which may result in unexpected behavior. To avoid errors, ensure all necessary channels are included inchannelIds
.Example: 1channelIdsarray[integer]
requiredList of numeric channel IDs the user is associated with. These represent the storefront channels the user can log in to and do business.
example
Response
Body
codeinteger
Operation status code.Default: 200
dataobject
example
Bulk Create Users
POST https://api-b2b.bigcommerce.com/api/v3/io/users/bulkRequest
Create up to 10 Company users at once.
With (Independent Company behavior)[/b2b-edition/apis/rest-management/company/companies#independent-vs-dependent-companies-behavior] enabled, B2B Edition Company accounts are the source of truth for defining a Company user’s customer group assignment. If no default customer group is configured or the set value of customerGroupId
is 0, the B2B Company will not be associated with any customer group. The Company users will have their corresponding customer records assigned to No Group in BigCommerce.
Authentication
- X-Auth-Token in header
Parameters
- X-Store-Hash in header - stringrequiredThe unique store hash associated with a BigCommerce store that has B2B Edition enabled.Example: abc123
Body
firstNamestring
requiredUser's first name.Example: MarielastNamestring
requiredUser's last name.Example: Curieemailstring
requiredUser's email address. This must be unique within B2B Edition.Example: john.doe@example.comphoneNumberstring
User's phone number.Example: +1-555-123-4567roleinteger
requiredNumeric code representing the user's role as admin (0
), senior buyer (1
), or junior buyer (2
).Allowed: 0 | 1 | 2
Example: 1companyRoleIdinteger
Numeric code representing the user's Company-specific role. When present this field overrides the value of therole
field.Example: 10uuidstring
External identifier for the user. This field may be used to represent any external user ID. Using the nameuuid
, B2B Edition does not require the field to be unique.Example: user-uuid-1extraFieldsarray[object]
companyIdinteger
requiredThe unique numeric ID associated with the user's B2B Edition Company account.Example: 42acceptWelcomeEmailboolean
Indicates whether the user will receive a welcome email when the account is created.originChannelIdinteger
The ID of the originating channel. A value of0
will unset the user's origin channel, which may result in unexpected behavior. To avoid errors, ensure all necessary channels are included inchannelIds
.Example: 1channelIdsarray[integer]
requiredList of numeric channel IDs the user is associated with. These represent the storefront channels the user can log in to and do business.
example
Response
Body
codeinteger
Operation status code.Default: 200
dataarray[object]
example
Get User Details
GET https://api-b2b.bigcommerce.com/api/v3/io/users/{userId}Request
userId
. Unlike Get All Users, this endpoint includes extra fields by default.Authentication
- X-Auth-Token in header
Parameters
- X-Store-Hash in header - stringrequiredThe unique store hash associated with a BigCommerce store that has B2B Edition enabled.Example: abc123
- userId in path - integerrequiredThe unique identifier of the user as reported by Get All Users.Example: 123
example
Response
Body
codeinteger
Operation status code.Default: 200
dataobject
example
Update User Details
PUT https://api-b2b.bigcommerce.com/api/v3/io/users/{userId}Request
userId
. All fields may be updated except companyId
and originChannelId
, which are read-only for a user account.Authentication
- X-Auth-Token in header
Parameters
- X-Store-Hash in header - stringrequiredThe unique store hash associated with a BigCommerce store that has B2B Edition enabled.Example: abc123
- userId in path - integerrequiredThe unique identifier of the user as reported by Get All Users.Example: 123
Body
firstNamestring
User's first name.Example: MarielastNamestring
User's last name.Example: Curieemailstring
User's email address. This must be unique within B2B Edition.Example: john.doe@example.comphoneNumberstring
User's phone number.Example: +1-555-123-4567roleinteger
Numeric code representing the user's role as admin (0
), senior buyer (1
), or junior buyer (2
).Allowed: 0 | 1 | 2
Example: 1companyRoleIdinteger
Numeric code representing the user's Company-specific role. When present this field overrides the value of therole
field.Example: 10uuidstring
External identifier for the user. This field may be used to represent any external user ID. Using the nameuuid
, B2B Edition does not require the field to be unique.Example: user-uuid-1extraFieldsarray[object]
channelIdsarray[integer]
List of numeric channel IDs the user is associated with. These represent the storefront channels the user can log in to and do business.
example
Response
Body
codeinteger
Operation status code.Default: 200
dataobject
example
Delete a User
DELETE https://api-b2b.bigcommerce.com/api/v3/io/users/{userId}Request
Deletes a B2B Edition user account. This endpoint does not delete the BigCommerce customer account. Attempting to delete the last user in a Company will fail, but deleting all admin users will not.
NOTE:
Deleting the only admin user in a Company may result in the Company being unable to do business on your storefront. When using this endpoint, care must be taken to avoid deleting the last admin user.
Authentication
- X-Auth-Token in header
Parameters
- X-Store-Hash in header - stringrequiredThe unique store hash associated with a BigCommerce store that has B2B Edition enabled.Example: abc123
- userId in path - integerrequiredThe unique identifier of the user as reported by Get All Users.Example: 123
example
Response
Body
codeinteger
Operation status code.Default: 200
dataobject
example
Get User Details by BigCommerce Customer ID
GET https://api-b2b.bigcommerce.com/api/v3/io/users/customer/{customerId}Request
customerId
. Analogous to Get User Details. If the B2B Edition customer account associated with customerId
has been deleted, this will return a 404
error.Authentication
- X-Auth-Token in header
Parameters
- X-Store-Hash in header - stringrequiredThe unique store hash associated with a BigCommerce store that has B2B Edition enabled.Example: abc123
- customerId in path - integerrequiredThe unique numeric ID associated with the BigCommerce customer account. This does not match the
userId
assigned by B2B Edition.Example: 12345
example
Response
Body
codeinteger
Operation status code.Default: 200
dataobject
example
List extra fields for users
GET https://api-b2b.bigcommerce.com/api/v3/io/users/extra-fieldsRequest
Authentication
- X-Auth-Token in header
Parameters
- X-Store-Hash in header - stringrequiredThe unique store hash associated with a BigCommerce store that has B2B Edition enabled.Example: abc123
- offset in query0 - integerThe number of items to skip before starting to collect the result set.
- limit in query with default of 10 - integerThe maximum number of results to return.
example
Response
Body
codeinteger
Example: 200dataarray[object]