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

# Submission Records

> Returns submission (checklist log) records for the workspace. All body fields are optional; omitting them returns every non-draft submission. Results are scoped to the locations the key's default user can access; this endpoint has no separate CAN_VIEW_REPORTING gate.

Returns template (checklist) submission records for the workspace derived from the API key. All body fields are optional; an empty body returns every non-draft submission. Set `includeItems: false` to omit per-submission answers. `meta.totalCount` is the total number of matching rows (for paging) and `meta.count` is the per-status breakdown. Results are scoped to the locations the key's default user can access; this endpoint has no separate `CAN_VIEW_REPORTING` gate.


## OpenAPI

````yaml POST /api/v1/ops/template-submissions
openapi: 3.1.0
info:
  title: Xenia Team API - Submission Records
  description: >-
    Returns template (checklist) submission records for the workspace with
    optional filtering, paging, and full item detail.
  version: 1.0.0
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/ops/template-submissions:
    post:
      tags:
        - Reporting
      summary: List Submission Records
      description: >-
        Returns submission (checklist log) records for the workspace. All body
        fields are optional; omitting them returns every non-draft submission.
        Results are scoped to the locations the key's default user can access;
        this endpoint has no separate CAN_VIEW_REPORTING gate.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                fromDate:
                  type: string
                  format: date-time
                  description: >-
                    Start of the submission date range (filters on
                    lastItemUpdatedAt). Requires toDate to also be set.
                toDate:
                  type: string
                  format: date-time
                  description: >-
                    End of the submission date range. Requires fromDate to also
                    be set.
                checklists:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: Template (ChecklistId) UUIDs to include.
                statuses:
                  type: array
                  items:
                    type: string
                  description: >-
                    Submission statuses to include, e.g. "Submitted", "In
                    Progress".
                locations:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: >-
                    Location UUIDs. Matches the submission's default location or
                    any hierarchy location.
                users:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: >-
                    User UUIDs. Matches the creator, updater, or last item
                    updater.
                searchText:
                  type: string
                  description: >-
                    Free-text match against the template name and the
                    submitter/updater name.
                offset:
                  type: integer
                  default: 0
                  description: Row offset for paging.
                limit:
                  type: integer
                  default: 1000000
                  description: Maximum rows to return. Defaults to effectively all rows.
                includeItems:
                  type: boolean
                  default: true
                  description: >-
                    When true, each submission includes its answered items and
                    sections (TaskChecklistItems / TaskChecklistSections).
            example:
              fromDate: '2025-06-01T00:00:00.000Z'
              toDate: '2025-06-30T23:59:59.999Z'
              checklists:
                - 3f9a1c22-1d4e-4b6a-9c11-a1b2c3d4e5f6
              statuses:
                - Submitted
              locations: []
              users: []
              searchText: ''
              offset: 0
              limit: 50
              includeItems: true
      responses:
        '200':
          description: Submission records retrieved successfully.
          content:
            application/json:
              example:
                data:
                  - id: 8b2c4d6e-0f11-4a23-8b45-c6d7e8f90123
                    name: Opening Checklist
                    icon: null
                    status: Submitted
                    progress:
                      completed: 12
                      total: 12
                    ChecklistId: 3f9a1c22-1d4e-4b6a-9c11-a1b2c3d4e5f6
                    DefaultLocationId: 46715d09-1628-4b1a-a12d-f9e0bbcdbc3c
                    locations:
                      - 46715d09-1628-4b1a-a12d-f9e0bbcdbc3c
                    lastItemUpdatedAt: '2025-06-13T19:21:20.489Z'
                    createdAt: '2025-06-13T13:15:53.544Z'
                    updatedAt: '2025-06-13T19:21:20.489Z'
                    completedAt: '2025-06-13T19:21:20.489Z'
                    scoringMethodology: additive
                    decimalPlacesForScoring: 2
                    autoFailed: false
                    Creator:
                      id: 183f639a-8358-485f-9abe-221d0efcbe8e
                      fullName: Jane Doe
                      firstName: Jane
                      lastName: Doe
                      photo: '@@#7C77B9'
                    Submitter:
                      id: 183f639a-8358-485f-9abe-221d0efcbe8e
                      fullName: Jane Doe
                      firstName: Jane
                      lastName: Doe
                      photo: '@@#7C77B9'
                    Task:
                      id: a1b2c3d4-e5f6-4789-9012-3456789abcde
                      taskNumber: 4821
                      title: Opening Checklist
                    Checklist:
                      id: 3f9a1c22-1d4e-4b6a-9c11-a1b2c3d4e5f6
                      isScoring: false
                      scoringMethodology: additive
                      decimalPlacesForScoring: 2
                    SubmissionApproval: null
                    TaskChecklistItems:
                      - id: c3d4e5f6-a7b8-4901-9234-567890abcdef
                        name: Lobby lights on
                        type: yesNo
                        answers:
                          value: 'Yes'
                        order: 0
                    TaskChecklistSections: []
                meta:
                  totalCount: 137
                  count:
                    submitted: 120
                    Pending Approval: 8
                    Changes Requested: 3
                    Approved: 5
                    Rejected: 1
                    total: 137
        '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

````