User
Update A Company User
PUT https://api-b2b.bigcommerce.com/api/v2/io/companies/{companyId}/user/{userId}⚠️
This endpoint is deprecated.
Request
Update a company user info
Authentication
- authToken in header
Parameters
- companyId in path - stringrequired
- userId in path - stringrequired
- authToken in header - stringrequiredAuth token in header
Body
object | application/json
Extra Field Values
firstNamestring
lastNamestring
phonestring
emailstring
uuidstring
userRolestring
acceptWelcomeEmailstring
channelIdsarray[integer]
BigCommerce channel id list.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 userRole field.extraFieldsarray[object]
example
{
"extraFields": [
{
"fieldName": "string",
"fieldValue": "string"
}
]
}
Response
Body
object | application/json
codenumber
Response status codedataobject
Response data
example
{
"code": 0,
"data": {
"customerId": 0,
"userId": 0
},
"message": "string"
}
Get Company Users
GET https://api-b2b.bigcommerce.com/api/v2/io/companies/{companyId}/users⚠️
This endpoint is deprecated.
Request
Get company users, with pagination data
Authentication
- authToken in header
Parameters
- companyId in path - stringrequired
- authToken in header - stringrequiredAuth token in header.
- offset in query - numberPagination offset default: 0
- limit in query - numberPagination limit default: 10
- role[] in query - stringuser role(0=admin 1=senior_buyer 2=junior_buyer 3=sales_rep) eg. role[]=1, 2
- isIncludeExtraFields in query - string0 or 1
example
curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v2/io/companies/[companyId]/users' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
Response Success
Body
object | application/json
codenumber
Response status codedataobject
Response data
example
{
"code": 200,
"data": {
"list": [
{
"catalogId": "1",
"createdAt": "1574999690",
"email": "test323@test.com",
"firstName": "test",
"id": "123",
"lastName": "test2",
"phoneNumber": "",
"role": "1",
"updatedAt": "1574999690",
"uuid": "A123456",
"channelList": []
}
],
"pagination": {
"limit": 10,
"offset": 0,
"totalCount": 1
}
},
"message": "SUCCESS"
}
Update Company User
PUT https://api-b2b.bigcommerce.com/api/v2/io/companies/{companyId}/users⚠️
This endpoint is deprecated.
Request
Update company user's field, user identified by email field.fields can not omit
Authentication
- authToken in header
Parameters
- companyId in path - stringrequired
- authToken in header - stringrequiredAuth token in header.
Body
object | application/json
Extra Field Values
acceptWelcomeEmailstring
(0=will not receive email 1=will receive email)Allowed: 0 | 1
emailstring
requiredfirstNamestring
requiredlastNamestring
requiredphonestring
userRolestring
user role(0=admin 1=senior_buyer 2=junior_buyer 3=sales_rep)uuidstring
channelIdsarray[integer]
BigCommerce channel id listcompanyRoleIdinteger
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 userRole field.extraFieldsarray[object]
example
{
"extraFields": [
{
"fieldName": "string",
"fieldValue": "string"
}
]
}
Response
Response Success
Body
object | application/json
codenumber
Response status codedataobject
Response data
example
{
"code": 200,
"data": {
"customerId": "2",
"userId": "2"
},
"message": "Success"
}
Create A Company User
POST https://api-b2b.bigcommerce.com/api/v2/io/companies/{companyId}/users⚠️
This endpoint is deprecated.
Request
Create a company user, which belongs company
Authentication
- authToken in header
Parameters
- companyId in path - stringrequired
- authToken in header - stringrequiredAuth token in header.
Body
object | application/json
Extra Field Values
acceptWelcomeEmailstring
(0=will not receive email 1=will receive email)Allowed: 0 | 1
emailstring
requiredfirstNamestring
requiredlastNamestring
requiredphonestring
requireduserRolestring
user role(0=admin 1=senior_buyer 2=junior_buyer 3=sales_rep)uuidstring
channelIdsarray[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 userRole field.extraFieldsarray[object]
example
{
"extraFields": [
{
"fieldName": "string",
"fieldValue": "string"
}
]
}
Response
Response Success
Body
object | application/json
codenumber
Response status codedataobject
Response data
example
{
"code": 200,
"data": {
"customerId": "2",
"userId": "2"
},
"message": "Success"
}
Bulk Create Company User
POST https://api-b2b.bigcommerce.com/api/v2/io/companies/{companyId}/users/bulk_create⚠️
This endpoint is deprecated.
Request
Create company users in batch
Authentication
- authToken in header
Parameters
- companyId in path - stringrequired
- authToken in header - stringrequiredAuth token in header.
Body
object | application/json
Request body
acceptWelcomeEmailstring
(0=will not receive email 1=will receive email)Allowed: 0 | 1
usersarray[object]
example
{
"acceptWelcomeEmail": "0",
"users": [
{
"extraFields": [
{
"fieldName": "string",
"fieldValue": "string"
}
]
}
]
}
Response
Response Success
Body
object | application/json
codenumber
Response status codedataobject
Response data
example
{
"code": 200,
"data": {
"failedItems": [],
"successfulItems": [
{
"customerId": 2,
"email": "test323@test121.com",
"firstName": "test11",
"lastName": "test2",
"phone": "122331211",
"userRole": 1
},
{
"customerId": 2,
"email": "test323@test22.com",
"firstName": "test12",
"lastName": "test2",
"phone": "122331212",
"userRole": 1
}
]
},
"message": "Success"
}
Get A Company User
GET https://api-b2b.bigcommerce.com/api/v2/io/companies/{companyId}/users/{customerId}⚠️
This endpoint is deprecated.
Request
Get a company user's info, by company and customer id
Authentication
- authToken in header
Parameters
- companyId in path - stringrequired
- customerId in path - stringrequired
- authToken in header - stringrequiredAuth token in header.
example
curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v2/io/companies/[companyId]/users/[customerId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
Response Success
Body
object | application/json
codenumber
Response status codedataobject
Extra Field ValuesExample: {"extraFields":[{"fieldName":"string","fieldValue":"string"}]}
example
{
"code": 200,
"data": {
"catalogId": "1",
"createdAt": "1574999690",
"email": "test323@test.com",
"firstName": "test",
"id": "123",
"lastName": "test2",
"phoneNumber": "",
"role": "1",
"updatedAt": "1574999690",
"uuid": "A123456",
"channelList": []
},
"message": "SUCCESS"
}
Delete A Company User
DELETE https://api-b2b.bigcommerce.com/api/v2/io/companies/{companyId}/users/{customerId}⚠️
This endpoint is deprecated.
Request
Delete a company user, if this user is the only one administrator of company, will return a 500 Error
Authentication
- authToken in header
Parameters
- companyId in path - stringrequired
- customerId in path - stringrequired
- authToken in header - stringrequiredAuth token in header
example
curl --request DELETE \
--url 'https://api-b2b.bigcommerce.com/api/v2/io/companies/[companyId]/users/[customerId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
Deleted successful
Body
object | application/json
codenumber
Response status codedataobject
Response data
example
{
"code": 200,
"data": {
"customerId": 2
},
"message": "Success"
}
Did you find what you were looking for?