Storefront APIs
Super Admin

Super Admin

Super Admin Begin Masquerade

PUT /sales-reps/{userId}/companies/{companyId}/begin-masq

Request

Update status for when a super admin masquerades as a company by userId and companyId. Equivalent Storefront GraphQL API Mutation: superAdminBeginMasquerade. For more information, see the GraphQL Playground.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Parameters

  • companyId in path - string
    required
    Unique company ID in B2B Edition
  • userId in path - string
    required
    Unique user ID in B2B Edition

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {
"email": "example@example.com",
"firstName": "Jo",
"lastName": "Sweet",
"phoneNumber": "123456789"
}
}

Super Admin End Masquerade

PUT /sales-reps/{userId}/companies/{companyId}/end-masq

Request

Update status for when a super admin masquerades as a company by userId and companyId. Equivalent Storefront GraphQL API Mutation: superAdminEndMasquerade. For more information, see the GraphQL Playground.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Parameters

  • companyId in path - string
    required
    Unique ID of a company in B2B Edition
  • userId in path - string
    required
    Unique ID of a user in B2B Edition

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {}
}

Get Masquerading Company

GET /sales-reps/{customerId}/companies/masquerading

Request

Get company information for the current super admin masquerading. Equivalent Storefront GraphQL API Query: superAdminMasquerading. For more information, see the GraphQL Playground.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Parameters

  • customerId in path - string
    required
    Unique ID of a company in BigCommerce

example

curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v2/sales-reps/[customerId]/companies/masquerading' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {
"companyName": "company name",
"description": "",
"addressLine1": "address line 1",
"addressLine2": "address line 2",
"companyStatus": "1",
"city": "Denver",
"state": "",
"zipCode": "80022",
"country": "Aruba",
"companyId": "5716",
"catalogId": "5",
"extraFields": [
{
"fieldName": "test",
"fieldValue": "test"
}
]
}
}

Get Company List by Super Admin

GET /sales-reps/{salesRepId}/companies

Request

Get companies by Super Admin ID. Equivalent Storefront GraphQL API Query: superAdminCompanies. For more information, see the GraphQL Playground.

Authentication

  • Authorization in header in the format of Bearer {{token}}

Parameters

  • salesRepId in path - string
    required
    Unique ID of super admin
  • offset in query - integer
  • limit in query - integer
  • orderBy in query - string
  • sortBy in query - string
    Example: DESC, ASC
  • q in query - string
  • companyId in query - string

example

curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v2/sales-reps/[salesRepId]/companies' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'

Response

OK

Body

object | application/json
  • code
    number
    required

  • message
    string
    required

    >= 1 characters
  • data
    object
    required

example-1

{
"code": 200,
"message": "SUCCESS",
"data": {
"list": [
{
"companyName": "company name",
"bcGroupName": "bc group name",
"companyAdminName": "judy he",
"companyEmail": "example@example.com",
"companyId": "84",
"extraFields": [
{
"fieldName": "company_tax_exempt_code",
"labelName": "Company Tax Exempt Code",
"dataType": "0",
"isRequired": "0",
"fieldValue": ""
}
]
}
],
"pagination": {
"totalCount": 1,
"perCount": 1,
"offset": 0,
"limit": 10
Did you find what you were looking for?