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

# Orders report

> Retrieve a report of orders by date range and status.



## OpenAPI

````yaml /openapi-public.yml get /api/v1/reports/orders
openapi: 3.0.3
info:
  title: Blend API
  version: 1.0.0
  description: API for Blend
servers:
  - url: https://api.byblend.com
    description: Blend production server
security:
  - bearerAuth: []
tags:
  - name: Orders
    description: Order management endpoints
  - name: Patients
    description: Patient management endpoints
  - name: Reports
    description: Reporting endpoints
  - name: Products and Materials
    description: Product catalog and inventory endpoints
  - name: Electronic Prescriptions
    description: Electronic prescription management endpoints
  - name: Prescriptions
    description: Prescription management endpoints
  - name: Authentication
    description: Authentication endpoints
  - name: Notifications
    description: User management endpoints
  - name: Prescribers
paths:
  /api/v1/reports/orders:
    get:
      tags:
        - Reports
      summary: Orders report
      description: Retrieve a report of orders by date range and status.
      parameters:
        - name: start_date
          in: query
          required: true
          description: Start date of the date range to report on
          schema:
            type: string
            format: date
            example: '2025-01-01'
        - name: end_date
          in: query
          required: true
          description: End date of the date range to report on
          schema:
            type: string
            format: date
            example: '2025-01-31'
        - name: include
          in: query
          required: false
          description: >-
            Optional parameter to specify which fields to return in the report
            (status, count, products). Separate multiple fields with commas.
          schema:
            type: string
            example: status,count
      responses:
        '200':
          description: Successful response with order report
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportOrder'
              examples:
                application/json:
                  value:
                    date_range: 2025-01-01 to 2025-01-31
                    total_orders: 179
                    orders_by_status:
                      - status: received
                        count: 23
                      - status: data_entry
                        count: 19
                      - status: shipped
                        count: 46
                    orders_by_product:
                      prescription:
                        - name: Rapamycin 100mg
                          id: 0227d1e5-ba9a-42b5-8fe2-38882aa65708
                          count: 920
                      non_prescription:
                        - name: PABA-free sunscreen
                          id: 0227d1e5-ba9a-42b5-8fe2-38882aa65708
                          count: 412
                      order_material:
                        - name: Q4 2025 information packet
                          id: 0227d1e5-ba9a-42b5-8fe2-38882aa65708
                          count: 550
components:
  schemas:
    ReportOrder:
      type: object
      properties:
        date_range:
          type: string
          example: 2025-01-01 to 2025-01-31
        total_orders:
          type: integer
          example: 179
        orders_by_status:
          type: array
          items:
            $ref: '#/components/schemas/ReportOrderStatus'
        orders_by_product:
          type: object
          description: Order counts by product
          properties:
            prescription:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    example: 0227d1e5-ba9a-42b5-8fe2-38882aa65708
                  name:
                    type: string
                    example: Rapamycin 100mg
                  count:
                    type: integer
                    example: 920
            non_prescription:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    example: 0227d1e5-ba9a-42b5-8fe2-38882aa65708
                  name:
                    type: string
                    example: PABA-free sunscreen
                  count:
                    type: integer
                    example: 412
            order_material:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    example: 0227d1e5-ba9a-42b5-8fe2-38882aa65708
                  name:
                    type: string
                    example: Q4 2025 information packet
                  count:
                    type: integer
                    example: 550
    ReportOrderStatus:
      type: object
      properties:
        status:
          type: string
          example: received
        count:
          type: integer
          example: 23
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````