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

# On-Time Delivery Rate Report

> Retrieve on-time delivery metrics for sales orders.
    
    **Parameters:**
    - start_date: Start of reporting period (YYYY-MM-DD)
    - end_date: End of reporting period (YYYY-MM-DD)
    - client_id: Optional filter by specific client
    
    **Returns:**
    - Total orders delivered
    - On-time delivery count
    - Late delivery count
    - On-time percentage
    - Average delay in days
    - Breakdown by client



## OpenAPI

````yaml /api/openapi-cutmake.json get /api/v1/reports/on-time-delivery
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /api/v1/reports/on-time-delivery:
    get:
      tags:
        - Analytics
        - Analytics
      summary: On-Time Delivery Rate Report
      description: |-
        Retrieve on-time delivery metrics for sales orders.
            
            **Parameters:**
            - start_date: Start of reporting period (YYYY-MM-DD)
            - end_date: End of reporting period (YYYY-MM-DD)
            - client_id: Optional filter by specific client
            
            **Returns:**
            - Total orders delivered
            - On-time delivery count
            - Late delivery count
            - On-time percentage
            - Average delay in days
            - Breakdown by client
      operationId: on_time_delivery_report_api_v1_reports_on_time_delivery_get
      parameters:
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            format: date
            description: Start date (YYYY-MM-DD)
            title: Start Date
          description: Start date (YYYY-MM-DD)
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            format: date
            description: End date (YYYY-MM-DD)
            title: End Date
          description: End date (YYYY-MM-DD)
        - name: client_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Optional client filter
            title: Client Id
          description: Optional client filter
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login

````