User
Check Existence of Customer Email
GET https://api-b2b.bigcommerce.com/api/v2/users/validations/existenceRequest
This endpoint is deprecated.
Validate extra fields.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- email in query - stringrequiredEmail address
- storeHash in query - stringrequiredStore Hash
- extraFieldName in query - stringExtra field name
- extraFieldValue in query - stringExtra field value
example
curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v2/users/validations/existence \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'
Response
OK
Body
object | application/json
codenumber
example-1
{
"code": 200,
"message": "Success"
}
Get User List
GET https://api-b2b.bigcommerce.com/api/v2/usersRequest
Get user list.
Equivalent Storefront GraphQL API Query: users
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- limit in query with default of 10 - stringPagination limit
- offset in query with default of 0 - stringPagination offset
- q in query - stringQuery string
- role in query - stringrequiredUser role, "":"ALL", "0":"Admin", "1":"Senior Buyer",“2”: "Junior Buyer","3": "Sales Rep","4": "UNKNOWN"
Allowed: 0 | 1 | 2 | 3 | 4
example
curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v2/users \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
example-1
{
"code": 200,
"message": "SUCCESS",
"data": {
"list": [
{
"id": "1",
"firstName": "Ado",
"lastName": "Bob",
"role": "1",
"createdAt": "1594019538",
"updatedAt": "1596796306",
"email": "example@example.com",
"phoneNumber": "123456789"
}
],
"pagination": {
"totalCount": 1,
"offset": "0",
"limit": "10"
}
}
}
Create a User
POST https://api-b2b.bigcommerce.com/api/v2/usersRequest
Create a user.
Equivalent Storefront GraphQL API Mutation: userCreate
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Body
object | application/json
companyIdstring
requiredUnique company ID>= 1 charactersfirstNamestring
requiredUser's first name>= 1 characterslastNamestring
requiredUser's last name>= 1 charactersemailstring
requiredUser's email>= 1 charactersphoneNumberstring
requiredUser's phone numberrolestring
required"0":"Admin", "1":"Senior Buyer",“2”: "Junior Buyer"Allowed: 0 | 1 | 2
>= 1 characters
example
{
"companyId": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string",
"role": "0"
}
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
example-1
{
"code": 200,
"message": "SUCCESS",
"data": {
"userId": "7843",
"bcId": "8230",
"firstName": "Jo",
"lastName": "Sweet",
"email": "Jo.Sweet@example.com",
"role": "0"
}
}
Get User Information
GET https://api-b2b.bigcommerce.com/api/v2/users/{userId}Request
Get user infomation by userId.
Equivalent Storefront GraphQL API Query: user
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- userId in path - stringrequireduser ID or BigCommerce customer ID
- isBcId in query - stringwhether above userId as BigCommerce Customer ID, "1" for true
example
curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v2/users/[userId]' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
example-1
{
"code": 200,
"message": "SUCCESS",
"data": {
"roleId": "0",
"userId": "7843",
"firstName": "Jo",
"lastName": "Sweet",
"phoneNumber": "",
"email": "Jo.Sweet@example.com"
}
}
Update User Information
PUT https://api-b2b.bigcommerce.com/api/v2/users/{userId}Request
Update user information.
Equivalent Storefront GraphQL API Mutation: userUpdate
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- userId in path - stringrequireduser ID or BigCommerce customer ID
Body
object | application/json
firstNamestring
requiredUser's first name>= 1 characterslastNamestring
requiredUser's last name>= 1 charactersemailstring
requiredUser's email>= 1 charactersphoneNumberstring
requiredUser's phone number>= 1 charactersrolestring
requiredUser role>= 1 characters
example
{
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string",
"role": "string"
}
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
example-1
{
"code": 200,
"message": "SUCCESS",
"data": {}
}
Delete User
DELETE https://api-b2b.bigcommerce.com/api/v2/users/{userId}Request
Delete user.
Equivalent Storefront GraphQL API Mutation: userDelete
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- userId in path - stringrequireduser ID or BigCommerce customer ID
example
curl --request DELETE \
--url 'https://api-b2b.bigcommerce.com/api/v2/users/[userId]' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
example-1
{
"code": 200,
"message": "SUCCESS",
"data": {}
}
Did you find what you were looking for?