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

# The maintenance plan register (UI spec §12.1).

> Each plan's schedule written as one sentence, its scope counted both ways, and the next open
occurrence.



## OpenAPI

````yaml /api-reference/openapi.json get /maintenance_plans
openapi: 3.0.0
info:
  description: ''
  title: >-
    The only schema PostgREST exposes (ADR-014). Reads are security_invoker
    views; writes are SECURITY DEFINER functions. Rebuilt wholesale on every
    deploy — it holds no data.
  version: 12.2.3
servers:
  - url: https://app.assetinfinity.ai/api
security: []
tags:
  - name: Signing in
  - name: Profile
  - name: Assets
  - name: Asset lifecycle
  - name: Work lifecycle
  - name: Maintenance
  - name: Inventory
  - name: Inventory detail
  - name: Procurement
  - name: Contracts
  - name: Workforce
  - name: Capacity
  - name: Dispatch
  - name: Routing
  - name: Tools
  - name: Inspections
  - name: Verification
  - name: Reliability
  - name: Parts demand
  - name: Sensors and meters
  - name: Map
  - name: Floor plans
  - name: Labels
  - name: Lost and found
  - name: Root cause analysis
  - name: Reports
  - name: Audit center
  - name: Activity
  - name: Notifications
  - name: Channels
  - name: Search
  - name: Copilot
  - name: Import
  - name: Files
  - name: Sync
  - name: Support
  - name: Admin
  - name: Access
  - name: Lookups
  - name: Read models
  - name: Branding
  - name: Custom fields
  - name: Form studio
  - name: Workflows
  - name: Workflow studio
  - name: Rules
  - name: Statuses and transitions
  - name: Currencies and locales
  - name: Work configuration
  - name: Asset configuration
  - name: Inventory configuration
  - name: Tool configuration
  - name: Workforce configuration
  - name: Vendor and contract configuration
  - name: Document configuration
  - name: Inspection configuration
  - name: Sites, locations and the organisation
  - name: Platform
  - name: Self verification
  - name: Setup
  - name: Tools on a job, and who has them out
  - name: Vendors and contracts
  - name: Work order execution
  - name: Workforce detail
externalDocs:
  description: PostgREST Documentation
  url: https://postgrest.org/en/v12/references/api.html
paths:
  /maintenance_plans:
    get:
      tags:
        - Maintenance
      summary: The maintenance plan register (UI spec §12.1).
      description: >-
        Each plan's schedule written as one sentence, its scope counted both
        ways, and the next open

        occurrence.
      parameters:
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.inspection_template_id
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.inspection_template_code
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.inspection_template_name
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.id'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.plan_number'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.name'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.description'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.maintenance_type'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.status'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.status_label'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.status_category'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.site_id'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.site_code'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.priority_code'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.criticality'
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.trigger_combination
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.estimated_duration_minutes
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.lead_time_days'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.tolerance_days'
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.sla_response_minutes
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.sla_resolution_minutes
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.assigned_team_id'
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.preferred_worker_id
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.preferred_worker_name
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.preferred_vendor_id
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.preferred_vendor_name
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.use_contract_visits
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.requires_permit'
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.requires_shutdown
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.safety_instructions
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.instructions'
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.auto_generate_work_order
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.current_version_number
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.last_generated_at
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.is_active'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.asset_count'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.asset_type_count'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.task_count'
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.requirement_count
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.trigger_count'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.frequency'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.next_due_at'
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_plans.work_orders_generated
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.custom_fields'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.row_version'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.created_at'
        - $ref: '#/components/parameters/rowFilter.maintenance_plans.updated_at'
        - $ref: '#/components/parameters/select'
        - $ref: '#/components/parameters/order'
        - $ref: '#/components/parameters/range'
        - $ref: '#/components/parameters/rangeUnit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/preferCount'
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/maintenance_plans'
                type: array
            application/vnd.pgrst.object+json:
              schema:
                items:
                  $ref: '#/components/schemas/maintenance_plans'
                type: array
            application/vnd.pgrst.object+json;nulls=stripped:
              schema:
                items:
                  $ref: '#/components/schemas/maintenance_plans'
                type: array
            text/csv:
              schema:
                items:
                  $ref: '#/components/schemas/maintenance_plans'
                type: array
          description: OK
        '206':
          description: Partial Content
components:
  parameters:
    rowFilter.maintenance_plans.inspection_template_id:
      in: query
      name: inspection_template_id
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.inspection_template_code:
      in: query
      name: inspection_template_code
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.inspection_template_name:
      in: query
      name: inspection_template_name
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.id:
      in: query
      name: id
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.plan_number:
      in: query
      name: plan_number
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.name:
      in: query
      name: name
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.description:
      in: query
      name: description
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.maintenance_type:
      in: query
      name: maintenance_type
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.status:
      in: query
      name: status
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.status_label:
      in: query
      name: status_label
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.status_category:
      in: query
      name: status_category
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.site_id:
      in: query
      name: site_id
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.site_code:
      in: query
      name: site_code
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.priority_code:
      in: query
      name: priority_code
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.criticality:
      in: query
      name: criticality
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.trigger_combination:
      in: query
      name: trigger_combination
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.estimated_duration_minutes:
      in: query
      name: estimated_duration_minutes
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.lead_time_days:
      in: query
      name: lead_time_days
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.tolerance_days:
      in: query
      name: tolerance_days
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.sla_response_minutes:
      in: query
      name: sla_response_minutes
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.sla_resolution_minutes:
      in: query
      name: sla_resolution_minutes
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.assigned_team_id:
      in: query
      name: assigned_team_id
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.preferred_worker_id:
      in: query
      name: preferred_worker_id
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.preferred_worker_name:
      in: query
      name: preferred_worker_name
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.preferred_vendor_id:
      in: query
      name: preferred_vendor_id
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.preferred_vendor_name:
      in: query
      name: preferred_vendor_name
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.use_contract_visits:
      in: query
      name: use_contract_visits
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.requires_permit:
      in: query
      name: requires_permit
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.requires_shutdown:
      in: query
      name: requires_shutdown
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.safety_instructions:
      in: query
      name: safety_instructions
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.instructions:
      in: query
      name: instructions
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.auto_generate_work_order:
      in: query
      name: auto_generate_work_order
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.current_version_number:
      in: query
      name: current_version_number
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.last_generated_at:
      in: query
      name: last_generated_at
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.is_active:
      in: query
      name: is_active
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.asset_count:
      in: query
      name: asset_count
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.asset_type_count:
      in: query
      name: asset_type_count
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.task_count:
      in: query
      name: task_count
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.requirement_count:
      in: query
      name: requirement_count
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.trigger_count:
      in: query
      name: trigger_count
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.frequency:
      in: query
      name: frequency
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.next_due_at:
      in: query
      name: next_due_at
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.work_orders_generated:
      in: query
      name: work_orders_generated
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.custom_fields:
      in: query
      name: custom_fields
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.row_version:
      in: query
      name: row_version
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.created_at:
      in: query
      name: created_at
      required: false
      schema:
        type: string
    rowFilter.maintenance_plans.updated_at:
      in: query
      name: updated_at
      required: false
      schema:
        type: string
    select:
      description: Filtering Columns
      in: query
      name: select
      required: false
      schema:
        type: string
    order:
      description: Ordering
      in: query
      name: order
      required: false
      schema:
        type: string
    range:
      description: Limiting and Pagination
      in: header
      name: Range
      required: false
      schema:
        type: string
    rangeUnit:
      description: Limiting and Pagination
      in: header
      name: Range-Unit
      required: false
      schema:
        default: items
        type: string
    offset:
      description: Limiting and Pagination
      in: query
      name: offset
      required: false
      schema:
        type: string
    limit:
      description: Limiting and Pagination
      in: query
      name: limit
      required: false
      schema:
        type: string
    preferCount:
      description: Preference
      in: header
      name: Prefer
      required: false
      schema:
        enum:
          - count=none
        type: string
  schemas:
    maintenance_plans:
      description: >-
        The maintenance plan register (UI spec §12.1).


        Each plan's schedule written as one sentence, its scope counted both
        ways, and the next open

        occurrence.
      properties:
        asset_count:
          format: bigint
          type: integer
        asset_type_count:
          format: bigint
          type: integer
        assigned_team_id:
          description: |-
            Note:
            This is a Foreign Key to `teams.id`.<fk table='teams' column='id'/>
          format: uuid
          type: string
        auto_generate_work_order:
          format: boolean
          type: boolean
        created_at:
          format: timestamp with time zone
          type: string
        criticality:
          format: character varying
          maxLength: 40
          type: string
        current_version_number:
          format: integer
          type: integer
        custom_fields:
          format: jsonb
        description:
          format: text
          type: string
        estimated_duration_minutes:
          format: integer
          type: integer
        frequency:
          format: text
          type: string
        id:
          description: |-
            Note:
            This is a Primary Key.<pk/>
          format: uuid
          type: string
        inspection_template_code:
          format: character varying
          maxLength: 60
          type: string
        inspection_template_id:
          description: >-
            Note:

            This is a Foreign Key to `inspection_template_settings.id`.<fk
            table='inspection_template_settings' column='id'/>
          format: uuid
          type: string
        inspection_template_name:
          format: character varying
          maxLength: 250
          type: string
        instructions:
          format: text
          type: string
        is_active:
          format: boolean
          type: boolean
        last_generated_at:
          format: timestamp with time zone
          type: string
        lead_time_days:
          format: integer
          type: integer
        maintenance_type:
          format: character varying
          maxLength: 30
          type: string
        name:
          format: character varying
          maxLength: 250
          type: string
        next_due_at:
          format: timestamp with time zone
          type: string
        plan_number:
          format: character varying
          maxLength: 60
          type: string
        preferred_vendor_id:
          description: >-
            Note:

            This is a Foreign Key to `vendor_directory.vendor_id`.<fk
            table='vendor_directory' column='vendor_id'/>
          format: uuid
          type: string
        preferred_vendor_name:
          format: character varying
          maxLength: 200
          type: string
        preferred_worker_id:
          description: >-
            Note:

            This is a Foreign Key to `technician_workload.worker_id`.<fk
            table='technician_workload' column='worker_id'/>
          format: uuid
          type: string
        preferred_worker_name:
          format: character varying
          maxLength: 200
          type: string
        priority_code:
          format: character varying
          maxLength: 40
          type: string
        requirement_count:
          format: bigint
          type: integer
        requires_permit:
          format: boolean
          type: boolean
        requires_shutdown:
          format: boolean
          type: boolean
        row_version:
          format: bigint
          type: integer
        safety_instructions:
          format: text
          type: string
        site_code:
          format: character varying
          maxLength: 50
          type: string
        site_id:
          description: >-
            Note:

            This is a Foreign Key to `site_settings.id`.<fk
            table='site_settings' column='id'/>
          format: uuid
          type: string
        sla_resolution_minutes:
          format: integer
          type: integer
        sla_response_minutes:
          format: integer
          type: integer
        status:
          format: character varying
          maxLength: 60
          type: string
        status_category:
          format: character varying
          maxLength: 20
          type: string
        status_label:
          format: character varying
          maxLength: 150
          type: string
        task_count:
          format: bigint
          type: integer
        tolerance_days:
          format: integer
          type: integer
        trigger_combination:
          format: character varying
          maxLength: 10
          type: string
        trigger_count:
          format: bigint
          type: integer
        updated_at:
          format: timestamp with time zone
          type: string
        use_contract_visits:
          format: boolean
          type: boolean
        work_orders_generated:
          format: bigint
          type: integer
      type: object

````

## Related topics

- [Maintenance plans](/maintenance/plans.md)
- [Building a maintenance plan](/maintenance/plan-builder.md)
- [The asset register](/assets/register.md)
- [Your first hour](/quickstart.md)
- [Maintenance due](/work/maintenance-due.md)
