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

# Maintenance occurrences that are due, with the plan and asset behind each.

> Carries what triggered it — a date, a meter reading — and the work order raised from it, if one has
been.



## OpenAPI

````yaml /api-reference/openapi.json get /maintenance_due
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_due:
    get:
      tags:
        - Maintenance
      summary: >-
        Maintenance occurrences that are due, with the plan and asset behind
        each.
      description: >-
        Carries what triggered it — a date, a meter reading — and the work order
        raised from it, if one has

        been.
      parameters:
        - $ref: '#/components/parameters/rowFilter.maintenance_due.occurrence_id'
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_due.maintenance_plan_id
        - $ref: '#/components/parameters/rowFilter.maintenance_due.plan_number'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.plan_name'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.asset_id'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.asset_number'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.asset_name'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.site_id'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.status'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.status_label'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.status_category'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.scheduled_for'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.due_at'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.is_overdue'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.days_until_due'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.readiness_score'
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_due.estimated_duration_minutes
        - $ref: '#/components/parameters/rowFilter.maintenance_due.triggered_by'
        - $ref: >-
            #/components/parameters/rowFilter.maintenance_due.trigger_meter_value
        - $ref: '#/components/parameters/rowFilter.maintenance_due.tolerance_days'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.deferred_to'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.notes'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.work_order_id'
        - $ref: '#/components/parameters/rowFilter.maintenance_due.work_order_number'
        - $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_due'
                type: array
            application/vnd.pgrst.object+json:
              schema:
                items:
                  $ref: '#/components/schemas/maintenance_due'
                type: array
            application/vnd.pgrst.object+json;nulls=stripped:
              schema:
                items:
                  $ref: '#/components/schemas/maintenance_due'
                type: array
            text/csv:
              schema:
                items:
                  $ref: '#/components/schemas/maintenance_due'
                type: array
          description: OK
        '206':
          description: Partial Content
components:
  parameters:
    rowFilter.maintenance_due.occurrence_id:
      in: query
      name: occurrence_id
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.maintenance_plan_id:
      in: query
      name: maintenance_plan_id
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.plan_number:
      in: query
      name: plan_number
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.plan_name:
      in: query
      name: plan_name
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.asset_id:
      in: query
      name: asset_id
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.asset_number:
      in: query
      name: asset_number
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.asset_name:
      in: query
      name: asset_name
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.site_id:
      in: query
      name: site_id
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.status:
      in: query
      name: status
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.status_label:
      in: query
      name: status_label
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.status_category:
      in: query
      name: status_category
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.scheduled_for:
      in: query
      name: scheduled_for
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.due_at:
      in: query
      name: due_at
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.is_overdue:
      in: query
      name: is_overdue
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.days_until_due:
      in: query
      name: days_until_due
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.readiness_score:
      in: query
      name: readiness_score
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.estimated_duration_minutes:
      in: query
      name: estimated_duration_minutes
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.triggered_by:
      in: query
      name: triggered_by
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.trigger_meter_value:
      in: query
      name: trigger_meter_value
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.tolerance_days:
      in: query
      name: tolerance_days
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.deferred_to:
      in: query
      name: deferred_to
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.notes:
      in: query
      name: notes
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.work_order_id:
      in: query
      name: work_order_id
      required: false
      schema:
        type: string
    rowFilter.maintenance_due.work_order_number:
      in: query
      name: work_order_number
      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_due:
      description: >-
        Maintenance occurrences that are due, with the plan and asset behind
        each.


        Carries what triggered it — a date, a meter reading — and the work order
        raised from it, if one has

        been.
      properties:
        asset_id:
          description: >-
            Note:

            This is a Foreign Key to `asset_contracts.asset_id`.<fk
            table='asset_contracts' column='asset_id'/>
          format: uuid
          type: string
        asset_name:
          format: character varying
          maxLength: 250
          type: string
        asset_number:
          format: character varying
          maxLength: 80
          type: string
        days_until_due:
          format: integer
          type: integer
        deferred_to:
          format: timestamp with time zone
          type: string
        due_at:
          format: timestamp with time zone
          type: string
        estimated_duration_minutes:
          format: integer
          type: integer
        is_overdue:
          format: boolean
          type: boolean
        maintenance_plan_id:
          description: |-
            Note:
            This is a Primary Key.<pk/>
          format: uuid
          type: string
        notes:
          format: text
          type: string
        occurrence_id:
          description: |-
            Note:
            This is a Primary Key.<pk/>
          format: uuid
          type: string
        plan_name:
          format: character varying
          maxLength: 250
          type: string
        plan_number:
          format: character varying
          maxLength: 60
          type: string
        readiness_score:
          format: numeric
          type: number
        scheduled_for:
          format: timestamp with time zone
          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
        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
        tolerance_days:
          format: integer
          type: integer
        trigger_meter_value:
          format: numeric
          type: number
        triggered_by:
          format: character varying
          maxLength: 20
          type: string
        work_order_id:
          description: |-
            Note:
            This is a Primary Key.<pk/>
          format: uuid
          type: string
        work_order_number:
          format: character varying
          maxLength: 60
          type: string
      type: object

````

## Related topics

- [Maintenance due](/work/maintenance-due.md)
- [Building a maintenance plan](/maintenance/plan-builder.md)
- [Maintenance plans](/maintenance/plans.md)
- [The asset lifecycle](/assets/lifecycle.md)
- [Inspections](/maintenance/inspections.md)
