deleteContractEvents

deleteContractEvents

Overview

Soft-deletes a Contract Event, replicating the legacy Contract_Event::deleteEvent() behaviour. The underlying row is never physically removed — status_flag is set to deleted and the record is excluded from GET /fm/contract/events (which already filters to status_flag = 'active').

This method requires the ContractEvents:Delete permission to be associated with your role.

Permissions

The permission for this api is stored in [gb_api_permissions]permission as ContractEvents: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/events/{contract_event_id} 
https://api.{{environment}}.catch-e.com/fm/contract/events/{contract_event_id} https://api.test.catch-e.com/fm/contract/events/{contract_event_id} 

Path Parameters

Key

Format

Notes

Mandatory

contract_event_id

string

Must match an existing fm_contract_events row.

Yes

Response Details

Success

204 No Content

No response body is returned.

Cascading effects on success:

  • Any attachment linked to the event (gb_attachments) is soft-deleted in the same transaction. A missing attachment is skipped without error.

  • For mail-class events (FBTA, FBTD, RN, COC*), any gb_mail rows in pending or failed states are soft-deleted, one audited update per composite key. Sent mail is never modified.

  • Every changed field is written to gb_audit, honouring the Audit-User-Id override header.

  • The whole operation is atomic — any failure rolls back changes to the event, attachments, mail, and audit records together.

Error Response Details

Validation Message

Comments

423 Locked

The event row is locked by another user or process. No changes are made, and the lock is always released afterwards.

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

Validation Message

Comments

403 Forbidden

You do not have the ContractEvents:Delete permission.

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

Validation Message

Comments

Unknown or already-deleted event

The acceptance criteria specify that this "returns the appropriate error response with a specific message" but doesn't pin an exact status code or message text — flagging this as unconfirmed rather than guessing; worth checking the implementation or QA notes before publishing this row.

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

406 Not Acceptable

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

Validation Message

Comments

415 Unsupported Media Type

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

Validation Message

Comments

500 Internal Error

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

Validation Message

Comments

default Unexpected Error

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