Storefront APIs
Super Admin

Super Admin

Get a Super Admin's Assigned Companies

GET /sales-reps/{superAdminId}/companies

Request

Returns the list of Companies that the Super Admin is assigned to.

Equivalent Storefront GraphQL API Query: superAdminCompanies. For more information, see the GraphQL Playground.

Authentication

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

Parameters

  • superAdminId in path - integer
    required
    The unique numeric ID assigned to the Super Admin by B2B Edition. This ID does not match the BigCommerce customer account ID. To find the ID of a given Super Admin account, use the Server-to-Server Super Admin API.
  • offset in query0 - integer
    Number of results to skip before displaying the current page.
  • limit in query with default of 10 - integer
    Maximum number of results to display per page. Values over 250 will return only 250 results.
  • orderBy in query - string
    Determines the Company field by which results will be sorted. If this is omitted, results are sorted by companyId.

    Allowed: companyName | companyAdminName | companyEmail

  • sortBy in query with default of DESC - string
    Determines the sort order (ascending or descending) of the results.

    Allowed: DESC | ASC

  • q in query - string
    Search string for filtering results. If this parameter is provided, results will include entries with a partial match in companyName or companyAdminEmail.
  • companyId in query - string
    Search string for filtering results by companyId. Only returns data with an exact match in companyId. This ID does not match the ID shown in B2B Edition. To get a specific Company's ID, use the Server-to-Server Company API.

example

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

Response

OK

Body

object | application/json
Response body for the request.
  • code
    integer

    HTTP response code for the request.

    Default: 200

  • message
    string

    Message indicating the status of the request.

    Default: SUCCESS

  • data
    object

    Data associated with the response.

example

{
"code": 200,
"message": "SUCCESS",
"data": {
"list": [
{
"companyName": "Great Buys, Inc.",
"companyId": "123456",
"extraFields": [
{
"fieldName": "Company Tax Code",
"fieldValue": "Tax Code G"
}
],
"bcGroupName": "Great Buys Customers",
"companyAdminName": "Marie Curie",
"companyEmail": "admin@example.com"
}
]
},
"pagination": {
"totalCount": 279,
"perCount": 33,
"offset": 0,
"limit": 10
}
}

Get a Super Admin's Current Masquerading Company

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

Request

Returns basic details for the Company the Super Admin is currently masquerading as.

Equivalent Storefront GraphQL API Query: superAdminMasquerading. For more information, see the GraphQL Playground.

Authentication

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

Parameters

  • superAdminId in path - integer
    required
    The unique numeric ID assigned to the Super Admin by B2B Edition. This ID does not match the BigCommerce customer account ID. To find the ID of a given Super Admin account, use the Server-to-Server Super Admin API.

example

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

Response

OK

Body

object | application/json
Response body for the request.
  • code
    integer

    HTTP response code for the request.

    Default: 200

  • message
    string

    Message indicating the status of the request.

    Default: SUCCESS

  • data
    object

    Data associated with the response.

example

{
"code": 200,
"message": "SUCCESS",
"data": {
"companyName": "Great Buys, Inc.",
"companyId": "123456",
"extraFields": [
{
"fieldName": "Company Tax Code",
"fieldValue": "Tax Code G"
}
],
"description": "Great Buys Sales",
"companyStatus": "1",
"addressLine1": "123 Test Street",
"addressLine2": "Building 1",
"city": "Austin",
"state": "Texas",
"zipCode": "78726",
"country": "United States",
"catalogId": "123456"
}
}

Begin a Super Admin Masquerade

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

Request

Updates the status of the Super Admin associated with superAdminId to masquerade as the Company associated with 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

  • superAdminId in path - integer
    required
    The unique numeric ID assigned to the Super Admin by B2B Edition. This ID does not match the BigCommerce customer account ID. To find the ID of a given Super Admin account, use the Server-to-Server Super Admin API.
  • companyId in path - integer
    required
    The unique numeric ID for a Company to which the Super Admin is assigned. To find a Company ID, use the Server-to-Server B2B Company API. For stores using Dependent Company behavior, this does not match the ID found in B2B Edition.

Response

OK

Body

object | application/json
Response body for the request.
  • code
    integer

    HTTP response code for the request.

    Default: 200

  • message
    string

    Message indicating the status of the request.

    Default: SUCCESS

  • data
    object

    Data associated with the response.

example

{
"code": 200,
"message": "SUCCESS",
"data": {
"email": "marie@example.com",
"firstName": "Marie",
"lastName": "Curie",
"phoneNumber": 9876543210
}
}

End a Super Admin Masquerade

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

Request

Updates the status of the Super Admin associated with superAdminId, ending their masquerade as the Company associated with 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

  • superAdminId in path - integer
    required
    The unique numeric ID assigned to the Super Admin by B2B Edition. This ID does not match the BigCommerce customer account ID. To find the ID of a given Super Admin account, use the Server-to-Server Super Admin API.
  • companyId in path - integer
    required
    The unique numeric ID for a Company to which the Super Admin is assigned. To find a Company ID, use the Server-to-Server B2B Company API. For stores using Dependent Company behavior, this does not match the ID found in B2B Edition.

Response

OK

Body

object | application/json
Response body for the request.
  • code
    integer

    HTTP response code for the request.

    Default: 200

  • message
    string

    Message indicating the status of the request.

    Default: SUCCESS

  • data
    object

    Data associated with the response.

example

{
"code": 200,
"message": "SUCCESS",
"data": {}
}
Did you find what you were looking for?