> ## 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 workforce insights

> Get workforce insights and analytics from Deputy for the specified time period.



## OpenAPI

````yaml api-reference/v1/openapi.yaml get /v1/scheduling/insights
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/scheduling/insights:
    get:
      tags:
        - Scheduling
      summary: Get workforce insights
      description: >-
        Get workforce insights and analytics from Deputy for the specified time
        period.
      parameters:
        - schema:
            type: string
            enum:
              - week
              - month
              - year
            default: week
            description: Time period for insights
            example: week
          required: false
          name: period
          in: query
      responses:
        '200':
          description: Insights data
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      insights:
                        type: object
                        properties:
                          total_hours:
                            type: number
                          total_shifts:
                            type: number
                          average_hours_per_shift:
                            type: number
                          labor_cost:
                            type: number
                          scheduled_vs_actual:
                            type: object
                            properties:
                              scheduled:
                                type: number
                              actual:
                                type: number
                            required:
                              - scheduled
                              - actual
                          top_areas:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                hours:
                                  type: number
                              required:
                                - name
                                - hours
                              description: Area hours
                          weekly_hours:
                            type: array
                            items:
                              type: object
                              properties:
                                day:
                                  type: string
                                hours:
                                  type: number
                              required:
                                - day
                                - hours
                              description: Weekly hours
                        required:
                          - total_hours
                          - total_shifts
                          - average_hours_per_shift
                          - labor_cost
                          - scheduled_vs_actual
                          - top_areas
                          - weekly_hours
                        description: Insights data
                      deputy_configured:
                        type: boolean
                        enum:
                          - true
                    required:
                      - insights
                      - deputy_configured
                    description: Get insights response
                  - type: object
                    properties:
                      insights:
                        nullable: true
                      message:
                        type: string
                      deputy_configured:
                        type: boolean
                        enum:
                          - false
                    required:
                      - insights
                      - deputy_configured
                    description: Get insights not configured response
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  insights:
                    nullable: true
                  error:
                    type: string
                  message:
                    type: string
                  deputy_configured:
                    type: boolean
                    enum:
                      - true
                required:
                  - insights
                  - error
                  - deputy_configured
                description: Get insights error response

````