Server to Server Management APIs
Sales Staff

Sales Staff

Sales Staff are backend team members who have access to a set group of Companies and features within B2B Edition. By default, Sales Staff will have the system user role Sales Rep, but you can create custom system user roles within B2B Edition that function as Sales Staff. For more information on configuring system user roles, see B2B Edition User Roles and Permissions (Help Center) (opens in a new tab).

Note: These endpoints are specifically for managing the Company assignments of backend user accounts. To manage frontend user accounts, see User (Server-to-Server) for individual accounts or Company (Server-to-Server) for Company accounts.

Get All Sales Staff

GET /sales-staffs

Request

Returns an array of all B2B Edition users who are assigned to a user role that is labelled as Sales Staff.

Authentication

  • authToken in header

Parameters

  • limit in query with default of 10 - integer
    Maximum number of results to display per page.
  • offset in query0 - integer
    Number of results to skip before displaying the current page.
  • orderBy in query with default of DESC - string
    Sort direction of results, ascending or descending, applied to the sortBy parameter.

    Allowed: DESC | ASC

  • companyId in query - string
    Unique numeric ID of the Company account.
  • minModified in query - integer
    The earliest Unix timestamp that can be returned for a modified Company account.
  • sortBy in query with default of updated_at - string
    Field by which data should be sorted in the response.

    Allowed: updated_at | email

example

curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v3/io/sales-staffs \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

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

    HTTP response code for the request.

    Default: 200

  • meta
    object

    Metadata associated with the response.
  • data
    array[object]

    Data array associated with the response.

example

{
"code": 200,
"meta": {
"message": "SUCCESS",
"pagination": {
"limit": 10,
"offset": 0,
"totalCount": 179
}
},
"data": [
{
"id": 20135,
"email": "user@example.com",
"salesRepName": "Marie Curie",
"roleName": "Sales Rep",
"companyCount": 5
}
]
}

Get Sales Staff Account Details

GET /sales-staffs/{salesStaffId}

Request

Returns detailed information about the Sales Staff account associated with salesStaffId, including an array of Companies to which the account is assigned and when the assignment was made.

Authentication

  • authToken in header

Parameters

  • salesStaffId in path - integer
    required
    Unique numeric ID of the Sales Staff account.

example

curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/sales-staffs/[salesStaffId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

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

    HTTP response code for the request.

    Default: 200

  • meta
    object

    Metadata associated with the response.
  • data
    object

    Data associated with the response.

example

{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": {
"id": 20135,
"email": "user@example.com",
"name": "Marie Curie",
"phoneNumber": "9876543210",
"assignedCompanies": [
{
"id": 123456,
"bcId": "15",
"companyName": "Great Buys, Inc",
"bcGroupName": "Great Buys",
"assignedAt": 1721835018
}
]
}
}

Update Sales Staff Assignments

PUT /sales-staffs/{salesStaffId}

Request

Updates the Company assignments of the Sales Staff account associated with salesStaffId. This operation is non-destructive, meaning that assigning or unassigning a single Company from the Sales Staff does not affect the other assignments.

Authentication

  • authToken in header

Parameters

  • salesStaffId in path - integer
    required
    Unique numeric ID of the Sales Staff account.

Body

array | application/json
  • companyId
    integer
    required

    Unique numeric ID of the Company account.
    Example: 123456
  • assignStatus
    boolean
    required

    Indicates whether the Sales Staff account is being assigned to (true) or unassigned from (false) the Company.

example

[
{
"companyId": 123456,
"assignStatus": true
}
]

Response

OK

Body

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

    HTTP response code for the request.

    Default: 200

  • meta
    object

    Metadata associated with the response.
  • data
    object

    Data associated with the response.

example

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

See something you can improve? Edit this file on GitHub

Did you find what you were looking for?