getContractBudgets

getContractBudgets

Overview

This method returns the budget details for a contract.

A single contract may have thousands of budget records, depending on its pay cycle, posting classes and term. For example, a weekly pay cycle with 10 posting classes (FIN, MAINT, REG and so on) over 60 months has 2,600 budget records. Use the billing_period, posting_class_code and page filters to return a manageable set of results.

This method requires the ContractBudgets:Get permission to be associated with your role.

Permissions

The permission for this api is stored in [gb_api_permissions]permission as 'ContractBudgets: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/budgets?contract_id=5678&billing_period=1 https://api.{{environment}}.catch-e.com/fm/contract/budgets?contract_id=5678&billing_period=1 https://api.test.catch-e.com/fm/contract/budgets?contract_id=5678&billing_period=1 

Query Parameters

Key

Format

Notes

Mandatory

contract_id

string

Contract Id. A positive whole number, up to 10 digits, with no leading zeros.

Yes

billing_period

integer

Restrict to a billing period, from 1 to 999.

No

posting_class_code

string

Restrict to a posting class code. Up to 8 characters; capital letters, numbers, &, - and _ only.

No

page

integer

Page number. Default 1.

No

page_size

integer

Number of records per page. Default 25. Use -1 to return all records.

No

Response Details

Success

200 - OK

Each record in _embedded.contract_budgets contains:

Field

Format

Notes

id

string

The Contract Budget Id. A 40-character hexadecimal id.

contract_id

string

Contract Id.

posting_class_id

string

Posting Class Id.

billing_period

number

Billing period.

billing_period_item_no

number

Item number within the billing period.

billing_type_flag

string

billing_interval

string

Pay cycle code.

billing_date

string (date)

Billing date.

payment_method

string

Values: direct-debit, cheque, cash, credit-card, eft, other.

amount_net

number

Net amount.

amount_gst

number

GST amount.

status_flag

string

posting_class_code

string

Posting class code, e.g. FIN, MAINT, REG.

{ "_links": { "self": { "href": "https://api.catch-e.loc/fm/contract/budgets?contract_id=5678&page=1" } }, "_embedded": { "contract_budgets": [ { "id": "[40-CHARACTER-HEX-ID]", "contract_id": "5678", "posting_class_id": "3", "billing_period": 1, "billing_period_item_no": 1, "billing_type_flag": "string", "billing_interval": "fortnightly", "billing_date": "2026-02-12", "payment_method": "direct-debit", "amount_net": 250.0, "amount_gst": 25.0, "status_flag": "string", "posting_class_code": "FIN" } ] }, "page_count": 1, "page_size": 25, "total_items": 1, "page": 1 } 

Error Response Details

Validation Message

Comments

401 - Unauthorized

1. You have not authenticated before running this API or 2. The token_timeout of the current session has passed. You need to authenticate again.

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized" } 

Validation Message

Comments

403 - Forbidden

- You do not have permissions for this request. - Go to System Roles and enter 'web_services' - Navigate to the Roles / APIs tab to make sure the permission you need to run this API is checked.

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" } 

Validation Message

Comments

404 - Not Found

No budgets were found for the contract.

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Found", "status": 404, "detail": "Not Found" } 

Validation Message

Comments

406 - Not Acceptable

The Accept header of the request does not match a response format this API supports.

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Acceptable", "status": 406, "detail": "Not Acceptable" } 

Validation Message

Comments

409 - Conflict

The request conflicts with the current state of the data.

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Conflict", "status": 409, "detail": "Conflict" } 

Validation Message

Comments

422 - Unprocessable Entity

One or more input fields failed validation. The field name and message are returned in validation_messages.

{ "warning_messages": {}, "validation_messages": { "fieldName": { "validationExceptionCode": "A textual description of the validation exception" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" } 

Validation Message

Comments

500 - Internal Error

An unexpected error occurred on the server.

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "string", "status": 599, "detail": "string" } 

Validation Message

Comments

default - Unexpected Error

Any other unexpected error.

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "string", "status": 599, "detail": "string" }