deleteContractBudgets
deleteContractBudgets
Overview
Deletes a pending Adjustment or Credit line from fm_contract_budgets, mirroring the legacy Lease screen's Delete button exactly — including its type/status restriction, now enforced server-side rather than only by a disabled button. This is a hard delete with no undo, matching legacy behaviour.
This method requires the ContractBudgets:Delete permission to be associated with your role.
Permissions
The permission for this api is stored in [gb_api_permissions]permission as ContractBudgets:Delete.
Only roles with a stored link to this permission in [gb_role_api_permissions] can run this api.
HTTP Method
Use the HTTP Method DELETE for consuming this web service.
URL Examples
https://api.demo.catch-e.com/fm/contract/budgets
https://api.{{environment}}.catch-e.com/fm/contract/budgets https://api.test.catch-e.com/fm/contract/budgets Input Fields (JSON)
{ "contract_id": 12345, "billing_period": 1, "billing_period_item_no": 2 } *One valid combination of billing_period/billing_period_item_no must resolve to a specific row.
Response Details
Success
204 No Content
Deletes the targeted row and writes a single audit record, keyed by contract_id, matching legacy gb_audit @delete parity.
Error Response Details
{ "validation_messages": { "contract_id": { "isEmpty": "Value is required and can't be empty" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" }{ "validation_messages": { "billing_period_item_no": { "billingPeriodItemNoInvalid": "Specified billing period / billing period item number does not exist" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" }{ "validation_messages": { "billing_type_flag": { "periodicNotDeletable": "Periodic budget lines cannot be deleted. Use updateContractBudgets to set the amount to 0 instead." } }, "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": "Unprocessable Entity", "status": 422, "detail": "The budget line is no longer pending and cannot be deleted. Please refresh the data and try again." }{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Locked", "status": 423, "detail": "Locked" }{ "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": "Forbidden", "status": 403, "detail": "Forbidden" }json
{ "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" }