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

# List customers with filtering and pagination

> Retrieve customers with rich filtering, sorting, and pagination.

Filter by:
- Customer attributes: customer_name, email, custom_data fields.
- Dates: created_at, updated_at (range filters supported).
- Search: use search parameter for flexible multi-field queries.

Pagination & sorting:
- limit: page size (default varies by configuration).
- cursor: pass 'next' or 'previous' from response to paginate.
- order: field to sort by with - prefix for descending (e.g., -created_at).

Expand:
- expand: comma-separated list of related resources to include (e.g., contacts).



## OpenAPI

````yaml /openAPI/openapi-20240301.json get /customers
openapi: 3.1.0
info:
  title: zenskar
  version: 2.0.0
servers:
  - url: https://api.zenskar.com
security:
  - ApiTokenAuth: []
    OrganisationAuth: []
paths:
  /customers:
    get:
      tags:
        - Customers
      summary: List customers with filtering and pagination
      description: >-
        Retrieve customers with rich filtering, sorting, and pagination.


        Filter by:

        - Customer attributes: customer_name, email, custom_data fields.

        - Dates: created_at, updated_at (range filters supported).

        - Search: use search parameter for flexible multi-field queries.


        Pagination & sorting:

        - limit: page size (default varies by configuration).

        - cursor: pass 'next' or 'previous' from response to paginate.

        - order: field to sort by with - prefix for descending (e.g.,
        -created_at).


        Expand:

        - expand: comma-separated list of related resources to include (e.g.,
        contacts).
      operationId: List-customers-with-filtering-and-pagination
      parameters:
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              The cursor indicating a unique set of results - this should be
              auto generated and you get it from the `next` and `previous`
              fields of the response
            examples:
              - V2VsbCBhcmV1IGN1cmlvdxM=
            title: Cursor
          description: >-
            The cursor indicating a unique set of results - this should be auto
            generated and you get it from the `next` and `previous` fields of
            the response
        - name: limit
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: The number of results to return - defaults to 10
            examples:
              - 10
            title: Limit
          description: The number of results to return - defaults to 10
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            examples:
              - customer_name=Acme
              - email=john@example.com
            title: Search
        - name: order
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            examples:
              - order=created_at
            title: Order
        - name: sort_key
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            examples:
              - sort_key=id
            title: Sort Key
        - name: sort_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            examples:
              - sort_key=asc
            title: Sort Type
        - name: expand
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            examples:
              - expand=contacts
            title: Expand
        - name: id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Id
        - name: id__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Id  In
        - name: id__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Id  Isnull
        - name: external_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: External Id
        - name: external_id__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: External Id  Ilike
        - name: external_id__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: External Id  Like
        - name: external_id__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: External Id  In
        - name: external_id__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: External Id  Isnull
        - name: email
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Email
        - name: email__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Email  Ilike
        - name: email__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Email  Like
        - name: email__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Email  In
        - name: email__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Email  Isnull
        - name: phone_number__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Phone Number  Ilike
        - name: phone_number__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Phone Number  Like
        - name: phone_number__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Phone Number  Isnull
        - name: communications_enabled
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Communications Enabled
        - name: auto_charge_enabled
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Auto Charge Enabled
        - name: created_at
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created At
        - name: created_at__neq
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created At  Neq
        - name: created_at__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created At  Gt
        - name: created_at__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created At  Gte
        - name: created_at__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created At  Lt
        - name: created_at__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created At  Lte
        - name: created_at__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Created At  Isnull
        - name: created_at__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Created At  In
        - name: customer_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Customer Name
        - name: customer_name__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Customer Name  Ilike
        - name: customer_name__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Customer Name  Like
        - name: customer_name__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Customer Name  In
        - name: customer_name__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Customer Name  Isnull
        - name: business_entity_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Business Entity Id
        - name: business_entity_id__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Business Entity Id  In
        - name: business_entity_id__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Business Entity Id  Isnull
        - name: search_name_external_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search Name External Id
        - name: invoice__customer_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Invoice  Customer Id
        - name: invoice__customer_id__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  Customer Id  In
        - name: invoice__customer_id__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Invoice  Customer Id  Isnull
        - name: invoice__contract_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Invoice  Contract Id
        - name: invoice__contract_id__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  Contract Id  In
        - name: invoice__contract_id__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Invoice  Contract Id  Isnull
        - name: invoice__status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  Status
        - name: invoice__status__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  Status  Ilike
        - name: invoice__status__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  Status  Like
        - name: invoice__status__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  Status  In
        - name: invoice__status__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Invoice  Status  Isnull
        - name: invoice__external_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  External Id
        - name: invoice__external_id__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  External Id  Ilike
        - name: invoice__external_id__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  External Id  Like
        - name: invoice__external_id__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  External Id  In
        - name: invoice__external_id__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Invoice  External Id  Isnull
        - name: invoice__invoice_total
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Invoice  Invoice Total
        - name: invoice__invoice_total__neq
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Invoice  Invoice Total  Neq
        - name: invoice__invoice_total__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Invoice  Invoice Total  Gt
        - name: invoice__invoice_total__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Invoice  Invoice Total  Gte
        - name: invoice__invoice_total__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Invoice  Invoice Total  Lt
        - name: invoice__invoice_total__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Invoice  Invoice Total  Lte
        - name: invoice__invoice_total__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Invoice  Invoice Total  Isnull
        - name: invoice__invoice_total__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  Invoice Total  In
        - name: invoice__amount_due
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Invoice  Amount Due
        - name: invoice__amount_due__neq
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Invoice  Amount Due  Neq
        - name: invoice__amount_due__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Invoice  Amount Due  Gt
        - name: invoice__amount_due__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Invoice  Amount Due  Gte
        - name: invoice__amount_due__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Invoice  Amount Due  Lt
        - name: invoice__amount_due__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Invoice  Amount Due  Lte
        - name: invoice__amount_due__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Invoice  Amount Due  Isnull
        - name: invoice__amount_due__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  Amount Due  In
        - name: invoice__due_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Due Date
        - name: invoice__due_date__neq
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Due Date  Neq
        - name: invoice__due_date__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Due Date  Gt
        - name: invoice__due_date__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Due Date  Gte
        - name: invoice__due_date__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Due Date  Lt
        - name: invoice__due_date__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Due Date  Lte
        - name: invoice__due_date__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Invoice  Due Date  Isnull
        - name: invoice__due_date__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  Due Date  In
        - name: invoice__created_at
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Created At
        - name: invoice__created_at__neq
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Created At  Neq
        - name: invoice__created_at__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Created At  Gt
        - name: invoice__created_at__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Created At  Gte
        - name: invoice__created_at__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Created At  Lt
        - name: invoice__created_at__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Created At  Lte
        - name: invoice__created_at__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Invoice  Created At  Isnull
        - name: invoice__created_at__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  Created At  In
        - name: invoice__approved_at
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Approved At
        - name: invoice__approved_at__neq
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Approved At  Neq
        - name: invoice__approved_at__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Approved At  Gt
        - name: invoice__approved_at__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Approved At  Gte
        - name: invoice__approved_at__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Approved At  Lt
        - name: invoice__approved_at__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Approved At  Lte
        - name: invoice__approved_at__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Invoice  Approved At  Isnull
        - name: invoice__approved_at__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  Approved At  In
        - name: invoice__sent_at
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Sent At
        - name: invoice__sent_at__neq
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Sent At  Neq
        - name: invoice__sent_at__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Sent At  Gt
        - name: invoice__sent_at__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Sent At  Gte
        - name: invoice__sent_at__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Sent At  Lt
        - name: invoice__sent_at__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Sent At  Lte
        - name: invoice__sent_at__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Invoice  Sent At  Isnull
        - name: invoice__sent_at__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  Sent At  In
        - name: invoice__paid_at
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Paid At
        - name: invoice__paid_at__neq
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Paid At  Neq
        - name: invoice__paid_at__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Paid At  Gt
        - name: invoice__paid_at__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Paid At  Gte
        - name: invoice__paid_at__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Paid At  Lt
        - name: invoice__paid_at__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Invoice  Paid At  Lte
        - name: invoice__paid_at__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Invoice  Paid At  Isnull
        - name: invoice__paid_at__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice  Paid At  In
        - name: payment_methods__id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Payment Methods  Id
        - name: payment_methods__id__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Id  In
        - name: payment_methods__id__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Payment Methods  Id  Isnull
        - name: payment_methods__connector_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Payment Methods  Connector Id
        - name: payment_methods__connector_id__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Connector Id  In
        - name: payment_methods__connector_id__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Payment Methods  Connector Id  Isnull
        - name: payment_methods__connector_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Connector Name
        - name: payment_methods__connector_name__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Connector Name  Ilike
        - name: payment_methods__connector_name__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Connector Name  Like
        - name: payment_methods__connector_name__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Connector Name  In
        - name: payment_methods__connector_name__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Payment Methods  Connector Name  Isnull
        - name: payment_methods__connector_name__neq
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Connector Name  Neq
        - name: payment_methods__external_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  External Id
        - name: payment_methods__external_id__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  External Id  Ilike
        - name: payment_methods__external_id__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  External Id  Like
        - name: payment_methods__external_id__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  External Id  In
        - name: payment_methods__external_id__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Payment Methods  External Id  Isnull
        - name: payment_methods__status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Status
        - name: payment_methods__status__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Status  Ilike
        - name: payment_methods__status__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Status  Like
        - name: payment_methods__status__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Status  In
        - name: payment_methods__status__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Payment Methods  Status  Isnull
        - name: payment_methods__country
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Country
        - name: payment_methods__country__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Country  Ilike
        - name: payment_methods__country__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Country  Like
        - name: payment_methods__country__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Country  In
        - name: payment_methods__country__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Payment Methods  Country  Isnull
        - name: payment_methods__is_default
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Payment Methods  Is Default
        - name: payment_methods__is_default__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Payment Methods  Is Default  Isnull
        - name: payment_methods__type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Type
        - name: payment_methods__type__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Type  Ilike
        - name: payment_methods__type__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Type  Like
        - name: payment_methods__type__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Methods  Type  In
        - name: payment_methods__type__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Payment Methods  Type  Isnull
      responses:
        '200':
          description: Successfully retrieved customers
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResults_GetCustomerResponseSchema_
              example:
                data:
                  - id: 123e4567-e89b-12d3-a456-426614174000
                    customer_name: Acme Corporation
                    email: billing@acme.com
                    created_at: '2023-01-01T00:00:00'
                    updated_at: '2023-06-15T10:30:00'
                  - id: 223e4567-e89b-12d3-a456-426614174001
                    customer_name: TechStart Inc
                    email: contact@techstart.io
                    created_at: '2023-02-15T00:00:00'
                    updated_at: '2023-06-20T14:20:00'
                next: cursor_to_next_page
                total: 142
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              examples:
                invalid_limit:
                  summary: Invalid limit
                  value:
                    error_code: BAD_REQUEST
                    message: Limit must be a positive integer
                invalid_filter:
                  summary: Invalid filter
                  value:
                    error_code: BAD_REQUEST
                    message: Invalid filter parameter
        '422':
          description: Unprocessable Entity - invalid query parameters
          content:
            application/json:
              example:
                status_code: 10422
                message: >-
                  1 validation error for Query; limit: Input should be greater
                  than or equal to 1
        '500':
          description: Internal server error
          content:
            application/json:
              example:
                error_code: INTERNAL_SERVER_ERROR
                message: Failed to retrieve customers
components:
  schemas:
    PaginatedResults_GetCustomerResponseSchema_:
      properties:
        next:
          anyOf:
            - type: string
            - type: 'null'
          title: Next
          description: The cursor for the next page of results
          examples:
            - V2VsbCBhcmV1IGN1cmlvdxM=
        previous:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous
          description: The cursor for the previous page of results
          examples:
            - GmBsbCBhcmV1IGN1cmlvdxM=
        total_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Count
          description: The total count of rows
        results:
          items:
            $ref: '#/components/schemas/GetCustomerResponseSchema'
          type: array
          title: Results
          description: The results for the current page
      type: object
      required:
        - results
      title: PaginatedResults[GetCustomerResponseSchema]
    GetCustomerResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Customer ID
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: External Customer Id
        customer_name:
          type: string
          title: Customer Name
          description: Customer name
        custom_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Custom Data
          description: Customer Custom Data
        address:
          anyOf:
            - $ref: '#/components/schemas/AddressResponse'
            - type: 'null'
          description: Customer address
        ship_to_address:
          anyOf:
            - $ref: '#/components/schemas/AddressResponse'
            - type: 'null'
          description: Customer Ship To address
        tax_info:
          anyOf:
            - items:
                $ref: '#/components/schemas/TaxId'
              type: array
            - type: 'null'
          title: Tax Info
          description: Customer Tax Ids
          default: []
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number
          description: Customer Phone Number
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: Customer primary email address
        contacts:
          anyOf:
            - items:
                $ref: '#/components/schemas/ContactResponseSchema'
              type: array
            - type: 'null'
          title: Contacts
          description: List of associated contacts
        custom_attributes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Custom Attributes
          description: Customer Tags
        communications_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Communications Enabled
          description: To enable/disable communications
          default: true
        auto_charge_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Auto Charge Enabled
          description: To enable/disable auto-charge
          default: true
        invoice_details:
          anyOf:
            - $ref: '#/components/schemas/InvoiceDetailsObject'
            - type: 'null'
          description: Invoice Details Object
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: Updated At
        default_payment_method:
          anyOf:
            - $ref: '#/components/schemas/CustomerPaymentMethodsResponseSchema'
            - type: 'null'
          description: default_payment_method
        business_entity_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Business Entity Id
          description: Business Entity Id
        business_entity:
          anyOf:
            - $ref: '#/components/schemas/BusinessEntityResponseSchema'
            - type: 'null'
          description: Business Entity
      type: object
      required:
        - id
        - external_id
        - customer_name
        - custom_data
        - address
      title: GetCustomerResponseSchema
      description: Create Customer Response Schema
    AddressResponse:
      properties:
        line1:
          anyOf:
            - type: string
            - type: 'null'
          title: Line1
          description: Street address line 1 (e.g., building number and street name)
        line2:
          anyOf:
            - type: string
            - type: 'null'
          title: Line2
          description: Street address line 2 (e.g., apartment, suite, unit number)
        line3:
          anyOf:
            - type: string
            - type: 'null'
          title: Line3
          description: Street address line 3 (additional address information)
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: City or locality name
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          description: State, province, or region
        zipCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Zipcode
          description: Postal code or ZIP code
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: Country name (e.g., 'United States')
        country_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Country Code
          description: Two-letter ISO country code (e.g., 'US', 'GB')
        validation_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Validation Status
          description: Address validation status
        connector_validation:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Connector Validation
          description: Validation data from external connector
      type: object
      title: AddressResponse
      description: Address Schema
    TaxId:
      properties:
        country_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Country Code
          description: Two-letter ISO country code for the tax ID (e.g., 'US', 'GB', 'IN')
        tax_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Tax Code
          description: Type of tax identifier (e.g., 'VAT', 'GST', 'EIN')
        tax_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tax Id
          description: The actual tax identification number
      type: object
      title: TaxId
      description: Tax Id Schema
    ContactResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Contact Id
        customer:
          type: string
          format: uuid
          title: Customer
          description: ' '
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
          description: Contact first name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
          description: Contact last name
        email:
          type: string
          title: Email
          description: Contact Email
        send_contract:
          type: boolean
          title: Send Contract
          description: Send Contract
          default: false
        send_invoice:
          type: boolean
          title: Send Invoice
          description: Send Contact
          default: true
      type: object
      required:
        - id
        - customer
        - email
      title: ContactResponseSchema
      description: Create & Update Contact Response Schema
    InvoiceDetailsObject:
      properties:
        no_of_invoices:
          anyOf:
            - type: integer
            - type: 'null'
          title: No Of Invoices
        total_amount_due:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Amount Due
      type: object
      title: InvoiceDetailsObject
    CustomerPaymentMethodsResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Customer Id
        customer_id:
          type: string
          format: uuid
          title: Customer Id
          description: Customer Id
        organisation_id:
          type: string
          format: uuid
          title: Organisation Id
          description: Organisation Id
        connector_id:
          type: string
          format: uuid
          title: Connector Id
          description: Connector Id
        connector_name:
          type: string
          title: Connector Name
          description: Connector Name
        external_id:
          type: string
          title: External Id
          description: External Id
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: status
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: country
        is_default:
          type: boolean
          title: Is Default
          description: is default payment method
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: payment method type
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: Payment Method Details
      type: object
      required:
        - id
        - customer_id
        - organisation_id
        - connector_id
        - connector_name
        - external_id
        - is_default
      title: CustomerPaymentMethodsResponseSchema
      description: Create Customer Response Schema
    BusinessEntityResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Business Entity ID
        name:
          type: string
          title: Name
          description: Business Entity Name
        address:
          anyOf:
            - $ref: '#/components/schemas/EntityAddress'
            - type: 'null'
          description: Business Entity address
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: Business Entity email
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number
          description: Business Entity phone number
        is_default:
          type: boolean
          title: Is Default
          description: Business Entity default
        tax_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tax Config
          description: Business Entity tax config
        logo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Logo Url
          description: Business Entity logo URL
      type: object
      required:
        - id
        - name
        - is_default
      title: BusinessEntityResponseSchema
      description: Business Entity Response Schema
    EntityAddress:
      properties:
        line1:
          anyOf:
            - type: string
            - type: 'null'
          title: Line1
          description: Line 1
        line2:
          anyOf:
            - type: string
            - type: 'null'
          title: Line2
          description: Line 2
        line3:
          anyOf:
            - type: string
            - type: 'null'
          title: Line3
          description: Line 3
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: City
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          description: State
        zipCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Zipcode
          description: Zip Code
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: Country
        validation_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Validation Status
          description: Address Validation Status
      type: object
      title: EntityAddress
      description: Address Schema
  securitySchemes:
    ApiTokenAuth:
      type: apiKey
      in: header
      name: x-api-key
      x-default: <your-api-key>
    OrganisationAuth:
      type: apiKey
      in: header
      name: organisation
      x-default: <your-organisation-id>

````