Skip to main content
Contract / Events

Patch a contract event

Partially update an existing contract event. Only the supplied fields are changed; contract_id and posting_class_id are immutable. For CC / DIV / DRIVER events the event_value and table_name are derived from record_id. Editing an event of a class linked to the contract (RC, CC, DRIVER, DIV, LOC, LOCBK) propagates the most-recent value back to the contract.

PATCH
/fm/contract/events/{contract_event_id}

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

Authorizationstringheaderrequired

For accessing the API a valid token must be passed in all the queries in the 'Authorization' header.

A valid token is generated by the API and returned by the /authenticate method by supplying a valid username and password.

The following syntax must be used in the 'Authorization' header :

Bearer aaaaaa/bbbbbb.ccccccc.dddddd
contract_event_idstringrequired

Contract Event Id

Maximum string length: 10
Pattern: ^[1-9]{1}[0-9]*$
Delegated-Locking-Session-Idstringheader

(Optional) Locking responsibility will be delegated to the specified Session Id.

This header enables the client to instruct the API to merely verify the presence of locks with the specified session id, but not attempt to obtain them itself. It requires the DelegatedLocking permission to be associated with your role.

Audit-User-Idstringheader

(Optional) User Id to use for audit purposes. This header requires the Audit:UserIdOverride permission to be associated with your role.

Maximum string length: 5
Pattern: ^[1-9]{1}[0-9]*$

Body

application/json

JSON payload

completed_flagenum<string>
Available options: yes, no
contract_event_action_idstring
contract_event_description_idstring
contract_event_value_idstring
contract_idstring

(Optional) Immutable. If supplied it must match the stored event's contract_id, otherwise the request is rejected (422).

descriptionstring
due_datestring
event_amountnumber
event_datestring
event_valuestring

Ignored for CC / DIV / DRIVER events (the value is derived from record_id); honoured for all other event types.

posting_class_idstring

(Optional) Immutable. If supplied it must match the stored event's posting_class_id, otherwise the request is rejected (422).

record_idstring

For CC / DIV / DRIVER events, the client_cost_centre_id / client_division_id / driver_id the event points at. The event_value and table_name are derived from it.

table_nameenum<string>
Available options: fm_drivers, fm_client_cost_centres, fm_client_divisions
user_idstring

(Optional) The user the event is assigned to. Must be digits only, maximum value 65535, and identify an existing user account. Where it differs from the event's current assignment it must also identify an account the Contracts / Events tab would offer to the calling user. Omit the field, send it empty, send it null, or send the event's current assignment, to leave the assignment unchanged.

Pattern: ^[0-9]*$

Response

application/vnd.catch-e-api.v1+json

Contract event patched successfully

attachment_idstring
Example: 100000
completed_flagenum<string>
Available options: yes, no
contract_event_action_idstring
Example: 100000
contract_event_description_idstring
Example: 100000
contract_event_idstring
Example: 100000
contract_event_value_idstring
Example: 100000
contract_idstring
Example: 100000
descriptionstring
due_datestring
Example: 2022-03-07
event_amountstring
event_datestring
Example: 2022-03-07
event_valuestring
last_editinteger
message_typeenum<string>
Available options: email, pdf, sms, csv
posting_class_idstring
Example: 100000
record_idstring
Example: 100000
status_flagenum<string>
Available options: active, deleted
table_namestring
Example: fm_drivers
user_idstring
Example: 100000