Skip to main content
POST
/
commerce
/
customer
/
b2baccounts
/
{accountId}
/
salesrep
/
{userId}
Error
A valid request URL is required to generate request examples
{
  "accountType": "<string>",
  "attributes": [
    {
      "attributeDefinitionId": 123,
      "auditInfo": {
        "createBy": "<string>",
        "createDate": "2023-11-07T05:31:56Z",
        "updateBy": "<string>",
        "updateDate": "2023-11-07T05:31:56Z"
      },
      "fullyQualifiedName": "<string>",
      "values": [
        "<unknown>"
      ]
    }
  ],
  "auditInfo": {
    "createBy": "<string>",
    "createDate": "2023-11-07T05:31:56Z",
    "updateBy": "<string>",
    "updateDate": "2023-11-07T05:31:56Z"
  },
  "commerceSummary": {
    "lastOrderDate": "2023-11-07T05:31:56Z",
    "orderCount": 123,
    "totalOrderAmount": {
      "amount": 123,
      "currencyCode": "<string>"
    },
    "visitsCount": 123,
    "wishlistCount": 123
  },
  "companyOrOrganization": "<string>",
  "contacts": [
    {
      "accountId": 123,
      "address": {
        "address1": "<string>",
        "address2": "<string>",
        "address3": "<string>",
        "address4": "<string>",
        "addressType": "<string>",
        "cityOrTown": "<string>",
        "countryCode": "<string>",
        "isValidated": true,
        "postalOrZipCode": "<string>",
        "stateOrProvince": "<string>"
      },
      "auditInfo": {
        "createBy": "<string>",
        "createDate": "2023-11-07T05:31:56Z",
        "updateBy": "<string>",
        "updateDate": "2023-11-07T05:31:56Z"
      },
      "companyOrOrganization": "<string>",
      "email": "<string>",
      "faxNumber": "<string>",
      "firstName": "<string>",
      "id": 123,
      "label": "<string>",
      "lastNameOrSurname": "<string>",
      "middleNameOrInitial": "<string>",
      "phoneNumbers": {
        "home": "<string>",
        "mobile": "<string>",
        "work": "<string>"
      },
      "types": [
        {
          "isPrimary": true,
          "name": "<string>"
        }
      ]
    }
  ],
  "customerSet": "<string>",
  "customerSinceDate": "2023-11-07T05:31:56Z",
  "externalId": "<string>",
  "id": 123,
  "migrationRequired": true,
  "notes": [
    {
      "auditInfo": {
        "createBy": "<string>",
        "createDate": "2023-11-07T05:31:56Z",
        "updateBy": "<string>",
        "updateDate": "2023-11-07T05:31:56Z"
      },
      "content": "<string>",
      "id": 123
    }
  ],
  "segments": [
    {
      "auditInfo": {
        "createBy": "<string>",
        "createDate": "2023-11-07T05:31:56Z",
        "updateBy": "<string>",
        "updateDate": "2023-11-07T05:31:56Z"
      },
      "code": "<string>",
      "description": "<string>",
      "id": 123,
      "name": "<string>"
    }
  ],
  "taxExempt": true,
  "taxId": "<string>",
  "approvalStatus": "<string>",
  "isActive": true,
  "parentAccountId": 123,
  "priceList": "<string>",
  "priority": 123,
  "rootAccountId": 123,
  "salesReps": [
    {
      "accountId": 123,
      "adminUserId": "<string>"
    }
  ],
  "users": [
    {
      "acceptsMarketing": true,
      "emailAddress": "<string>",
      "firstName": "<string>",
      "hasExternalPassword": true,
      "isActive": true,
      "isLocked": true,
      "isRemoved": true,
      "last2FaDate": "2023-11-07T05:31:56Z",
      "lastName": "<string>",
      "localeCode": "<string>",
      "roles": [
        {
          "assignedInScope": {
            "id": 123,
            "name": "<string>",
            "type": "<string>"
          },
          "auditInfo": {
            "createBy": "<string>",
            "createDate": "2023-11-07T05:31:56Z",
            "updateBy": "<string>",
            "updateDate": "2023-11-07T05:31:56Z"
          },
          "roleId": 123,
          "roleName": "<string>",
          "roleResources": [
            {
              "id": "<string>",
              "type": "<string>"
            }
          ],
          "roleTags": [
            "<string>"
          ],
          "userId": "<string>"
        }
      ],
      "userId": "<string>",
      "userName": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme.

Path Parameters

accountId
integer<int32>
required
userId
string
required

Query Parameters

responseFields
string

limits which fields are returned in the response body

Response

Success

Customer account. Customers provide contact information, view order history, and set email preferences on their account. Merchants can edit accounts to add internal notes or assign them to segments.

accountType
string | null

Type of account.

attributes
object[] | null

List of attributes for the account.

auditInfo
object
commerceSummary
object

Commerce (orders and wishlists) on a customer account which lists all the orders the customer has made with the order date, order amount, and status. Includes cancellations and returns. Also includes wishlist information.

companyOrOrganization
string | null

The company or organization name for an account.

contacts
object[] | null

List of contacts for this account. A customer account can have multiple contacts for billing and shipping addresses.

customerSet
string | null
customerSinceDate
string<date-time> | null

Date when the customer account is created.

externalId
string | null
id
integer<int32>

Unique identifier of the account, also known as a customer number.

migrationRequired
boolean

Indicates Subscription migration is required or not.

notes
object[] | null

List of notes for the account. Merchants use these internal notes, for example, to make a note of a customer's interests or complaints. Notes are available only from the merchant's view, customers cannot view these notes.

segments
object[] | null

List of segments assigned to account. Merchants create segments, for example, to manage discounts or assign VIP status. Then they assign the account to the segment. An account can belong to several segments or none at all.

taxExempt
boolean
taxId
string | null
approvalStatus
string | null

Status on B2B account.

isActive
boolean | null

Is the B2B account active?

parentAccountId
integer<int32> | null

Parent account Id in B2B hierarchy

priceList
string | null

Price list on B2B account.

priority
integer<int32> | null

Priority of the b2b account for order release

rootAccountId
integer<int32> | null

Root account Id in B2B hierarchy

salesReps
object[] | null

List of sales rep on B2B account.

users
object[] | null

List of B2B users on the account.