> ## 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.

# Get performance metrics

> Returns performance metrics for a date range including:
- Order count and total sales
- Average fulfillment time (from arrival to delivery)
- RFC vs sweep item breakdown
- Estimated profit based on selling price minus purchase price



## OpenAPI

````yaml api-reference/v1/openapi.yaml get /v1/performance
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/performance:
    get:
      tags:
        - Performance
      summary: Get performance metrics
      description: |-
        Returns performance metrics for a date range including:
        - Order count and total sales
        - Average fulfillment time (from arrival to delivery)
        - RFC vs sweep item breakdown
        - Estimated profit based on selling price minus purchase price
      parameters:
        - schema:
            type: string
            description: Start date (YYYY-MM-DD). Defaults to today.
            example: '2026-02-01'
          required: false
          name: start_date
          in: query
        - schema:
            type: string
            description: End date (YYYY-MM-DD). Defaults to today.
            example: '2026-02-03'
          required: false
          name: end_date
          in: query
      responses:
        '200':
          description: Performance metrics
          content:
            application/json:
              schema:
                type: object
                properties:
                  date_range:
                    type: object
                    properties:
                      start:
                        type: string
                      end:
                        type: string
                    required:
                      - start
                      - end
                  orders_count:
                    type: number
                    description: Total number of orders placed (excluding cancelled)
                  total_sales:
                    type: number
                    description: Total sales amount in dollars
                  avg_fulfillment_time_minutes:
                    type: number
                    nullable: true
                    description: Average time from order arrival to delivery in minutes
                  rfc_items_count:
                    type: number
                    description: Number of RFC (inventory) items
                  sweep_items_count:
                    type: number
                    description: Number of sweep items
                  estimated_profit:
                    type: number
                    description: Estimated profit in dollars
                  estimated_profit_percent:
                    type: number
                    description: Estimated profit as percentage
                required:
                  - date_range
                  - orders_count
                  - total_sales
                  - avg_fulfillment_time_minutes
                  - rfc_items_count
                  - sweep_items_count
                  - estimated_profit
                  - estimated_profit_percent
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error

````