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

# Daily Compliance

> Returns project tasks due on a single day (in the caller's timezone), grouped by location, with a derived per-task compliance state. Location scope defaults to the caller's authorized locations when filters.location is empty. The underlying route requires the CAN_VIEW_REPORTING permission — the API key acts as its default user.

Returns project tasks due on a single day (in the caller's timezone), grouped by location, each with a derived compliance state (`Completed`, `Missed`, `OverDue`, or `Open`). Filters are wrapped under `filters`; `location` defaults to the caller's authorized locations when empty, and `onlyMissed` limits results to missed tasks. Requires the `CAN_VIEW_REPORTING` permission (inherited from the key's default user).


## OpenAPI

````yaml POST /api/v1/ops/reports/tasks/daily-compliance
openapi: 3.1.0
info:
  title: Xenia Team API - Daily Compliance
  description: Returns project-task compliance for a single day, grouped by location.
  version: 1.0.0
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/ops/reports/tasks/daily-compliance:
    post:
      tags:
        - Reporting
      summary: Daily Compliance
      description: >-
        Returns project tasks due on a single day (in the caller's timezone),
        grouped by location, with a derived per-task compliance state. Location
        scope defaults to the caller's authorized locations when
        filters.location is empty. The underlying route requires the
        CAN_VIEW_REPORTING permission — the API key acts as its default user.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                filters:
                  type: object
                  properties:
                    date:
                      type: string
                      format: date
                      description: >-
                        Target day (YYYY-MM-DD), interpreted in the caller's
                        timezone. Defaults to today when omitted.
                    project:
                      type: array
                      items:
                        type: string
                        format: uuid
                      description: Project UUIDs to include.
                    location:
                      type: array
                      items:
                        type: string
                        format: uuid
                      description: >-
                        Location UUIDs. Defaults to authorized locations when
                        empty.
                    onlyMissed:
                      type: boolean
                      default: false
                      description: When true, only tasks in the Missed state are returned.
            example:
              filters:
                date: '2025-06-15'
                project: []
                location: []
                onlyMissed: false
      responses:
        '200':
          description: Daily compliance data retrieved successfully.
          content:
            application/json:
              example:
                data:
                  charts:
                    - LocationId: 46715d09-1628-4b1a-a12d-f9e0bbcdbc3c
                      LocationName: Chicago Downtown
                      Projects:
                        - TaskId: a1b2c3d4-e5f6-4789-9012-3456789abcde
                          ProjectId: 11112222-3333-4444-5555-666677778888
                          ProjectTitle: Morning Safety Walk
                          TaskState: Completed
                        - TaskId: b2c3d4e5-f6a7-4890-9123-456789abcdef
                          ProjectId: 11112222-3333-4444-5555-666677778888
                          ProjectTitle: Morning Safety Walk
                          TaskState: Missed
                meta: {}
        '401':
          description: >-
            Unauthorized - Invalid client credentials, or client does not belong
            to this workspace.
        '403':
          description: 'Forbidden: API key not authorized for this route.'
        '500':
          description: Internal Server Error.
      security:
        - clientKey: []
          clientSecret: []
components:
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````