getContractBilling & getContractBillings
getContractBilling & getContractBillings
Overview
Retrieve a Contract's posted Billing/Invoice line items (fm_billing) — the same invoice and batch reference data shown on the Billing/Re-Print screen. This covers what has actually been billed against a contract, rather than what's scheduled (that's covered separately by getContractBudgets).
Two methods are available:
getContractBilling — retrieve a single billing record by
billing_idgetContractBillings — retrieve a filterable, paginated collection of billing records, optionally scoped to one contract
Both methods require the ContractBilling:Get permission to be associated with your role.
Permissions
The permission for these APIs is stored in [gb_api_permissions]permission as ContractBilling:Get.
Only roles with a stored link to this permission in [gb_role_api_permissions] can run these APIs.
getContractBilling
Retrieve a single Contract billing record.
HTTP Method
Use the HTTP Method GET for consuming this web service.
URL Examples
https://api.demo.catch-e.com/fm/contract/billings/{billing_id}
https://api.{{environment}}.catch-e.com/fm/contract/billings/{billing_id} https://api.test.catch-e.com/fm/contract/billings/{billing_id} Path Parameters
Response Details
Success
200 OK
{ "_links": { "self": { "href": "https://api.catch-e.loc/fm/contract/billings/2401" } }, "billing_id": "2401", "invoice_type": "periodic lease", "invoice_no": "string", "invoice_item_no": 0, "contract_id": "string", "posting_class_id": "string", "vmrs_code_id": "string", "batch_no": "string", "item_no": 0, "gst_code_id": "string", "invoice_date": "2026-07-25", "invoice_from_date": "2026-07-25", "invoice_to_date": "2026-08-24", "amount_net": 0, "amount_gst": 0, "received_gross": 0, "posted_date": "2026-07-25", "credit_note_flag": "no", "status_flag": "posted", "client_id": "string", "cost_centre": "string", "reg_no": "string", "driver": "string", "description": "string", "contact_name": "string", "allocation_flag": "no" } Only fields defined by the ContractBilling schema are returned, with data types cast per Fm\Billing::$_explicitFieldDataTypes — monetary fields as numbers, identifiers and dates as strings. History-only, pending, and posted records are all returned; only deleted records are excluded.
Error Response Details
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Found", "status": 404, "detail": "Not Found" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" } { "validation_messages": { "billing_id": { "notExists": "Billing Id does not exist" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" } { "validation_messages": { "billing_id": { "deleted": "No matching billing record found" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" } getContractBillings
Retrieve billing records across one or all contracts, with optional filters and pagination.
HTTP Method
Use the HTTP Method GET for consuming this web service.
URL Examples
https://api.demo.catch-e.com/fm/contract/billings
https://api.{{environment}}.catch-e.com/fm/contract/billings?contract_id={contract_id}
https://api.test.catch-e.com/fm/contract/billings?contract_id={contract_id}&client_id={client_id}&invoice_type={invoice_type} Query Parameters
All filters can be combined with each other and with contract_id; results must match every supplied filter.
Response Details
Success
200 OK
{ "_links": { "self": { "href": "https://api.catch-e.loc/fm/contract/billings?contract_id=100000" } }, "_embedded": { "fm_billings": [ { "billing_id": "string", "invoice_type": "string", "invoice_no": "string", "invoice_item_no": 0, "contract_id": "string", "posting_class_id": "string", "vmrs_code_id": "string", "batch_no": "string", "item_no": 0, "gst_code_id": "string", "invoice_date": "2026-07-25", "invoice_from_date": "2026-07-25", "invoice_to_date": "2026-08-24", "amount_net": 0, "amount_gst": 0, "received_gross": 0, "posted_date": "2026-07-25", "credit_note_flag": "no", "status_flag": "string", "client_id": "string", "cost_centre": "string", "reg_no": "string", "driver": "string", "description": "string", "contact_name": "string", "allocation_flag": "no" } ] }, "page_count": 1, "page_size": 25, "total_items": 1, "page": 1 } Deleted records are always excluded; posted, pending, and history-only records are all returned — there is no status filter. A valid query with no matching records returns 200 OK with an empty _embedded.fm_billings array, total_items: 0, and page_count: 0 — this is not treated as an error.
Error Response Details
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" } { "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" } { "validation_messages": { "invoice_type": { "invalid": "Invalid invoice type" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" } Standard Error Responses
These apply to both getContractBilling and getContractBillings.
{ "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" }