> ## 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 contract register and detail header (UI spec §21).

> live/expired/renewal-window is decided here, so every screen and notice agrees about what "expiring"
means.



## OpenAPI

````yaml /api-reference/openapi.json get /contracts
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:
  /contracts:
    get:
      tags:
        - Contracts
      summary: The contract register and detail header (UI spec §21).
      description: >-
        live/expired/renewal-window is decided here, so every screen and notice
        agrees about what "expiring"

        means.
      parameters:
        - $ref: '#/components/parameters/rowFilter.contracts.id'
        - $ref: '#/components/parameters/rowFilter.contracts.contract_number'
        - $ref: '#/components/parameters/rowFilter.contracts.name'
        - $ref: '#/components/parameters/rowFilter.contracts.contract_type'
        - $ref: '#/components/parameters/rowFilter.contracts.contract_type_name'
        - $ref: '#/components/parameters/rowFilter.contracts.contract_category'
        - $ref: '#/components/parameters/rowFilter.contracts.status'
        - $ref: '#/components/parameters/rowFilter.contracts.status_label'
        - $ref: '#/components/parameters/rowFilter.contracts.status_category'
        - $ref: '#/components/parameters/rowFilter.contracts.vendor_id'
        - $ref: '#/components/parameters/rowFilter.contracts.vendor_number'
        - $ref: '#/components/parameters/rowFilter.contracts.vendor_name'
        - $ref: '#/components/parameters/rowFilter.contracts.site_id'
        - $ref: '#/components/parameters/rowFilter.contracts.site_code'
        - $ref: '#/components/parameters/rowFilter.contracts.site_name'
        - $ref: '#/components/parameters/rowFilter.contracts.start_date'
        - $ref: '#/components/parameters/rowFilter.contracts.end_date'
        - $ref: '#/components/parameters/rowFilter.contracts.signed_on'
        - $ref: '#/components/parameters/rowFilter.contracts.auto_renew'
        - $ref: '#/components/parameters/rowFilter.contracts.renewal_notice_days'
        - $ref: '#/components/parameters/rowFilter.contracts.contract_value'
        - $ref: >-
            #/components/parameters/rowFilter.contracts.contract_value_currency_id
        - $ref: '#/components/parameters/rowFilter.contracts.covers_parts'
        - $ref: '#/components/parameters/rowFilter.contracts.covers_labour'
        - $ref: '#/components/parameters/rowFilter.contracts.covers_travel'
        - $ref: >-
            #/components/parameters/rowFilter.contracts.requires_authorized_vendor
        - $ref: '#/components/parameters/rowFilter.contracts.scope'
        - $ref: '#/components/parameters/rowFilter.contracts.exclusions_summary'
        - $ref: '#/components/parameters/rowFilter.contracts.owner_name'
        - $ref: '#/components/parameters/rowFilter.contracts.external_reference'
        - $ref: '#/components/parameters/rowFilter.contracts.notes'
        - $ref: '#/components/parameters/rowFilter.contracts.is_live'
        - $ref: '#/components/parameters/rowFilter.contracts.has_expired'
        - $ref: '#/components/parameters/rowFilter.contracts.days_remaining'
        - $ref: '#/components/parameters/rowFilter.contracts.in_renewal_window'
        - $ref: '#/components/parameters/rowFilter.contracts.named_assets'
        - $ref: '#/components/parameters/rowFilter.contracts.covered_asset_types'
        - $ref: '#/components/parameters/rowFilter.contracts.visits_included'
        - $ref: '#/components/parameters/rowFilter.contracts.visits_used'
        - $ref: '#/components/parameters/rowFilter.contracts.claims'
        - $ref: '#/components/parameters/rowFilter.contracts.row_version'
        - $ref: '#/components/parameters/rowFilter.contracts.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/contracts'
                type: array
            application/vnd.pgrst.object+json:
              schema:
                items:
                  $ref: '#/components/schemas/contracts'
                type: array
            application/vnd.pgrst.object+json;nulls=stripped:
              schema:
                items:
                  $ref: '#/components/schemas/contracts'
                type: array
            text/csv:
              schema:
                items:
                  $ref: '#/components/schemas/contracts'
                type: array
          description: OK
        '206':
          description: Partial Content
components:
  parameters:
    rowFilter.contracts.id:
      in: query
      name: id
      required: false
      schema:
        type: string
    rowFilter.contracts.contract_number:
      in: query
      name: contract_number
      required: false
      schema:
        type: string
    rowFilter.contracts.name:
      in: query
      name: name
      required: false
      schema:
        type: string
    rowFilter.contracts.contract_type:
      in: query
      name: contract_type
      required: false
      schema:
        type: string
    rowFilter.contracts.contract_type_name:
      in: query
      name: contract_type_name
      required: false
      schema:
        type: string
    rowFilter.contracts.contract_category:
      in: query
      name: contract_category
      required: false
      schema:
        type: string
    rowFilter.contracts.status:
      in: query
      name: status
      required: false
      schema:
        type: string
    rowFilter.contracts.status_label:
      in: query
      name: status_label
      required: false
      schema:
        type: string
    rowFilter.contracts.status_category:
      in: query
      name: status_category
      required: false
      schema:
        type: string
    rowFilter.contracts.vendor_id:
      in: query
      name: vendor_id
      required: false
      schema:
        type: string
    rowFilter.contracts.vendor_number:
      in: query
      name: vendor_number
      required: false
      schema:
        type: string
    rowFilter.contracts.vendor_name:
      in: query
      name: vendor_name
      required: false
      schema:
        type: string
    rowFilter.contracts.site_id:
      in: query
      name: site_id
      required: false
      schema:
        type: string
    rowFilter.contracts.site_code:
      in: query
      name: site_code
      required: false
      schema:
        type: string
    rowFilter.contracts.site_name:
      in: query
      name: site_name
      required: false
      schema:
        type: string
    rowFilter.contracts.start_date:
      in: query
      name: start_date
      required: false
      schema:
        type: string
    rowFilter.contracts.end_date:
      in: query
      name: end_date
      required: false
      schema:
        type: string
    rowFilter.contracts.signed_on:
      in: query
      name: signed_on
      required: false
      schema:
        type: string
    rowFilter.contracts.auto_renew:
      in: query
      name: auto_renew
      required: false
      schema:
        type: string
    rowFilter.contracts.renewal_notice_days:
      in: query
      name: renewal_notice_days
      required: false
      schema:
        type: string
    rowFilter.contracts.contract_value:
      in: query
      name: contract_value
      required: false
      schema:
        type: string
    rowFilter.contracts.contract_value_currency_id:
      in: query
      name: contract_value_currency_id
      required: false
      schema:
        type: string
    rowFilter.contracts.covers_parts:
      in: query
      name: covers_parts
      required: false
      schema:
        type: string
    rowFilter.contracts.covers_labour:
      in: query
      name: covers_labour
      required: false
      schema:
        type: string
    rowFilter.contracts.covers_travel:
      in: query
      name: covers_travel
      required: false
      schema:
        type: string
    rowFilter.contracts.requires_authorized_vendor:
      in: query
      name: requires_authorized_vendor
      required: false
      schema:
        type: string
    rowFilter.contracts.scope:
      in: query
      name: scope
      required: false
      schema:
        type: string
    rowFilter.contracts.exclusions_summary:
      in: query
      name: exclusions_summary
      required: false
      schema:
        type: string
    rowFilter.contracts.owner_name:
      in: query
      name: owner_name
      required: false
      schema:
        type: string
    rowFilter.contracts.external_reference:
      in: query
      name: external_reference
      required: false
      schema:
        type: string
    rowFilter.contracts.notes:
      in: query
      name: notes
      required: false
      schema:
        type: string
    rowFilter.contracts.is_live:
      in: query
      name: is_live
      required: false
      schema:
        type: string
    rowFilter.contracts.has_expired:
      in: query
      name: has_expired
      required: false
      schema:
        type: string
    rowFilter.contracts.days_remaining:
      in: query
      name: days_remaining
      required: false
      schema:
        type: string
    rowFilter.contracts.in_renewal_window:
      in: query
      name: in_renewal_window
      required: false
      schema:
        type: string
    rowFilter.contracts.named_assets:
      in: query
      name: named_assets
      required: false
      schema:
        type: string
    rowFilter.contracts.covered_asset_types:
      in: query
      name: covered_asset_types
      required: false
      schema:
        type: string
    rowFilter.contracts.visits_included:
      in: query
      name: visits_included
      required: false
      schema:
        type: string
    rowFilter.contracts.visits_used:
      in: query
      name: visits_used
      required: false
      schema:
        type: string
    rowFilter.contracts.claims:
      in: query
      name: claims
      required: false
      schema:
        type: string
    rowFilter.contracts.row_version:
      in: query
      name: row_version
      required: false
      schema:
        type: string
    rowFilter.contracts.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:
    contracts:
      description: >-
        The contract register and detail header (UI spec §21).


        live/expired/renewal-window is decided here, so every screen and notice
        agrees about what "expiring"

        means.
      properties:
        auto_renew:
          format: boolean
          type: boolean
        claims:
          format: bigint
          type: integer
        contract_category:
          format: character varying
          maxLength: 30
          type: string
        contract_number:
          format: character varying
          maxLength: 60
          type: string
        contract_type:
          format: character varying
          maxLength: 40
          type: string
        contract_type_name:
          format: character varying
          maxLength: 150
          type: string
        contract_value:
          format: numeric
          type: number
        contract_value_currency_id:
          format: uuid
          type: string
        covered_asset_types:
          format: bigint
          type: integer
        covers_labour:
          format: boolean
          type: boolean
        covers_parts:
          format: boolean
          type: boolean
        covers_travel:
          format: boolean
          type: boolean
        days_remaining:
          format: integer
          type: integer
        end_date:
          format: date
          type: string
        exclusions_summary:
          format: text
          type: string
        external_reference:
          format: character varying
          maxLength: 120
          type: string
        has_expired:
          format: boolean
          type: boolean
        id:
          description: |-
            Note:
            This is a Primary Key.<pk/>
          format: uuid
          type: string
        in_renewal_window:
          format: boolean
          type: boolean
        is_live:
          format: boolean
          type: boolean
        name:
          format: character varying
          maxLength: 200
          type: string
        named_assets:
          format: bigint
          type: integer
        notes:
          format: text
          type: string
        owner_name:
          format: character varying
          maxLength: 200
          type: string
        renewal_notice_days:
          format: integer
          type: integer
        requires_authorized_vendor:
          format: boolean
          type: boolean
        row_version:
          format: bigint
          type: integer
        scope:
          format: text
          type: string
        signed_on:
          format: date
          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
        site_name:
          format: character varying
          maxLength: 200
          type: string
        start_date:
          format: date
          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
        updated_at:
          format: timestamp with time zone
          type: string
        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
        vendor_name:
          format: character varying
          maxLength: 200
          type: string
        vendor_number:
          format: character varying
          maxLength: 60
          type: string
        visits_included:
          format: bigint
          type: integer
        visits_used:
          format: bigint
          type: integer
      type: object

````

## Related topics

- [Inside a vendor](/commercial/vendor-detail.md)
- [The asset register](/assets/register.md)
- [The asset lifecycle](/assets/lifecycle.md)
- [Creating an organisation](/setup/sign-up.md)
- [Root cause and corrective actions](/assets/root-cause.md)
