> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kibocommerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Sales Reps On B2B Account

> Updates list of  sales reps on a B2B account.



## OpenAPI

````yaml /openapi/openapi_customer.json put /commerce/customer/b2baccounts/{accountId}/salesrep
openapi: 3.0.1
info:
  description: |-
    <div id="overview_CUSTOMER">
                <h2>CUSTOMER</h2>
                <p>The Customer API manages a customer's information, including their billing and shipping address
                    information,
                    contact information, order history, lifetime value, and more. It allows for customers to be grouped into
                    sets
                    to control the specific sites they can access using the same login credentials, as well as supports the
                    B2B
                    commerce feature that includes a hierarchy of customer accounts. For more information about customer management and the Unified Commerce Admin UI, see the <a href="/pages/b2c">general</a> and <a href="/pages/b2b">B2B</a> customers guides.</p>
                <p>Use the <strong>B2B</strong> and <strong>Customer Accounts</strong> resources to manage the components of shopper accounts, including
                    attributes, contact information, company notes, and groups associated with the customer account.</p>
                <p>Use the <strong>Address Validation</strong> resource to validate addresses associated with a customer account contact.</p>
                <p><strong>Customer Attributes</strong> are custom attributes that you can apply to customer accounts to add further
                    definition for special uses, such as marketing campaigns, or discounts. Refer to the <a href="/pages/customer-attributes">Customer
                        Attributes user guide</a> for more information.</p>
                <p>Use the <strong>Customer Credits</strong> resource to manage the store credit associated with a customer account. Store
                    credit can represent a static amount the customer can redeem at any of the tenant's sites, or a gift
                    card registered for a customer account. At this time, gift card functionality is reserved for future
                    use.</p>
                <p>Use the <strong>Customer Segments</strong> resource to manage groups of customers and target discounts for these segments. After a customer segment is defined, you can
                    associate any number of customer accounts with it. Meanwhile, the <strong>Customer Sets</strong> resource controls the specific sites your customers can access using the same
                    login credentials, as well as what My Account storefront customer information is shared between sites.</p>
                <p>Use the <strong>Visits</strong> resource to manage all visits a customer makes to a tenant's sites and measure the level
                    of transactions a customer performs during a unique visit for customer account analytics. Track customer
                    visits by site (including online and in-person interactions), the transactions a customer performs
                    during the visit, and the device type associated with the visit, if any.</p>
                <p>Use the <strong>Customer In-Stock Notification Subscription</strong> resource to manage the subscriptions customer
                    accounts use to send product notifications. This resource can send a notification when a product in a
                    catalog returns to a site's active inventory after it is out of stock, or when a new product becomes
                    available for the first time. (Not supported for bundled products.)</p>
                <p>Use the <strong>Storefront Auth Ticket</strong> resource to generate and refresh authentication tickets for
                    customer accounts.</p>
            </div>
  title: Customer
  version: 0.0.1
servers:
  - description: Kibo Base URL
    url: '{baseUrl}/api'
    variables:
      baseUrl:
        default: https://t1000000.sb.usc1.gcp.kibocommerce.com
        description: Base URL
security:
  - bearerAuth: []
paths:
  /commerce/customer/b2baccounts/{accountId}/salesrep:
    put:
      tags:
        - B2BAccount
      summary: Update Sales Reps On B2B Account
      description: Updates list of  sales reps on a B2B account.
      parameters:
        - description: ''
          in: path
          name: accountId
          required: true
          schema:
            format: int32
            type: integer
        - description: limits which fields are returned in the response body
          in: query
          name: responseFields
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              items:
                type: string
              type: array
        description: ''
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/B2BAccount'
            text/json:
              schema:
                $ref: '#/components/schemas/B2BAccount'
            text/plain:
              schema:
                $ref: '#/components/schemas/B2BAccount'
          description: OK
components:
  schemas:
    B2BAccount:
      description: >-
        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.
      properties:
        accountType:
          description: Type of account.
          nullable: true
          type: string
        approvalStatus:
          description: Status on B2B account.
          nullable: true
          type: string
        attributes:
          description: List of attributes for the account.
          items:
            $ref: '#/components/schemas/CustomerAttribute'
          nullable: true
          type: array
        auditInfo:
          $ref: '#/components/schemas/AdminUserAuditInfo'
        commerceSummary:
          $ref: '#/components/schemas/CommerceSummary'
        companyOrOrganization:
          description: The company or organization name for an account.
          nullable: true
          type: string
        contacts:
          description: >-
            List of contacts for this account. A customer account can have
            multiple contacts for billing and shipping addresses.
          items:
            $ref: '#/components/schemas/CustomerContact'
          nullable: true
          type: array
        customerSet:
          nullable: true
          type: string
        customerSinceDate:
          description: Date when the customer account is created.
          format: date-time
          nullable: true
          type: string
        externalId:
          nullable: true
          type: string
        id:
          description: Unique identifier of the account, also known as a customer number.
          format: int32
          type: integer
        isActive:
          description: Is the B2B account active?
          nullable: true
          type: boolean
        migrationRequired:
          description: Indicates Subscription migration is required or not.
          type: boolean
        notes:
          description: >-
            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.
          items:
            $ref: '#/components/schemas/CustomerNote'
          nullable: true
          type: array
        parentAccountId:
          description: Parent account Id in B2B hierarchy
          format: int32
          nullable: true
          type: integer
        priceList:
          description: Price list on B2B account.
          nullable: true
          type: string
        priority:
          description: Priority of the b2b account for order release
          format: int32
          nullable: true
          type: integer
        rootAccountId:
          description: Root account Id in B2B hierarchy
          format: int32
          nullable: true
          type: integer
        salesReps:
          description: List of sales rep on B2B account.
          items:
            $ref: '#/components/schemas/AccountSalesRep'
          nullable: true
          type: array
        segments:
          description: >-
            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.
          items:
            $ref: '#/components/schemas/CustomerCustomerSegment'
          nullable: true
          type: array
        taxExempt:
          type: boolean
        taxId:
          nullable: true
          type: string
        users:
          description: List of B2B users on the account.
          items:
            $ref: '#/components/schemas/B2BUser'
          nullable: true
          type: array
      type: object
    CustomerAttribute:
      properties:
        adminName:
          maxLength: 50
          nullable: true
          type: string
        attributeCode:
          maxLength: 50
          minLength: 1
          type: string
        attributeFQN:
          nullable: true
          type: string
        attributeMetadata:
          items:
            $ref: '#/components/schemas/CustomerAttributeMetadataItem'
          nullable: true
          type: array
        auditInfo:
          $ref: '#/components/schemas/AdminUserAuditInfo'
        availableForDiscounts:
          type: boolean
        availableForOrderRouting:
          type: boolean
        content:
          $ref: '#/components/schemas/CommerceRuntimeAttributeLocalizedContent'
        dataType:
          nullable: true
          type: string
        displayGroup:
          minLength: 1
          type: string
        id:
          format: int32
          nullable: true
          type: integer
        inputType:
          nullable: true
          type: string
        isActive:
          nullable: true
          type: boolean
        isMultiValued:
          nullable: true
          type: boolean
        isReadOnly:
          type: boolean
        isRequired:
          nullable: true
          type: boolean
        isVisible:
          nullable: true
          type: boolean
        namespace:
          maxLength: 200
          nullable: true
          type: string
        order:
          format: int32
          nullable: true
          type: integer
        validation:
          $ref: '#/components/schemas/CommerceRuntimeAttributeValidation'
        valueType:
          minLength: 1
          type: string
        vocabularyValues:
          items:
            $ref: '#/components/schemas/CustomerAttributeVocabularyValue'
          nullable: true
          type: array
      required:
        - attributeCode
        - displayGroup
        - valueType
      type: object
    AdminUserAuditInfo:
      properties:
        createBy:
          nullable: true
          type: string
        createDate:
          format: date-time
          nullable: true
          type: string
        updateBy:
          nullable: true
          type: string
        updateDate:
          format: date-time
          nullable: true
          type: string
      type: object
    CommerceSummary:
      description: >-
        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.
      properties:
        lastOrderDate:
          description: When the last order was placed.
          format: date-time
          nullable: true
          type: string
        orderCount:
          description: Number of orders listed in the order history of a customer account.
          format: int32
          type: integer
        totalOrderAmount:
          $ref: '#/components/schemas/CurrencyAmount'
        visitsCount:
          description: Number of visits for this customer across the entire tenant.
          format: int32
          type: integer
        wishlistCount:
          description: >-
            Number of wishlists listed in the wishlist count of a customer
            account
          format: int32
          type: integer
      type: object
    CustomerContact:
      description: >-
        CustomerContact information for a customer account including the name,
        company, phone numbers, email addresses, and billing and shipping
        addresses (if supplied).
      properties:
        accountId:
          format: int32
          type: integer
        address:
          $ref: '#/components/schemas/CommerceRuntimeAddress'
        auditInfo:
          $ref: '#/components/schemas/AdminUserAuditInfo'
        companyOrOrganization:
          nullable: true
          type: string
        email:
          nullable: true
          type: string
        faxNumber:
          nullable: true
          type: string
        firstName:
          nullable: true
          type: string
        id:
          format: int32
          nullable: true
          type: integer
        label:
          nullable: true
          type: string
        lastNameOrSurname:
          nullable: true
          type: string
        middleNameOrInitial:
          nullable: true
          type: string
        phoneNumbers:
          $ref: '#/components/schemas/CommerceRuntimePhone'
        types:
          items:
            $ref: '#/components/schemas/ContactType'
          nullable: true
          type: array
      type: object
    CustomerNote:
      description: >-
        Note added to the customer account. Merchants can add internal notes,
        for example, to keep track of a customer's interests or complaints.
      properties:
        auditInfo:
          $ref: '#/components/schemas/AdminUserAuditInfo'
        content:
          description: Content of the note that the merchant added.
          nullable: true
          type: string
        id:
          description: Unique identifier of the note.
          format: int32
          type: integer
      type: object
    AccountSalesRep:
      properties:
        accountId:
          format: int32
          type: integer
        adminUserId:
          nullable: true
          type: string
      type: object
    CustomerCustomerSegment:
      description: A customer segment.
      properties:
        auditInfo:
          $ref: '#/components/schemas/AdminUserAuditInfo'
        code:
          description: Unique identifier of the customer segment.
          nullable: true
          type: string
        description:
          description: Description of the customer segment.
          nullable: true
          type: string
        id:
          description: Unique identifier of the customer segment.
          format: int32
          type: integer
        name:
          description: Name of the customer segment.
          nullable: true
          type: string
      type: object
    B2BUser:
      description: >-
        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.
      properties:
        acceptsMarketing:
          description: >-
            If true, the customer prefers to receive marketing material such as
            newsletters or email offers.
          type: boolean
        emailAddress:
          nullable: true
          type: string
        firstName:
          nullable: true
          type: string
        hasExternalPassword:
          description: Indicates if an external password is set on this account
          type: boolean
        isActive:
          type: boolean
        isLocked:
          type: boolean
        isRemoved:
          type: boolean
        last2FaDate:
          format: date-time
          nullable: true
          type: string
        lastName:
          nullable: true
          type: string
        localeCode:
          nullable: true
          type: string
        roles:
          items:
            $ref: '#/components/schemas/UserRole'
          nullable: true
          type: array
        userId:
          description: >-
            Unique identifier of the user who is currently logged in. This is
            null if the user is anonymous (not logged in).  Unicode data with a
            maximum length of 55 characters.
          nullable: true
          type: string
        userName:
          nullable: true
          type: string
      type: object
    CustomerAttributeMetadataItem:
      properties:
        key:
          maxLength: 50
          minLength: 1
          type: string
        value:
          minLength: 1
          type: string
      required:
        - key
        - value
      type: object
    CommerceRuntimeAttributeLocalizedContent:
      properties:
        localeCode:
          maxLength: 8
          nullable: true
          type: string
        value:
          maxLength: 100
          nullable: true
          type: string
      type: object
    CommerceRuntimeAttributeValidation:
      properties:
        maxDateTime:
          format: date-time
          nullable: true
          type: string
        maxNumericValue:
          format: double
          nullable: true
          type: number
        maxStringLength:
          format: int32
          nullable: true
          type: integer
        minDateTime:
          format: date-time
          nullable: true
          type: string
        minNumericValue:
          format: double
          nullable: true
          type: number
        minStringLength:
          format: int32
          nullable: true
          type: integer
        regularExpression:
          maxLength: 200
          nullable: true
          type: string
      type: object
    CustomerAttributeVocabularyValue:
      properties:
        content:
          $ref: '#/components/schemas/CustomerAttributeValueLocalizedContent'
        isHidden:
          nullable: true
          type: boolean
        sequence:
          format: int32
          nullable: true
          type: integer
        value:
          maxLength: 50
          minLength: 1
          type: string
      required:
        - value
      type: object
    CurrencyAmount:
      description: >-
        The currency code and amount of an order listed in the order history of
        a customer account. Currently, only USD is supported.
      properties:
        amount:
          description: >-
            Total amount of the order. Currently, only US dollar amounts are
            supported.
          format: double
          type: number
        currencyCode:
          description: >-
            Currency code for the amount of the order. Currently, only "USD" is
            supported.
          nullable: true
          type: string
      type: object
    CommerceRuntimeAddress:
      properties:
        address1:
          nullable: true
          type: string
        address2:
          nullable: true
          type: string
        address3:
          nullable: true
          type: string
        address4:
          nullable: true
          type: string
        addressType:
          nullable: true
          type: string
        cityOrTown:
          nullable: true
          type: string
        countryCode:
          nullable: true
          type: string
        isValidated:
          nullable: true
          type: boolean
        postalOrZipCode:
          nullable: true
          type: string
        stateOrProvince:
          nullable: true
          type: string
      type: object
    CommerceRuntimePhone:
      properties:
        home:
          nullable: true
          type: string
        mobile:
          nullable: true
          type: string
        work:
          nullable: true
          type: string
      type: object
    ContactType:
      properties:
        isPrimary:
          type: boolean
        name:
          nullable: true
          type: string
      type: object
    UserRole:
      properties:
        assignedInScope:
          $ref: '#/components/schemas/UserScope'
        auditInfo:
          $ref: '#/components/schemas/AdminUserAuditInfo'
        roleId:
          format: int32
          type: integer
        roleName:
          nullable: true
          type: string
        roleResources:
          items:
            $ref: '#/components/schemas/Resource'
          nullable: true
          type: array
        roleTags:
          items:
            type: string
          nullable: true
          type: array
        userId:
          nullable: true
          type: string
      type: object
    CustomerAttributeValueLocalizedContent:
      properties:
        localeCode:
          minLength: 1
          type: string
        value:
          minLength: 1
          type: string
      required:
        - localeCode
        - value
      type: object
    UserScope:
      properties:
        id:
          format: int32
          nullable: true
          type: integer
        name:
          nullable: true
          type: string
        type:
          nullable: true
          type: string
      type: object
    Resource:
      properties:
        id:
          nullable: true
          type: string
        type:
          nullable: true
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
      type: http

````