User
BigCommerce B2B Edition Company User
Get a User
GET https://api-b2b.bigcommerce.com/api/v3/io/users/{userId}Request
Authentication
- authToken in header
Parameters
- userId in path - integerrequiredThe unique numeric ID of this user.
example
Response
Body
codeinteger
Response code of success request.Example: 200dataobject
Company user base model.Example: {"extraFields":[{"fieldName":"string","fieldValue":"string"}]}
example
Update a User
PUT https://api-b2b.bigcommerce.com/api/v3/io/users/{userId}Request
Authentication
- authToken in header
Parameters
- userId in path - integerrequiredThe unique numeric ID of this user.
Body
idinteger
requiredread-onlyUnique numeric ID of this User. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request.Example: 1uuidstring
UUID of userExample: 095be615createdAtinteger
read-onlyCreate timestamp of the userExample: 1574999690updatedAtinteger
read-onlyUpdate timestamp of the userExample: 1574999690emailstring
requiredEmail address of the user<= 150 charactersExample: user@example.comfirstNamestring
requiredFirst name of the user<= 150 charactersExample: TomlastNamestring
requiredLast name of the user<= 150 charactersExample: CatphoneNumberstring
Phone number of the user<= 150 charactersExample: 112233roleinteger
requiredUser role (0=admin 1=senior_buyer 2=junior_buyer)Allowed: 0 | 1 | 2
Example: 1customerIdinteger
read-onlyThe BigCommerce customer IDExample: 12extraFieldsarray[object]
channelIdsarray[integer]
BigCommerce channel ID list. Do not input this field if you don't want to update user channels.companyRoleIdinteger
The company role ID. This field is only applicable to the company's RBAC feature. If your store doesn't utilize this feature, please do not use this field.
example-1
Response
Body
codeinteger
Response code of success request.Example: 200dataobject
Company user base model.Example: {"extraFields":[{"fieldName":"string","fieldValue":"string"}]}
example-1
Delete a User
DELETE https://api-b2b.bigcommerce.com/api/v3/io/users/{userId}Request
Authentication
- authToken in header
Parameters
- userId in path - integerrequiredThe unique numeric ID of this user.
example
Response
Body
codeinteger
Response code of success request.Example: 200dataobject
example-1
Get Users
GET https://api-b2b.bigcommerce.com/api/v3/io/usersRequest
Authentication
- authToken in header
Parameters
- offset in query - integerPagination offset default: 0
- limit in query with default of 10 - integerPagination limit default: 10
- minModified in query - numberMinimum modified timestamp
- maxModified in query - numberMaximum modified timestamp
- minCreated in query - numberMinimum created timestamp
- maxCreated in query - numberMaximum created timestamp
- roles in query - arrayuser roles(0=admin 1=senior_buyer 2=junior_buyer) e.g., role[]=1, 2. default empty to get all.Type: array[number]
- companyId in query - integerCompany ID
- q in query - stringUser query string.Supported fields: email, e.g., ?q=xyz@abc.com
- email in query - stringFilter users accurately by email. Should be a correct email.
- isIncludeExtraFields in query - stringIs show extra fields in the response
Allowed: 0 | 1
- channelId in query - integerBigCommerce channel ID
example
Response
Body
codeinteger
Response code of success request.Example: 200dataarray[object]
example
Create a User
POST https://api-b2b.bigcommerce.com/api/v3/io/usersRequest
Create a company user within an existing company.
When you enable
independent company behavior
, 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 ofcustomerGroupId
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.When you turn off
independent company behavior
, the BigCommerce customer record's customer group assignment will be the source of truth for defining a company user's company assignment.
Authentication
- authToken in header
Body
companyIdinteger
requiredCompany IDExample: 2emailstring
requiredEmail address of the user<= 150 charactersExample: user@example.comfirstNamestring
requiredFirst name of the user<= 150 charactersExample: TomlastNamestring
requiredLast name of the user<= 150 charactersExample: CatphoneNumberstring
Phone number of the user<= 150 charactersExample: 112233roleinteger
requiredUser role (0=admin 1=senior_buyer 2=junior_buyer)Allowed: 0 | 1 | 2
Example: 1customerIdinteger
read-onlyThe BigCommerce customer IDExample: 12acceptWelcomeEmailboolean
If the user accepts, send a welcome email.uuidstring
UUID of userchannelIdsarray[integer]
BigCommerce channel IDoriginChannelIdinteger
BigCommerce channel ID, used for BigCommerce customer origin channel ID. This field takes effect only when the store default b2b channel is not configured.companyRoleIdinteger
The company role ID. This field is only applicable to the company's RBAC feature. If your store doesn't utilize this feature, please do not use this field. When it has a value, it will override the value of the role field.extraFieldsarray[object]
example-1
Response
Body
codeinteger
Response code of success request.Example: 200dataobject
example-1
Bulk Create Company User
POST https://api-b2b.bigcommerce.com/api/v3/io/users/bulkRequest
Create company users in batch. All of the user should be in same company.
- When the
independent company behavior
is enabled, B2B Edition company accounts are the source of truth for defining a company user’s customer group assignment. If you do not configure a default customer group or the value ofcustomerGroupId
is 0, the B2B company will not be associated with any customer group, and the company users within the company will have their corresponding customer record assigned to "No Group" in BigCommerce.- When the
independent company behavior
is turned off, the BigCommerce customer record’s customer group assignment will be the source of truth for defining a company user’s company assignment.
- When the
Authentication
- authToken in header
Body
companyIdinteger
requiredCompany IDExample: 2emailstring
requiredEmail address of the user<= 150 charactersExample: user@example.comfirstNamestring
requiredFirst name of the user<= 150 charactersExample: TomlastNamestring
requiredLast name of the user<= 150 charactersExample: CatphoneNumberstring
Phone number of the user<= 150 charactersExample: 112233roleinteger
requiredUser role (0=admin 1=senior_buyer 2=junior_buyer)Allowed: 0 | 1 | 2
Example: 1customerIdinteger
read-onlyThe BigCommerce customer IDExample: 12acceptWelcomeEmailboolean
(0=will not receive email 1=will receive email)uuidstring
UUID of userchannelIdsarray[integer]
BigCommerce channel ID listoriginChannelIdinteger
BigCommerce channel ID, used for BigCommerce customer origin channel ID. This field takes effect only when the store default b2b channel is not configuredcompanyRoleIdinteger
The company role ID. This field is only applicable to the company's RBAC feature. If your store doesn't utilize this feature, please do not use this field. When it has a value, it will override the value of the role field.extraFieldsarray[object]
example-1
Response
Body
codeinteger
Response code of success request.Example: 200dataarray[object]
example-1
Get a User by Customer ID
GET https://api-b2b.bigcommerce.com/api/v3/io/users/customer/{customerId}Request
Authentication
- authToken in header
Parameters
- customerId in path - integerrequiredCustomer ID of BigCommerce customer user.
example
Response
Body
codeinteger
Response code of success request.Example: 200dataobject
Company user base model.Example: {"extraFields":[{"fieldName":"string","fieldValue":"string"}]}
example
Get User Extra Field Configs
GET https://api-b2b.bigcommerce.com/api/v3/io/users/extra-fieldsRequest
Authentication
- authToken in header
Parameters
- limit in query with default of 10 - integerPagination limit default: 10
- offset in query - integerPagination offset default: 0
example
Response
Body
codeinteger
Response code of success request.Example: 200dataarray[object]
example
See something you can improve? Edit this file on GitHub