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

# Get Maintenance Agreements



## OpenAPI

````yaml get /maintenance-agreements
openapi: 3.0.0
info:
  title: FieldPulse API
  description: >-
    REST API for the FieldPulse field service management platform.


    **Authentication:** All requests require an `x-api-key` header. Contact
    support@fieldpulse.com to obtain your API key.


    **Important:** The API Playground below makes live requests against your
    production data. Use caution when testing write operations (POST, PUT,
    DELETE).
  version: 1.0.0
servers:
  - url: https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Assets
    description: Endpoints related to assets
  - name: Assets Category
    description: Endpoints related to assets category
  - name: Comments
    description: Endpoints related to comments
  - name: Company Profile
    description: Endpoints related to contracts
  - name: Contracts
    description: Endpoints related to contracts
  - name: Customers
    description: Endpoints related to customers
  - name: Custom Fields
    description: Endpoints related to custom fields
  - name: Estimates
    description: Endpoints related to estimates
  - name: Invoices
  - name: Items
  - name: Jobs
  - name: Lead Source
  - name: Locations
  - name: Maintenance Agreements
  - name: Material Lists
  - name: Payments
  - name: Pipeline Status
  - name: Projects
  - name: Purchase Orders
  - name: Subtasks
  - name: Tags
  - name: Teams
  - name: Timesheets
  - name: Users
  - name: Vendors
  - name: Version
paths:
  /maintenance-agreements:
    get:
      tags:
        - Maintenance Agreements
      summary: Get Maintenance Agreements
      operationId: getMaintenanceAgreements
      parameters:
        - name: page
          in: query
          schema:
            type: string
          description: Page number. Starts from 1, defaults to 1.
          example: <string>
        - name: limit
          in: query
          schema:
            type: string
          description: Defaults to 20 items per page, maximum 100 items allowed.
          example: <string>
        - name: search
          in: query
          schema:
            type: string
          description: >-
            Optional text search. Empty or whitespace is ignored. A non-empty
            value is matched, case-insensitively, against the agreement title
            and job location, the location address, and the customer first name,
            last name, company name, email, and phone. A positive numeric value
            also matches the agreement cuid exactly.
          example: <string>
        - name: filter
          in: query
          schema:
            type: string
          description: Array of attribute, operator, and value parts.
          example: <array>
        - name: asn
          in: query
          schema:
            type: string
          description: >-
            Array or object containing either a team_id index, assigned_members
            index containing an array of member ids, or both.
          example: <array>
        - name: sort
          in: query
          schema:
            type: string
          description: >-
            Optional sort list. When it is missing, rows are ordered by
            updated_at descending.
          example: <array>
        - name: rel
          in: query
          schema:
            type: string
          description: >-
            Optional relation map, sent as rel[name]. Only the keys are read. A
            key in the allowed list is eager loaded with the view's column set.
            Any other key is ignored. The value is not used.


            **Keys**

            <br> - customer,

            <br> - customerContact,

            <br> - entityLocation,

            <br> - routines,

            <br> - routines.scheduleGenerationMethod,

            <br> - routines.onDemandGenerationMethod,

            <br> - routines.scheduleGenerationMethod.jobTemplate,

            <br> - routines.onDemandGenerationMethod.jobTemplate,

            <br> - lastServiceRoutine,

            <br> - lastInvoice,

            <br> - lastJob,

            <br> - custom_status,

            <br> - status_workflow,

            <br> - billingRoutines
          example: <array>
        - name: calculate_count
          in: query
          schema:
            type: string
          description: >-
            Optional. Read with boolean(), which accepts true, false, 1, 0, and
            the strings true, false, on, off, yes, no, 1, and 0. When true,
            total_results is the count of the same filtered query without
            pagination. When omitted or false, total_results is null
          example: <boolean>
        - name: view
          in: query
          schema:
            type: string
          description: >-
            Required. Chooses the column set and the response resource. search
            and list are the only values.


            **Values**

            <br>- search,<br>- list
          example: <string>
        - name: next_service_date_from
          in: query
          schema:
            type: string
          description: >-
            Optional unix timestamp. Together with next_service_date_to, keeps
            agreements whose service occurrence overlaps that window. The
            timestamp is read by day. Both ends are optional; a missing pair
            leaves the list unfiltered by service date.
          example: <integer>
        - name: next_service_date_to
          in: query
          schema:
            type: string
          description: >-
            Optional unix timestamp, the end of the service-occurrence window.
            Read by day. A missing value leaves the end of the window open.
          example: <integer>
        - name: next_billing_date_from
          in: query
          schema:
            type: string
          description: >-
            Optional unix timestamp. Together with next_billing_date_to, keeps
            agreements whose billing occurrence overlaps that window. The
            timestamp is read by day. Both ends are optional.
          example: <integer>
        - name: next_billing_date_to
          in: query
          schema:
            type: string
          description: >-
            Optional unix timestamp, the end of the billing-occurrence window.
            Read by day. A missing value leaves the end of the window open.
          example: <integer>
        - name: withInvoiceTotal
          in: query
          schema:
            type: string
          description: when true, appends the parent invoice total.
          example: <boolean>
        - name: withServiceRoutineCount
          in: query
          schema:
            type: string
          description: when true, appends the service routine count.
          example: <boolean>
        - name: is_active_status
          in: query
          schema:
            type: string
          description: >-
            optional. true keeps draft, active, and any statuses. false keeps
            canceled and completed. Omitted does not filter.
          example: <boolean>
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    description: false when the request succeeds.
                    example: false
                  total_count:
                    type: integer
                    description: >-
                      Total number of records that match the request, across all
                      pages.
                    example: 10
                  response:
                    type: array
                    items:
                      type: object
              example:
                message: Unauthorized
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

## Related topics

- [Setting Up Maintenance Agreement Automation](https://help.fieldpulse.com/jobs/assets/maintenance-agreement-automation.md)
- [How to Create a Maintenance Agreement](https://help.fieldpulse.com/jobs/assets/maintenance-agreements.md)
- [How to Migrate from ServiceTitan to FieldPulse](https://help.fieldpulse.com/getting-started/migrating/servicetitan.md)
- [Maintenance Agreements Overview](https://help.fieldpulse.com/jobs/assets/maintenance-agreements-overview.md)
- [Webhooks](https://help.fieldpulse.com/api-reference/webhooks.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.