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

# List customers with analytics

> Get a paginated list of customer profiles with their analytics data.



## OpenAPI

````yaml api-reference/v1/openapi.yaml get /v1/customers
openapi: 3.1.0
info:
  title: Goods API
  version: 1.0.0
  description: >-
    API for Goods grocery operations - scanner app, admin dashboard, and
    customer features
  contact:
    name: Goods Team
    url: https://goods.app
servers:
  - url: http://localhost:3000
    description: Local development
  - url: https://dev.api.switchyard.run
    description: Development
  - url: https://api.switchyard.run
    description: Production
security: []
tags:
  - name: v1
    description: API v1 - unified domain-based endpoints
  - name: Scanner
    description: Scanner app endpoints for drivers and pickers
  - name: Sweeps
    description: Sweep management - retail store pickup operations
  - name: RFC Picks
    description: Ready-for-checkout picking operations
  - name: Inventory
    description: Inventory management and barcode lookup
  - name: Admin
    description: Admin dashboard endpoints
  - name: Orders
    description: Order management
  - name: Products
    description: Product catalog management
  - name: Notifications
    description: Push, email, SMS, and Slack notification management
paths:
  /v1/customers:
    get:
      tags:
        - Customers
      summary: List customers with analytics
      description: Get a paginated list of customer profiles with their analytics data.
      parameters:
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
            description: Max items to return
            example: 20
          required: false
          name: limit
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            default: 0
            description: Items to skip
            example: 0
          required: false
          name: offset
          in: query
        - schema:
            type: string
            maxLength: 200
            description: Search query
            example: john
          required: false
          name: search
          in: query
        - schema:
            type: string
            enum:
              - total_spend
              - total_orders
              - last_order
              - created_at
            default: created_at
            description: Sort field
          required: false
          name: sortBy
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
            description: Sort order
          required: false
          name: sortOrder
          in: query
      responses:
        '200':
          description: List of customers
          content:
            application/json:
              schema:
                type: object
                properties:
                  customers:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        full_name:
                          type: string
                          nullable: true
                        email:
                          type: string
                          nullable: true
                        phone:
                          type: string
                          nullable: true
                        created_at:
                          type: string
                          nullable: true
                        analytics:
                          type: object
                          nullable: true
                          properties:
                            total_orders:
                              type: number
                              nullable: true
                            total_spend:
                              type: number
                              nullable: true
                            average_order_value:
                              type: number
                              nullable: true
                            orders_pending:
                              type: number
                              nullable: true
                            orders_completed:
                              type: number
                              nullable: true
                            orders_cancelled:
                              type: number
                              nullable: true
                            first_order_at:
                              type: string
                              nullable: true
                            last_order_at:
                              type: string
                              nullable: true
                            price_sensitivity_score:
                              type: number
                              nullable: true
                          required:
                            - total_orders
                            - total_spend
                            - average_order_value
                            - orders_pending
                            - orders_completed
                            - orders_cancelled
                            - first_order_at
                            - last_order_at
                            - price_sensitivity_score
                          description: Customer analytics
                      required:
                        - id
                        - full_name
                        - email
                        - phone
                        - created_at
                        - analytics
                      description: Customer list item
                  total:
                    type: number
                required:
                  - customers
                  - total
                description: List customers response
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                required:
                  - error
                description: Error response

````