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

# List Customers



## OpenAPI

````yaml /api-reference/v2/openapi.json GET /v2/customers
openapi: 3.1.1
info:
  title: LoyaltyLion Admin API
  version: v2
servers:
  - url: https://api.loyaltylion.com
security: []
tags:
  - name: identity
  - name: activities
  - name: orders
  - name: transactions
  - name: customers
  - name: webhooks
  - name: emails
  - name: sites
  - name: reviews
  - name: rewards
  - name: integrations
  - name: gatsby
paths:
  /v2/customers:
    get:
      tags:
        - customers
      operationId: customers.listCustomers
      parameters:
        - name: since_id
          in: query
          description: Return only resources whose id is after the specified id
          schema:
            type: integer
            minimum: 0
        - name: limit
          in: query
          description: Max number of resources to return per request
          schema:
            default: 100
            type: integer
            minimum: 1
            maximum: 500
        - name: page
          in: query
          description: >-
            Fetch another page of results. This field is deprecated and will be
            removed in a future version of the API. Use cursors for pagination
            instead
          schema:
            deprecated: true
            type: integer
            minimum: 1
        - name: sort_field
          in: query
          schema:
            type: string
            enum:
              - id
              - updated_at
        - name: sort_direction
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: cursor
          in: query
          schema:
            type: string
            description: >-
              Fetch another page of results using a cursor returned in a
              previous response
        - name: email
          in: query
          description: Return only customers whose email contains the specified string
          schema:
            type: string
        - name: created_at_min
          in: query
          description: >-
            Return only customers created on or after the specified `ISO 8601`
            datetime string
          schema:
            type: string
        - name: created_at_max
          in: query
          description: >-
            Return only customers created before the specified `ISO 8601`
            datetime string
          schema:
            type: string
        - name: updated_at_min
          in: query
          description: >-
            Return only customers updated on or after the specified `ISO 8601`
            datetime string
          schema:
            type: string
        - name: updated_at_max
          in: query
          description: >-
            Return only customers updated before the specified `ISO 8601`
            datetime string
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomersListCustomersResponseBody'
        '400':
          $ref: '#/components/responses/ClientErrorBadRequest'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: string
                    required:
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: string
                    required:
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      security:
        - ProgramApiKey:
            - read_customers
        - SiteTokenSecret: []
components:
  schemas:
    CustomersListCustomersResponseBody:
      type: object
      properties:
        customers:
          type: array
          items:
            type: object
            properties:
              id:
                type: number
              merchant_id:
                type: string
              email:
                type:
                  - string
                  - 'null'
              points_approved:
                type: number
              points_pending:
                type: number
              points_spent:
                type: number
              properties:
                type: object
                propertyNames:
                  type: string
                additionalProperties: {}
              metadata:
                type: object
                properties:
                  shopify_source_url:
                    type: string
                additionalProperties: false
              rewards_claimed:
                type: integer
                minimum: 0
              blocked:
                type: boolean
              guest:
                type: boolean
              enrolled:
                type: boolean
              enrolled_at:
                type:
                  - string
                  - 'null'
              referral_id:
                type:
                  - string
                  - 'null'
              referred_by:
                anyOf:
                  - type: object
                    properties:
                      id:
                        type: number
                      merchant_id:
                        type: string
                    required:
                      - id
                      - merchant_id
                    additionalProperties: false
                  - type: 'null'
              loyalty_tier_membership:
                anyOf:
                  - type: object
                    properties:
                      started_at:
                        type: string
                      expires_at:
                        type:
                          - string
                          - 'null'
                      manual:
                        type:
                          - boolean
                          - 'null'
                      loyalty_tier:
                        type: object
                        properties:
                          id:
                            type: number
                          name:
                            type: string
                          number:
                            type: number
                            minimum: 1
                          default:
                            type: boolean
                          hidden:
                            type: boolean
                          lower_bound:
                            type: string
                          upper_bound:
                            type:
                              - string
                              - 'null'
                          position:
                            type: number
                            minimum: 0
                        required:
                          - id
                          - name
                          - number
                          - default
                          - hidden
                          - lower_bound
                          - upper_bound
                          - position
                        additionalProperties: false
                    required:
                      - started_at
                      - expires_at
                      - manual
                      - loyalty_tier
                    additionalProperties: false
                  - type: 'null'
              insights_segment:
                anyOf:
                  - type: string
                    enum:
                      - At Risk
                      - Win Back
                      - Loyal
                  - type: 'null'
              birthday:
                type:
                  - string
                  - 'null'
              referral_url:
                type: string
              receipt_upload_url:
                type:
                  - string
                  - 'null'
              linked_merchant_ids:
                type: array
                items:
                  type: string
              created_at:
                type: string
              updated_at:
                type: string
            required:
              - id
              - merchant_id
              - email
              - points_approved
              - points_pending
              - points_spent
              - properties
              - metadata
              - rewards_claimed
              - blocked
              - guest
              - enrolled
              - enrolled_at
              - referral_id
              - referred_by
              - loyalty_tier_membership
              - insights_segment
              - birthday
              - referral_url
              - receipt_upload_url
              - created_at
              - updated_at
            additionalProperties: false
        cursor:
          description: >-
            Cursors that can be used to fetch the previous or next page of
            results.  If a cursor is `null`, it means there are no more results
            in that direction
          type: object
          properties:
            prev:
              type:
                - string
                - 'null'
            next:
              type:
                - string
                - 'null'
          required:
            - prev
            - next
          additionalProperties: false
      required:
        - customers
        - cursor
      additionalProperties: false
  responses:
    ClientErrorBadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                  details:
                    type: object
                    additionalProperties:
                      type: string
                required:
                  - message
            required:
              - error
  securitySchemes:
    ProgramApiKey:
      type: http
      scheme: bearer
      description: >-
        An API key linked to a Program in LoyaltyLion, with a set of permissions
        (scopes). API keys can be created manually, or acquired through an
        OAuth2 flow. The API key should be provided as a `Bearer` token in the
        `Authorization` header
    SiteTokenSecret:
      type: http
      scheme: basic
      description: >-
        [DEPRECATED] Authenticate using a LoyaltyLion site's `token` as
        username, and its `secret` as the password. This authentication method
        is deprecated and will be removed in future. Use the `ProgramApiKey`
        authentication method instead

````