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

# Get all customers with filters

> Retrieves a list of customers with optional filtering and pagination.
    
This endpoint allows you to search and filter customers based on various criteria.

## Use Cases
- List all customers with pagination
- Search customers by name or email
- Filter customers by status
- Export customer data

## Query Parameters
- `skip`: Number of records to skip (default: 0, min: 0)
- `take`: Number of records to take (default: 10, min: 1, max: 100)
- `status`: Filter by customer status (ACTIVE, BLACKLISTED, DEACTIVATED)
- `name`: Filter by customer name (partial match, case-insensitive)
- `email`: Filter by customer email (exact match, case-insensitive)

## Example Request
`GET /api/v0/customers?skip=0&take=20&status=ACTIVE&name=John`

## Example Response
```json
{
  "data": [
    {
      "id": "cust_123456",
      "first_name": "John",
      "last_name": "Doe",
      "email": "john.doe@example.com",
      "phone_number": "+1-555-123-4567",
      "customer_type": "Startup",
      "status": "ACTIVE",
      "created_at": "2024-03-20T10:00:00Z",
      "updated_at": "2024-03-20T10:00:00Z"
    }
  ],
  "total": 100,
  "skip": 0,
  "take": 10
}
```



## OpenAPI

````yaml /swagger.yml get /api/v0/customers
openapi: 3.0.0
info:
  title: Devdraft AI Payment & Business Management API
  description: >-

    A comprehensive payment processing and business management API that enables
    seamless integration of cryptocurrency and traditional payment methods.
        
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.devdraft.ai
    description: Production Server
security: []
tags: []
paths:
  /api/v0/customers:
    get:
      tags:
        - Customers
      summary: Get all customers with filters
      description: >-
        Retrieves a list of customers with optional filtering and pagination.
            
        This endpoint allows you to search and filter customers based on various
        criteria.


        ## Use Cases

        - List all customers with pagination

        - Search customers by name or email

        - Filter customers by status

        - Export customer data


        ## Query Parameters

        - `skip`: Number of records to skip (default: 0, min: 0)

        - `take`: Number of records to take (default: 10, min: 1, max: 100)

        - `status`: Filter by customer status (ACTIVE, BLACKLISTED, DEACTIVATED)

        - `name`: Filter by customer name (partial match, case-insensitive)

        - `email`: Filter by customer email (exact match, case-insensitive)


        ## Example Request

        `GET /api/v0/customers?skip=0&take=20&status=ACTIVE&name=John`


        ## Example Response

        ```json

        {
          "data": [
            {
              "id": "cust_123456",
              "first_name": "John",
              "last_name": "Doe",
              "email": "john.doe@example.com",
              "phone_number": "+1-555-123-4567",
              "customer_type": "Startup",
              "status": "ACTIVE",
              "created_at": "2024-03-20T10:00:00Z",
              "updated_at": "2024-03-20T10:00:00Z"
            }
          ],
          "total": 100,
          "skip": 0,
          "take": 10
        }

        ```
      operationId: CustomerController_findAll
      parameters:
        - name: skip
          required: false
          in: query
          description: Number of records to skip for pagination
          schema:
            minimum: 0
            default: 0
            example: 0
            type: number
        - name: take
          required: false
          in: query
          description: Number of records to return (max 100)
          schema:
            minimum: 1
            maximum: 100
            default: 10
            example: 10
            type: number
        - name: status
          required: false
          in: query
          description: Filter customers by status
          schema:
            $ref: '#/components/schemas/CustomerStatus'
        - name: name
          required: false
          in: query
          description: Filter customers by name (partial match, case-insensitive)
          schema:
            maxLength: 100
            example: John
            type: string
        - name: email
          required: false
          in: query
          description: Filter customers by email (exact match, case-insensitive)
          schema:
            maxLength: 255
            example: john.doe@example.com
            type: string
      responses:
        '200':
          description: Successfully retrieved customers
        '400':
          description: Bad Request - Invalid query parameters
        '401':
          description: Unauthorized - Invalid API credentials
      security:
        - x-client-secret: []
        - x-client-key: []
components:
  schemas:
    CustomerStatus:
      type: string
      enum:
        - ACTIVE
        - BLACKLISTED
        - DEACTIVATED
        - DELETED
      description: >-
        Current status of the customer account. Controls access to services and
        features.
  securitySchemes:
    x-client-secret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Your secret API key. Keep this secure and never expose it in client-side
        code.
    x-client-key:
      type: apiKey
      in: header
      name: x-client-key
      description: Your unique client API key. Obtain this from your Devdraft AI dashboard.

````