getContractMaintenance
getContractMaintenance
Overview
Retrieve a Contract's maintenance history — fm_maintenance records — as a standalone, read-only collection. Previously these rows were only reachable via approval-scoped lookups or indirectly through the maintenance import staging table; this method reads fm_maintenance directly.
This method requires the ContractMaintenance:Get permission to be associated with your role.
Permissions
The permission for this api is stored in [gb_api_permissions]permission as ContractMaintenance:Get.
Only roles with a stored link to this permission in [gb_role_api_permissions] can run this api.
HTTP Method
Use the HTTP Method GET for consuming this web service.
URL Examples
https://api.demo.catch-e.com/fm/contract/maintenance
https://api.{{environment}}.catch-e.com/fm/contract/maintenance?contract_id={contract_id}
https://api.test.catch-e.com/fm/contract/maintenance?contract_id={contract_id}&client_id={client_id} Query Parameters
All filters are combinable — results must match every supplied filter (AND semantics).
Response Details
Success
200 OK
{ "_links": { "self": { "href": "https://api.catch-e.loc/fm/contract/maintenance?contract_id=100000" } }, "_embedded": { "fm_maintenance": [] }, "page": 1, "page_size": 25, "total_items": 0, "page_count": 0 } The specific field list for each fm_maintenance record wasn't defined in this ticket's acceptance criteria — leaving the embedded object generic here rather than inventing field names. Worth confirming the exact response schema against the implementation before publishing.
Records with status_flag = 'deleted' are never returned, regardless of any filter supplied.
Error Response Details
{ "validation_messages": { "contract_id": { "notExists": "Contract Id does not exist" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Acceptable", "status": 406, "detail": "Not Acceptable" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unsupported Media Type", "status": 415, "detail": "Not Acceptable" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "string", "status": 599, "detail": "string" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "string", "status": 599, "detail": "string" }