> ## 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.

# Get Users Async

> Retrieves a list of user for a B2B account according to any filter criteria and sort options.



## OpenAPI

````yaml /openapi/openapi_customer.json get /commerce/customer/b2baccounts/{accountId}/users
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}/users:
    get:
      tags:
        - B2BAccount
      summary: Get Users Async
      description: >-
        Retrieves a list of user for a B2B account according to any filter
        criteria and sort options.
      parameters:
        - in: path
          name: accountId
          required: true
          schema:
            format: int32
            type: integer
        - description: >-
            Used to page results from a query. Indicates the zero-based offset
            in the complete result set where the returned entities begin. For
            example, with a PageSize of 25, to get the 51st through the 75th
            items, startIndex=3. The default value is 0. Optional.
                        For example, applications can filter on UserId to get the single record of the current customer.
          in: query
          name: startIndex
          schema:
            default: 0
            format: int32
            type: integer
        - description: >-
            Used to page results from a query. Indicates the maximum number of
            entities to return from a query. The default value is 20 and the
            maximum value is 200. Optional.
          in: query
          name: pageSize
          schema:
            default: 0
            format: int32
            type: integer
        - description: >-
            The element to sort the results by and the order in which the
            results appear. Either ascending (a-z) or descending (z-a) order.
            Optional.
          in: query
          name: sortBy
          schema:
            type: string
        - description: >-
            A set of filter expressions representing the search parameters for a
            query: eq=equals, ne=not equals, gt=greater than, lt = less than or
            equals, gt = greater than or equals, lt = less than or equals, sw =
            starts with, or cont = contains. Optional.
          in: query
          name: filter
          schema:
            type: string
        - description: >-
            a quick filter which will search a predefined set of fields for a
            match
          in: query
          name: q
          schema:
            type: string
        - description: >-
            limit on quick filter which will search a predefined set of fields
            for a match
          in: query
          name: qLimit
          schema:
            format: int32
            type: integer
        - description: >-
            Used to refine the default information returned from a request. To
            reduce amount of customer account information returned, use the
            valid response groups: Contacts, CustomerAccountNotes, and
            OrderSummary. Optional.
          in: query
          name: responseGroups
          schema:
            type: string
        - description: limits which fields are returned in the response body
          in: query
          name: responseFields
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/B2BUserCollection'
            text/json:
              schema:
                $ref: '#/components/schemas/B2BUserCollection'
            text/plain:
              schema:
                $ref: '#/components/schemas/B2BUserCollection'
          description: OK
components:
  schemas:
    B2BUserCollection:
      description: Collection of users in a B2B account.
      properties:
        items:
          items:
            $ref: '#/components/schemas/B2BUser'
          nullable: true
          type: array
        pageCount:
          format: int32
          type: integer
        pageSize:
          format: int32
          type: integer
        startIndex:
          format: int32
          type: integer
        totalCount:
          format: int32
          type: integer
      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
    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
    UserScope:
      properties:
        id:
          format: int32
          nullable: true
          type: integer
        name:
          nullable: true
          type: string
        type:
          nullable: true
          type: string
      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
    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

````