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

# Retrieve customer detail

> Retrieves the full `CustomerDetail` object, including `business`, `segments`, `addresses`, `banking`, `loyalty`, `notification_preferences`, and the assigned `customer_group_id`.



## OpenAPI

````yaml https://openapi.commercengine.io/ce-pos.json get /pos/customers/{id}
openapi: 3.2.0
info:
  title: CE POS APIs
  description: >-
    The consolidated Point of Sale surface. Every operation is served under the
    storefront base URL; the POS backend proxies some of them to the admin
    service.
  version: '1.0'
servers:
  - url: https://staging.api.commercengine.io/api/v1/{store_id}/storefront
    description: Staging Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: staging
  - url: https://prod.api.commercengine.io/api/v1/{store_id}/storefront
    description: Prod Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: prod
security:
  - Authorization: []
tags:
  - name: section-identity
    summary: Identity
    kind: nav
  - name: Devices
    description: >-
      Set up the till: pair a device with the store using its pairing code, list
      the store's `PosLocation`s and `PosDevice`s, and claim a device for the
      signed-in user or release it.
    summary: Devices
    kind: nav
    parent: section-identity
  - name: Authentication
    description: >-
      Sign a staff member in on a paired device with a one-time password over
      SMS, WhatsApp or email, then refresh the access token or log out.
    summary: Authentication
    kind: nav
    parent: section-identity
  - name: Users
    description: >-
      The staff member signed in on the till, as a `PosUser` with their
      location, device and roles.
    summary: Users
    kind: nav
    parent: section-identity
  - name: section-customers
    summary: Customers
    kind: nav
  - name: Customers
    description: >-
      Look up the shopper at the till: list customers (`CustomerListItem`) and
      read one's full `CustomerDetail`.
    summary: Customers
    kind: nav
    parent: section-customers
  - name: Addresses
    description: >-
      A customer's saved addresses, as `Address` objects: list, add, update and
      remove them.
    summary: Addresses
    kind: nav
    parent: section-customers
  - name: section-catalog
    summary: Catalog
    kind: nav
  - name: Products
    description: >-
      Browse and search the catalog at the till: list `Product`s and SKUs, read
      a product and its variants, and show similar, up-sell and cross-sell
      items.
    summary: Products
    kind: nav
    parent: section-catalog
  - name: Reviews
    description: Read product reviews at the till.
    summary: Reviews
    kind: nav
    parent: section-catalog
  - name: Categories
    description: >-
      The store's categories, as `ProductCategory` objects with their child
      categories.
    summary: Categories
    kind: nav
    parent: section-catalog
  - name: Inventory
    description: >-
      Stock at the store's locations: list it by item, read an item's
      `InventoryDetail`, and follow the `InventoryActivity` that moved it.
    summary: Inventory
    kind: nav
    parent: section-catalog
  - name: section-shopping
    summary: Shopping
    kind: nav
  - name: Carts
    description: >-
      The till's `Cart`: create it, add, update or remove items, link the
      customer, set the address, and apply loyalty points or credit balance.
      Each update returns the full, updated `Cart`.
    summary: Carts
    kind: nav
    parent: section-shopping
  - name: Coupons & promotions
    description: >-
      The coupons and promotions a cart can use: list what the store offers, see
      which apply to a cart and why the rest don't, and apply or remove a
      coupon.
    summary: Coupons & promotions
    kind: nav
    parent: section-shopping
  - name: Fulfillment
    description: >-
      List the delivery and collect-in-store options for a cart, and save the
      cart's choice.
    summary: Fulfillment
    kind: nav
    parent: section-shopping
  - name: section-orders
    summary: Orders
    kind: nav
  - name: Orders
    description: >-
      Place an order from the till's cart and follow it: list orders, read an
      `OrderDetail` and its activity, check stock before it ships, and get its
      invoice, receipt and shipments.
    summary: Orders
    kind: nav
    parent: section-orders
  - name: Order payments
    description: >-
      Collect payment for an order: add payments toward what is left to pay,
      across one or more methods, poll the payment status, and retry a failed or
      expired payment.
    summary: Order payments
    kind: nav
    parent: section-orders
  - name: Shipments
    description: >-
      The shipments that fulfill orders: list them, read a `ShipmentDetail` with
      its activity and invoice, approve, reject or update one, send a
      replacement, and refund a shortfall.
    summary: Shipments
    kind: nav
    parent: section-orders
  - name: section-payments
    summary: Payments
    kind: nav
  - name: Payments
    description: >-
      The payment methods the till accepts and the checks around paying with
      them: card BIN details, VPA verification, and authenticating a payment
      with a direct OTP.
    summary: Payments
    kind: nav
    parent: section-payments
  - name: section-store
    summary: Store
    kind: nav
  - name: Locations
    description: States and pincodes for address forms.
    summary: Locations
    kind: nav
    parent: section-store
paths:
  /pos/customers/{id}:
    get:
      tags:
        - Customers
      summary: Retrieve customer detail
      description: >-
        Retrieves the full `CustomerDetail` object, including `business`,
        `segments`, `addresses`, `banking`, `loyalty`,
        `notification_preferences`, and the assigned `customer_group_id`.
      operationId: pos-get-customer-detail
      parameters:
        - name: id
          in: path
          description: Customer Id
          required: true
          schema:
            type: string
            maxLength: 128
            minLength: 1
            pattern: ^[A-Za-z0-9_-]{1,128}$
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                  - content
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                  content:
                    properties:
                      customer:
                        $ref: '#/components/schemas/CustomerDetail'
                    required:
                      - customer
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AdminUnauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/AdminNotFound'
        '500':
          $ref: '#/components/responses/AdminInternalServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      security:
        - Authorization: []
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/operations/pos-get-customer-detail
components:
  schemas:
    CustomerDetail:
      title: CustomerDetail
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/CustomerDetail
      allOf:
        - $ref: '#/components/schemas/CustomerDetailBase'
        - type: object
          properties:
            addresses:
              type: array
              items:
                $ref: '#/components/schemas/SavedCustomerAddress'
            banking:
              description: >-
                Bank accounts saved against the customer, used for refunds and
                payouts.
              type: array
              items:
                $ref: '#/components/schemas/CustomerBankAccount'
            loyalty:
              description: '`null` when the customer is not enrolled in a loyalty program.'
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/LoyaltyMember'
            notification_preferences:
              $ref: '#/components/schemas/NotificationPreferences'
            attributes:
              description: >-
                The customer's values of the store's active `custom` attributes,
                read-only ones included, each typed by its `attribute_type`;
                `value` is `null` when none is set. `GET
                /customers/{id}/attributes` lists every kind.
              type: array
              items:
                type: object
                anyOf:
                  - $ref: '#/components/schemas/StringAttribute'
                  - $ref: '#/components/schemas/IntegerAttribute'
                  - $ref: '#/components/schemas/AdminNumberAttribute'
                  - $ref: '#/components/schemas/AdminBooleanAttribute'
                  - $ref: '#/components/schemas/ListAttribute'
                  - $ref: '#/components/schemas/ObjectAttribute'
                  - $ref: '#/components/schemas/DateTimeAttribute'
            metadata:
              description: >-
                The customer's own data as key-value pairs; `null` when none was
                ever set.
              type:
                - object
                - 'null'
              additionalProperties: true
          required:
            - addresses
            - banking
            - loyalty
            - notification_preferences
            - attributes
            - metadata
      x-tags:
        - Customers
    CustomerDetailBase:
      title: CustomerDetailBase
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/CustomerDetailBase
      allOf:
        - $ref: '#/components/schemas/CustomerInfo'
        - type: object
          properties:
            business:
              description: >-
                Business details for the linked customer, or `null` when no
                customer is linked. Individual details can be empty or `null`.
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/BusinessInfo'
            segments:
              type: array
              items:
                $ref: '#/components/schemas/CustomerSegment'
          required:
            - business
            - segments
            - first_name
            - last_name
            - full_name
            - profile_image_url
            - country_code
            - status
            - email
            - phone
      x-tags:
        - Customers
    SavedCustomerAddress:
      title: SavedCustomerAddress
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/SavedCustomerAddress
      required:
        - first_name
        - phone
        - email
        - address_line1
        - pincode
        - city
        - state
        - country
        - id
        - last_name
        - country_code
        - address_line2
        - landmark
        - gstin
        - business_name
        - is_phone_verified
        - is_email_verified
        - is_default_shipping
        - is_default_billing
        - created_at
        - modified_at
        - is_primary
      properties:
        id:
          type: string
          readOnly: true
        first_name:
          type:
            - string
            - 'null'
        last_name:
          type:
            - string
            - 'null'
        country_code:
          description: "Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.\r\n"
          type: string
        phone:
          description: 10 digit phone number without country code.
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
        address_line1:
          type:
            - string
            - 'null'
        address_line2:
          type:
            - string
            - 'null'
        landmark:
          type:
            - string
            - 'null'
        pincode:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        state:
          type:
            - string
            - 'null'
        country:
          description: Country name. `null` when the address was saved without one.
          type:
            - string
            - 'null'
        gstin:
          description: Use in shipping details only for third party.
          type:
            - string
            - 'null'
        business_name:
          description: Use in shipping details only for third party.
          type:
            - string
            - 'null'
        is_phone_verified:
          type: boolean
          readOnly: true
        is_email_verified:
          type: boolean
          readOnly: true
        is_default_shipping:
          type: boolean
        is_default_billing:
          type: boolean
        created_at:
          type: string
          format: date-time
          readOnly: true
        modified_at:
          type: string
          format: date-time
          readOnly: true
        is_primary:
          type: boolean
          readOnly: true
      examples: []
      x-tags:
        - Customers
    CustomerBankAccount:
      title: CustomerBankAccount
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/CustomerBankAccount
      required:
        - account_type
        - account_name
        - account_number
        - ifsc_code
        - bank_name
      properties:
        id:
          type: string
          readOnly: true
        account_type:
          enum:
            - inbound
            - outbound
        account_name:
          type: string
        account_number:
          type: string
        ifsc_code:
          type: string
        bank_name:
          type: string
        is_default:
          description: default bank account for the customer.
          type: boolean
        is_verified:
          type: boolean
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        modified_at:
          type: string
          format: date-time
          readOnly: true
      x-tags:
        - Customers
    LoyaltyMember:
      title: LoyaltyMember
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/LoyaltyMember
      allOf:
        - type: object
          properties:
            customer_id:
              type: string
            customer_name:
              type:
                - string
                - 'null'
        - $ref: '#/components/schemas/CustomerLoyalty'
      x-tags:
        - Customers
    NotificationPreferences:
      title: NotificationPreferences
      description: 'Set channel preferences for each type of '
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/NotificationPreferences
      properties:
        transactional:
          $ref: '#/components/schemas/NotificationChannelPreferences'
          description: >-
            These notifications are typically critical for user engagement,
            providing updates, confirmations, or alerts related to their account
            activities.
        promotional:
          description: >-
            These notifications aim to engage users with promotional content and
            enhance their overall experience with the platform.
          type: object
          properties:
            email:
              description: >-
                Indicates whether the user has opted to receive notifications
                via email.
              type: boolean
              default: true
            sms:
              description: >-
                Indicates whether the user has opted to receive notifications
                via SMS.
              type: boolean
              default: false
            whatsapp:
              description: >-
                Indicates whether the user has opted to receive notifications
                via WhatsApp.
              type: boolean
              default: false
        newsletter:
          description: >
            These notifications are often sent periodically as part of a
            subscription service.
          type: object
          properties:
            email:
              description: >-
                Indicates whether the user has opted to receive notifications
                via email.
              type: boolean
              default: true
            sms:
              description: >-
                Indicates whether the user has opted to receive notifications
                via SMS.
              type: boolean
              default: false
            whatsapp:
              description: >-
                Indicates whether the user has opted to receive notifications
                via WhatsApp.
              type: boolean
              default: false
    StringAttribute:
      title: StringAttribute
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/StringAttribute
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        slug:
          type: string
          readOnly: true
        kind:
          $ref: '#/components/schemas/CustomerAttributeKind'
          readOnly: true
        link:
          description: >-
            Where a `linked` attribute's values come from; `null` for the other
            kinds.
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CustomerAttributeLink'
          readOnly: true
        is_linked:
          type: boolean
          readOnly: true
        value:
          description: '`null` when no value is set for this customer.'
          type:
            - string
            - 'null'
        attribute_type:
          enum:
            - String
        is_readonly:
          type: boolean
          readOnly: true
        is_pinned:
          description: Whether the attribute is pinned to the top of the customer profile.
          type: boolean
        active:
          type: boolean
        is_visible:
          type: boolean
        is_filterable:
          type: boolean
        last_updated_at:
          type: string
          format: date-time
          readOnly: true
      x-tags:
        - Customers
    IntegerAttribute:
      title: IntegerAttribute
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/IntegerAttribute
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        slug:
          type: string
          readOnly: true
        kind:
          $ref: '#/components/schemas/CustomerAttributeKind'
          readOnly: true
        link:
          description: >-
            Where a `linked` attribute's values come from; `null` for the other
            kinds.
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CustomerAttributeLink'
          readOnly: true
        is_linked:
          type: boolean
          readOnly: true
        value:
          description: '`null` when no value is set for this customer.'
          type:
            - integer
            - 'null'
        attribute_type:
          enum:
            - Integer
        is_readonly:
          type: boolean
          readOnly: true
        is_pinned:
          description: Whether the attribute is pinned to the top of the customer profile.
          type: boolean
        active:
          type: boolean
        is_visible:
          type: boolean
        is_filterable:
          type: boolean
        last_updated_at:
          type: string
          format: date-time
          readOnly: true
      x-tags:
        - Customers
    AdminNumberAttribute:
      title: NumberAttribute
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/AdminNumberAttribute
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        slug:
          type: string
          readOnly: true
        kind:
          $ref: '#/components/schemas/CustomerAttributeKind'
          readOnly: true
        link:
          description: >-
            Where a `linked` attribute's values come from; `null` for the other
            kinds.
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CustomerAttributeLink'
          readOnly: true
        is_linked:
          type: boolean
          readOnly: true
        value:
          description: '`null` when no value is set for this customer.'
          type:
            - number
            - 'null'
        attribute_type:
          enum:
            - Number
        is_readonly:
          type: boolean
          readOnly: true
        is_pinned:
          description: Whether the attribute is pinned to the top of the customer profile.
          type: boolean
        active:
          type: boolean
        is_visible:
          type: boolean
        is_filterable:
          type: boolean
        last_updated_at:
          type: string
          format: date-time
          readOnly: true
      x-tags:
        - Customers
    AdminBooleanAttribute:
      title: BooleanAttribute
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/AdminBooleanAttribute
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        slug:
          type: string
          readOnly: true
        kind:
          $ref: '#/components/schemas/CustomerAttributeKind'
          readOnly: true
        link:
          description: >-
            Where a `linked` attribute's values come from; `null` for the other
            kinds.
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CustomerAttributeLink'
          readOnly: true
        is_linked:
          type: boolean
          readOnly: true
        value:
          description: '`null` when no value is set for this customer.'
          type:
            - boolean
            - 'null'
        attribute_type:
          enum:
            - Boolean
        is_readonly:
          type: boolean
          readOnly: true
        is_pinned:
          description: Whether the attribute is pinned to the top of the customer profile.
          type: boolean
        active:
          type: boolean
        is_visible:
          type: boolean
        is_filterable:
          type: boolean
        last_updated_at:
          type: string
          format: date-time
          readOnly: true
      x-tags:
        - Customers
    ListAttribute:
      title: ListAttribute
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/ListAttribute
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        slug:
          type: string
          readOnly: true
        kind:
          $ref: '#/components/schemas/CustomerAttributeKind'
          readOnly: true
        link:
          description: >-
            Where a `linked` attribute's values come from; `null` for the other
            kinds.
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CustomerAttributeLink'
          readOnly: true
        is_linked:
          type: boolean
          readOnly: true
        value:
          description: '`null` when no value is set for this customer.'
          type:
            - array
            - 'null'
          items:
            type: string
        attribute_type:
          enum:
            - List
        is_readonly:
          type: boolean
          readOnly: true
        is_pinned:
          description: Whether the attribute is pinned to the top of the customer profile.
          type: boolean
        active:
          type: boolean
        is_visible:
          type: boolean
        is_filterable:
          type: boolean
        last_updated_at:
          type: string
          format: date-time
          readOnly: true
      x-tags:
        - Customers
    ObjectAttribute:
      title: ObjectAttribute
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/ObjectAttribute
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        slug:
          type: string
          readOnly: true
        kind:
          $ref: '#/components/schemas/CustomerAttributeKind'
          readOnly: true
        link:
          description: >-
            Where a `linked` attribute's values come from; `null` for the other
            kinds.
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CustomerAttributeLink'
          readOnly: true
        is_linked:
          type: boolean
          readOnly: true
        value:
          description: '`null` when no value is set for this customer.'
          type:
            - object
            - 'null'
          additionalProperties: true
        attribute_type:
          enum:
            - Object
        is_readonly:
          type: boolean
          readOnly: true
        is_pinned:
          description: Whether the attribute is pinned to the top of the customer profile.
          type: boolean
        active:
          type: boolean
        is_visible:
          type: boolean
        is_filterable:
          type: boolean
        last_updated_at:
          type: string
          format: date-time
          readOnly: true
      x-tags:
        - Customers
    DateTimeAttribute:
      title: DateTimeAttribute
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/DateTimeAttribute
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        slug:
          type: string
          readOnly: true
        kind:
          $ref: '#/components/schemas/CustomerAttributeKind'
          readOnly: true
        link:
          description: >-
            Where a `linked` attribute's values come from; `null` for the other
            kinds.
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CustomerAttributeLink'
          readOnly: true
        is_linked:
          type: boolean
          readOnly: true
        value:
          description: '`null` when no value is set for this customer.'
          type:
            - string
            - 'null'
          format: date-time
        attribute_type:
          enum:
            - DateTime
        is_readonly:
          type: boolean
          readOnly: true
        is_pinned:
          description: Whether the attribute is pinned to the top of the customer profile.
          type: boolean
        active:
          type: boolean
        is_visible:
          type: boolean
        is_filterable:
          type: boolean
        last_updated_at:
          type: string
          format: date-time
          readOnly: true
      x-tags:
        - Customers
    CustomerInfo:
      title: CustomerInfo
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/CustomerInfo
      required:
        - id
        - is_phone_verified
        - is_email_verified
        - is_whatsapp_verified
        - is_verified
        - kyc_status
        - tags
        - customer_group_id
        - created_at
        - modified_at
        - last_seen
      properties:
        id:
          description: >-
            Customer ID. An imported customer can have a different primary user
            ID.
          type: string
          readOnly: true
        first_name:
          type:
            - string
            - 'null'
        last_name:
          type:
            - string
            - 'null'
        full_name:
          type:
            - string
            - 'null'
          readOnly: true
        profile_image_url:
          type:
            - string
            - 'null'
          readOnly: true
        country_code:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
        is_phone_verified:
          type: boolean
          readOnly: true
        is_email_verified:
          type: boolean
          readOnly: true
        is_whatsapp_verified:
          type: boolean
          readOnly: true
        status:
          description: '`null` for customers with no status recorded.'
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CustomerStatus'
        created_at:
          type: string
          format: date-time
          readOnly: true
        modified_at:
          type: string
          format: date-time
          readOnly: true
        last_seen:
          description: Empty string when the customer has no recorded activity yet.
          type:
            - string
            - 'null'
          readOnly: true
        kyc_status:
          $ref: '#/components/schemas/KycStatus'
        is_verified:
          type: boolean
          readOnly: true
        customer_group_id:
          description: >-
            The Customer Group the customer belongs to. Drives group-specific
            pricing and promotions.
          type:
            - string
            - 'null'
        tags:
          type:
            - array
            - 'null'
          items:
            type: string
      x-tags:
        - Customers
    BusinessInfo:
      title: BusinessInfo
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/BusinessInfo
      properties:
        name:
          type:
            - string
            - 'null'
        business_type:
          description: >-
            Stored customer business type. Existing records may contain free
            text, including a default customer group name from storefront
            signup. Newly supplied values: sole_proprietorship, partnership,
            private_limited, public_limited, public_listed, state_owned,
            charity, individual, llp, other. A value here does not imply the
            customer is a registered business.
          type:
            - string
            - 'null'
        pan_number:
          type:
            - string
            - 'null'
        gstin:
          type:
            - string
            - 'null'
        is_registered_under_gst:
          type: boolean
      x-tags:
        - Customers
    CustomerSegment:
      title: CustomerSegment
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/CustomerSegment
      properties:
        id:
          type: string
        name:
          type: string
      x-tags:
        - Customers
    CustomerLoyalty:
      title: CustomerLoyalty
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/CustomerLoyalty
      properties:
        membership_number:
          type: string
        points_earned:
          description: total points earned within the current loyalty program.
          type: integer
        points_redeemed:
          description: total points redeemed within the current loyalty program.
          type: integer
        points_balance:
          description: total points available.
          type: integer
        total_spent:
          description: >-
            The total amount a customer has spent within the current loyalty
            program, excluding taxes, promotional discounts, and redeemed
            loyalty points. This value is used to determine tier eligibility and
            earning points calculation.
          type: number
        total_orders:
          description: >-
            The total number of completed orders counted in the current loyalty
            program.
          type: integer
        lifetime_spent:
          description: ' The total amount a customer has spent across all time, regardless of loyalty program participation. This includes all completed orders and excludes taxes, promotional discounts, and redeemed points.'
          type: number
        lifetime_orders:
          description: >-
            The total number of completed orders across all time, regardless of
            loyalty program.
          type: integer
        date_of_join:
          description: ' The date and time when the customer first enrolled in the loyalty program.'
          type:
            - string
            - 'null'
          format: date-time
        date_of_assign:
          description: >-
            The date and time when the customer's current loyalty tier or
            program instance was assigned. This may change when tiers are
            upgraded, downgraded, or reassigned.
          type:
            - string
            - 'null'
          format: date-time
        date_of_reset:
          description: ' The date and time when the customer’s current loyalty program cycle will reset, at which points earned, points redeemed, balance points, total spent, total orders will be cleared.'
          type:
            - string
            - 'null'
          format: date-time
        current_tier:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            name:
              type: string
        next_tier:
          description: null when the member is already on the highest tier
          oneOf:
            - type: object
              properties:
                id:
                  type: string
                name:
                  type: string
                total_spent_threshold:
                  type:
                    - integer
                    - 'null'
                  minimum: 0
                total_orders_threshold:
                  type:
                    - integer
                    - 'null'
                  minimum: 0
            - type: 'null'
        name:
          type: string
        renewal_type:
          type: string
          enum:
            - yearly
            - never
            - custom
        tier_upgrade_criteria:
          type: string
          enum:
            - total-spent
            - total-orders
            - custom
      x-tags:
        - Customers
    NotificationChannelPreferences:
      title: NotificationChannelPreferences
      description: Set specific channel preferences
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/NotificationChannelPreferences
      properties:
        email:
          description: >-
            Indicates whether the user has opted to receive notifications via
            email.
          type: boolean
          default: true
        sms:
          description: >-
            Indicates whether the user has opted to receive notifications via
            SMS.
          type: boolean
          default: true
        whatsapp:
          description: >-
            Indicates whether the user has opted to receive notifications via
            WhatsApp.
          type: boolean
          default: true
    CustomerAttributeKind:
      title: CustomerAttributeKind
      description: >-
        Who sets the attribute's values. `custom`: the store's own attribute,
        set by admins and, unless it is `is_readonly`, by shoppers in the
        storefront. `linked`: set from the customer's KYC document of the same
        type: the document number once it is approved, otherwise
        `not_submitted`, `submitted` or `rejected`. `system`: set by Commerce
        Engine, such as the campaign source of a shopper's first and latest
        visits (`initial-utm-source`, `utm-source`).
      type: string
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/CustomerAttributeKind
      enum:
        - custom
        - linked
        - system
    CustomerAttributeLink:
      title: CustomerAttributeLink
      description: >-
        Where a `linked` attribute's values come from; `null` for the other
        kinds.
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/CustomerAttributeLink
      required:
        - type
        - document_type
      properties:
        type:
          type: string
          enum:
            - kyc_document
        document_type:
          description: Slug of the KYC document type whose document sets the value.
          type: string
    CustomerStatus:
      title: CustomerStatus
      type: string
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/CustomerStatus
      examples:
        - active
        - inactive
    KycStatus:
      description: >-
        KYC progress for a customer. `document_pending` means required documents
        have not been uploaded; `submitted` and `submitted_for_approval` mean
        they are awaiting review.
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/KycStatus
      enum:
        - pending
        - document_pending
        - submitted
        - submitted_for_approval
        - approved
        - rejected
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
              - code
            properties:
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              code:
                type: string
              errors:
                type: object
              details:
                type: string
    AdminUnauthorized:
      description: >-
        The token is missing, invalid or expired, or does not grant access to
        this store and operation.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
            properties:
              message:
                type: string
              success:
                type: boolean
              code:
                type: string
              details:
                type: string
    Forbidden:
      description: >-
        Access denied. `token-required` requires an authenticated session;
        `permission-denied` means the caller cannot access this resource. On
        POS, `session-expired` requires signing in again.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
              - success
            properties:
              code:
                type: string
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              details:
                type: string
    AdminNotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
            properties:
              message:
                type: string
              success:
                type: boolean
              code:
                type: string
              details:
                type: string
    AdminInternalServerError:
      description: >-
        The request could not be completed. Quote error_id, when present, when
        contacting support.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
            properties:
              message:
                type: string
              success:
                type: boolean
              code:
                type: string
              details:
                type: string
              error_id:
                type: string
    GatewayTimeout:
      description: The request timed out.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
              - success
            properties:
              code:
                type: string
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              details:
                type: string
  securitySchemes:
    Authorization:
      type: http
      description: Access token
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.