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

# Query QC template versions

> Same as `GET /qc-template`, with the query in the request body. Use this when your filter or `select` list is too long for a URL.



## OpenAPI

````yaml /openapi.yaml post /qc-template/query
openapi: 3.0.3
info:
  title: BuildingSwell Public API
  version: 2.0.0
  description: >
    The BuildingSwell v2 public API. Every request needs an `X-API-Key` header,
    and

    every key is scoped to one organization, so you only ever see your own data.


    Base URL: `https://app.buildingswell.com/api/v2`


    Most resources share the same CRUD and query shape. Read the

    [standard endpoints](/guides/standard-endpoints) and

    [querying](/guides/querying) guides once and the rest of this reference
    follows

    the same rules. For what a delete actually removes, see

    [archiving and deleting](/guides/archiving-and-deleting).
servers:
  - url: https://{instance}/api/v2
    description: Your BuildingSwell instance
    variables:
      instance:
        default: app.buildingswell.com
        description: Your BuildingSwell host
security:
  - ApiKeyAuth: []
tags:
  - name: Projects
    description: Customer jobs, and the archive behavior they share with most resources.
  - name: Stages
    description: Reusable shop stations, scoped to a department.
  - name: Deliverables
    description: >-
      The work tree: orders, routes, phases, components, stages, steps, and QC
      steps.
  - name: Work sessions
    description: Time logged by one person against one deliverable.
  - name: Dependencies
    description: Scheduling links between deliverables.
  - name: Documents
    description: Files attached to orders.
  - name: QC
    description: QC templates and the inspection sets filled from them.
  - name: People (Workers)
    description: Your workforce roster. Called People in the app and `worker` in the API.
  - name: Timesheets
    description: Read-only view over attendance and work sessions.
  - name: Codes
    description: Cost, union, and per diem code lists. Referenced by value, not by id.
  - name: Roles
    description: Permission roles, and the statements that make them up.
  - name: Users
    description: >-
      People with a BuildingSwell login. Called Users in the app and
      `organization-member` in the API.
  - name: Concepts
    description: Deliverable writes with the nesting rules enforced.
  - name: Items
    description: Material and part definitions, purchasing units, and availability.
  - name: Item vendors
    description: Supplier SKUs linked to items.
  - name: Inventory stock
    description: Read-only quantities by item and location.
  - name: Inventory transactions
    description: The inventory ledger and its posting rules.
  - name: Inventory allocations
    description: Read-only reservations for orders and projects.
  - name: BOM lines
    description: Planned material inputs for routes, orders, and projects.
  - name: Production outputs
    description: Declarations of manufactured outputs.
  - name: Units of measure
    description: Reusable names and abbreviations for quantities.
  - name: Vendors
    description: Suppliers, manufacturers, and subcontractors.
  - name: Locations
    description: Department and project locations for storage and delivery.
  - name: Deliveries
    description: Inbound receipts, outbound trips, and transfers.
  - name: Delivery lines
    description: Material and ad-hoc manifest lines.
  - name: Trucks
    description: Fleet vehicles and their capacity.
  - name: Contacts
    description: Drivers, receivers, and other business contacts.
  - name: Project contacts
    description: Links between projects and contacts.
  - name: Teams
    description: Read-only department teams.
  - name: Shifts
    description: Read-only department shifts.
  - name: Departments (shops)
    description: Read-only departments, called shops in the API.
  - name: Custom properties
    description: Organization property definitions and values on orders.
paths:
  /qc-template/query:
    post:
      tags:
        - QC
      summary: Query QC template versions
      description: >-
        Same as `GET /qc-template`, with the query in the request body. Use this
        when your filter or `select` list is too long for a URL.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryBody'
      responses:
        '200':
          description: A page of QC template versions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QCTemplateVersionListResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    QueryBody:
      type: object
      description: >-
        The same options the list endpoint takes in the query string. Any
        additional key is read as a field filter.
      properties:
        filter:
          type: string
          description: AND/OR filter expression.
        search:
          type: string
          description: Full-text search term.
        page:
          type: integer
          description: Page to return, starting at 1.
          default: 1
        pageSize:
          type: integer
          description: Records per page. Defaults to 100 when omitted.
          default: 100
        orderBy:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          description: Sort as `field:asc` or `field:desc`.
        select:
          type: array
          items:
            type: string
            description: Field name.
          description: Return only these fields.
      additionalProperties: true
    QCTemplateVersionListResponse:
      type: object
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/QCTemplateVersion'
        hasMore:
          type: boolean
          description: '`true` when another page is available.'
    QCTemplateVersion:
      type: object
      description: >-
        A published version of a QC template: the questions a set gets filled
        from.
      properties:
        id:
          type: string
          format: uuid
          description: Unique id of this version.
        organizationId:
          type: string
          format: uuid
          description: Your organization. Taken from the API key.
        qcTemplateId:
          type: string
          format: uuid
          description: The template these versions belong to.
        name:
          type: string
          description: Template name.
        description:
          type: string
          nullable: true
          description: What the template is for.
        versionNumber:
          type: number
          description: Version number within the template.
        isDraft:
          type: boolean
          description: '`true` while the version is still a draft.'
        requiresPassFail:
          type: boolean
          description: >-
            `true` when the template ends in a pass/fail verdict rather than
            being questions-only.
        externallyFillable:
          type: boolean
          default: false
          description: >-
            `true` when the set can be filled by someone outside your
            organization.
        captureLocationOnSubmit:
          type: boolean
          default: false
          description: '`true` when submitting a set records the submitter''s location.'
        questions:
          type: array
          nullable: true
          description: The template's questions, in the order they are shown.
          items:
            type: object
            description: One question on the template.
            properties:
              id:
                type: string
                format: uuid
                description: Unique id of the question within the version.
              type:
                type: string
                description: >-
                  How the question is answered, for example `text`. Set by the
                  template editor.
              title:
                type: string
                description: The question itself.
              description:
                type: string
                description: Extra guidance for whoever fills it in. Empty when unset.
              options:
                type: array
                description: |
                  Choices for the question. Present even for types that take no
                  choices, where the titles are empty.
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                      description: Unique id of the choice.
                    title:
                      type: string
                      description: Label for the choice.
        template:
          type: object
          description: |
            The parent template this version belongs to. The same id as
            `qcTemplateId`.
          properties:
            id:
              type: string
              format: uuid
            organizationId:
              type: string
              format: uuid
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
          additionalProperties: true
        createdAt:
          type: string
          format: date-time
          description: When the version was created.
        updatedAt:
          type: string
          format: date-time
          description: When the version last changed.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: What went wrong, in plain language.
            code:
              type: string
              enum:
                - BAD_REQUEST
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - CONFLICT
                - VALIDATION
                - UNIQUE_VIOLATION
                - FK_VIOLATION
                - RATE_LIMITED
                - INTERNAL
              description: >-
                Stable machine-readable code. Branch on this rather than on the
                message text.
            requestId:
              type: string
              description: Id for this request. Quote it when you contact support.
            details:
              type: array
              items:
                type: object
                description: One field-level problem.
                properties:
                  path:
                    type: string
                    description: Field that failed, for example `data.stageId`.
                  message:
                    type: string
                    description: Why it failed.
                  code:
                    type: string
                    description: Validation code.
              description: Per-field problems. Present on validation failures only.
            missingPermissions:
              type: array
              items:
                type: string
                description: Permission name.
              description: Permissions your key is missing. Present on `403` only.
        context:
          type: object
          description: Extra context for the error. Usually empty.
          additionalProperties: true
  responses:
    BadRequest:
      description: >-
        The request was malformed or failed validation. Check `error.details`
        for the fields at fault.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The `X-API-Key` header is missing or the key is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        Your key lacks the permission for this call. `error.missingPermissions`
        lists what is needed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: >-
        Too many requests. Read `RateLimit-Reset` for when to retry. This
        response also carries a top-level `message` alongside `error`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Organization-scoped API key. Create one in the BuildingSwell app under
        Organization settings, API keys.

````