Skip to main content
GET
Get Maintenance Agreements

Authorizations

x-api-key
string
header
required

Query Parameters

page
string

Page number. Starts from 1, defaults to 1.

limit
string

Defaults to 20 items per page, maximum 100 items allowed.

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.

filter
string

Array of attribute, operator, and value parts.

asn
string

Array or object containing either a team_id index, assigned_members index containing an array of member ids, or both.

sort
string

Optional sort list. When it is missing, rows are ordered by updated_at descending.

rel
string

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
- customer,
- customerContact,
- entityLocation,
- routines,
- routines.scheduleGenerationMethod,
- routines.onDemandGenerationMethod,
- routines.scheduleGenerationMethod.jobTemplate,
- routines.onDemandGenerationMethod.jobTemplate,
- lastServiceRoutine,
- lastInvoice,
- lastJob,
- custom_status,
- status_workflow,
- billingRoutines

calculate_count
string

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

view
string

Required. Chooses the column set and the response resource. search and list are the only values.

Values
- search,
- list

next_service_date_from
string

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.

next_service_date_to
string

Optional unix timestamp, the end of the service-occurrence window. Read by day. A missing value leaves the end of the window open.

next_billing_date_from
string

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.

next_billing_date_to
string

Optional unix timestamp, the end of the billing-occurrence window. Read by day. A missing value leaves the end of the window open.

withInvoiceTotal
string

when true, appends the parent invoice total.

withServiceRoutineCount
string

when true, appends the service routine count.

is_active_status
string

optional. true keeps draft, active, and any statuses. false keeps canceled and completed. Omitted does not filter.

Response

200 - application/json

Successful response

error
boolean

false when the request succeeds.

Example:

false

total_count
integer

Total number of records that match the request, across all pages.

Example:

10

response
object[]