Skip to main content
Contract / Events

Change driver by creating a driver change event

This method changes the driver by creating a driver change event and optionally saves an odometer record.

POST
/fm/contract/events/{contract_id}/change-driver

This method requires the ContractEvents:ChangeDriver 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_idstringrequired

Contract Id

Maximum string length: 10
Pattern: ^[1-9]{1}[0-9]*$
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>default:no

[gl_posting_classes]completed_flag_default where posting_class_code = 'DRIVER'

Available options: yes, no
contract_event_action_idstringdefault:null

Foreign key to fm_contract_event_actions table

Example: 100000
descriptionstring

Description

driver_idstringrequired

Only drivers linked to client or client group may be entered

Example: 100000
due_datestring

Due date

Example: YYYY-MM-DD
event_datestringdefault:current system date

Date of driver change

Example: YYYY-MM-DD
odometerinteger

Vehicle odometer

Example: 10
override_warnings_flagenum<string>default:no

Override odometer validation warning?

Available options: yes, no

Response

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

Success

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