Create & Modify Driver Endpoints: ChangeContractDriver
API endpoints for creating, updating, and deleting drivers
ChangeContractDriver
This method changes the driver by creating a driver change event and optionally saves an odometer record.
Supplementary SWAGGER documentation is available here:
Permissions
To run this API, the nominated 'web-services' role needs to be given permission.
If you are not actively using the API, leave the permission off for better security.
Go to Roles / Apis and check on **ContractEvents:ChangeDriver **
HTTP Method
Use the HTTP Method 'POST' for consuming this web service.
URL Examples
https://api.demo.catch-e.com/authenticatehttps://api..catch-e.com/authenticatehttps://api.test.catch-e.com/fm/contract/events/102746/change-driverParameters - Path Variables
Headers
Input Fields (Body)
Input Fields (JSON)
{ "driver_id": "100002", "event_date": "2021-03-03", "description": "API TEST", "odometer":565, "contract_event_action_id": "100000", "due_date": "2022-08-02", "completed_flag": "no", "override_warnings_flag": "yes"}Successful Response Example
{ "contract_event_id": "108115", "contract_id": "102761", "posting_class_id": "100033", "attachment_id": null, "event_date": "2021-03-03", "table_name": "fm_drivers", "record_id": "100220", "event_value": "Blandin, Jimbo", "description": "API TEST", "contract_event_value_id": null, "contract_event_description_id": "0", "contract_event_action_id": "100000", "due_date": null, "completed_flag": "yes", "event_amount": 0, "message_type": null, "user_id": "11140", "last_edit": "2022-04-06 11:17:21", "status_flag": "active"}Error Response Details
{" driver_id": "driverNotLinkedToClient": "The input driver is not asosiated with the contract client" }}| The driver_id passed is not associated with the client in the contract | |
"validation_messages": { "odometer": { "odometerRequiresNonZeroDate": "event_date cannot be 0000-00-00" } }| If you pass an odometer reading, a date is also required. |
| 403 - Forbidden | |
| "detail": "Forbidden" | You do not have permissions for this request. |
CreateDriverAssets
Overview
Allows you to add new Drivers' Asset/s.
HTTP Method
Use the HTTP Method 'POST' for consuming this web service.
Input Fields (Header)
Header should contain the 'Content-Type' Key with the Value = 'application/json' or 'application/hjson'.
Header should contain the 'Accept' Key with the Value = 'application/vnd.catch-e-api.v1+json, application/problem+json'
Input Fields (Body)
JSON Example
https://api.catch-e.com/fm/driver/assets/[ { "driver_id": "101175", "finance_asset_type_id": "16238640163402548256", "amount": "77777.00", "description": "Matt Test Asset 1" }, { "driver_id": "101175", "finance_asset_type_id": "16238640163402548256", "amount": "88888.00", "description": "Matt Test Asset 2" }](Successful) Output Example (sample)
{ "driver_asset_id": 3196434310060077777, "driver_id": 101211, "finance_asset_type_id": 3196195708503877777, "amount": 77777, "ownership": "debt_free", "description": "Test Asset 1", "finance_asset_type_name": "Resident Property", "_links": { "self": { "href": "https://api.catch-e.com/fm/driver/assets/3196434310060077777" } }}Error Codes
Example error output
{ "validation_messages": { "amount": { "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"}CreateDriverBankAccounts
Allows you to CreateDriverBankAccounts
Permissions
To run this API, the nominated 'web-services' role needs to be given permission.
If you are not actively using the API, leave the permission off for better security.
Go to Roles / Apis and check on DriverBankAccounts:Create
Note: This API is not configured for external use.
Contact your Account Manager to discuss access to this API.
HTTP Method
Use the HTTP Method 'POST' for consuming this web service.
URL Examples
https://api.catch-e.com/bank/accountsParameters - Path
Sample Response (200 - Successful)
{ "driver_bank_account_id": "string", "driver_id": "string", "account_name": "string", "bsb": "string", "account_number": "string", "claims_access_flag": "no", "claims_default_flag": "no", "status_flag": "active"}CreateDriverEvents
This API permits you to create one or multiple Driver Events.
Permissions
To run this API, the nominated 'web-services' role needs to be given permission.
If you are not actively using the API, leave the permission off for better security.
Go to Roles / Apis and check on DriverEvents:Create.
Authentication
Authenticate with the API before running this API.
HTTP Method
Use the HTTP Method 'POST' for consuming this web service.
URL Examples
https://api.test.catch-e.com/fm/driver-events/Parameters - Path Variables
Headers
Body (JSON)
JSON Sample
Single Driver Event
[ { "driver_id" : "101018", "driver_event_code_id": "100001", "event_date": "2024-06-01", "event_value": "1", "description": "Event code: Reminder (API)", "driver_event_action_id": "100000", "due_date": "2024-07-01", "status_flag": "active", "completed_flag": "yes" }]Multiple Driver Events
[ { "driver_id" : "100006", "driver_event_code_id": "100004", "event_date": "2024-06-01", "event_value": "1", "description": "Event code: Quote Accepted (API)", "driver_event_action_id": "100000", "due_date": "2024-07-01", "status_flag": "active", "completed_flag": "yes" }, { "driver_id" : "100007", "driver_event_code_id": "100005", "event_date": "2024-06-01", "event_value": "2", "description": "Event code: Documents Sent (API)", "driver_event_action_id": "100001", "due_date": "2024-07-01", "status_flag": "active", "completed_flag": "yes" }]Response Details
{ { "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-events/" } }, "_embedded": { "fm_driver_events": [ { "driver_event_id": "101935", "driver_id": "100006", "driver_event_code_id": "100004", "event_date": "2024-06-01", "event_value": "1", "description": "Event code: Quote Accepted (API)", "driver_event_value_id": null, "driver_event_description_id": null, "driver_event_action_id": "100000", "due_date": "2024-07-01", "completed_flag": "yes", "attachment_id": null, "user_id_edit": "11244", "last_edit": "2024-06-04 01:33:25", "status_flag": "active", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-events/101935" } } } ] }, "total_items": 1}| The request was successful request. |
| 401 - Unauthorized | | |
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized"}| You have not authenticated before running this API or The token_timeout of the current session has passed. You need to authenticate again. |
| 403 - Forbidden | | |
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "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. |
| 422 - Unprocessable Content | | |
{ "validation_messages": [ { "attachment_id": { "noRecordFound": "No record matching the input was found" } } ], "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation"}| Attachment ID not found/valid. |
CreateDriverLiabilities
Overview
Allows you to add new Drivers' Liabilities.
HTTP Method
Use the HTTP Method 'POST' for consuming this web service.
Input Fields (Header)
Header should contain the 'Content-Type' Key with the Value = 'application/json' or 'application/hjson'.
Header should contain the 'Accept' Key with the Value = 'application/vnd.catch-e-api.v1+json, application/problem+json'
Input Fields (Body)
JSON Example
[ { "driver_id": "100000", "finance_liability_type_id": "2196195708503852111", "finance_liability_financier_id": "4196195708503852222", "driver_asset_id": "4196296702502852222", "amount": 123456.78, "monthly_payment_amount": 1234.56, "liability_payout_flag": "no", "liability_end_date": "2022-05-01", "liability_limit_amount": 0 }, { "driver_id": "100000", "finance_liability_type_id": "2196195708503852111", "finance_liability_financier_id": "4196195708503852222", "driver_asset_id": "4196296702502852223", "amount": 456.78, "monthly_payment_amount": 34.56, "liability_payout_flag": "no", "liability_end_date": "2022-05-01", "liability_limit_amount": 0 }](Successful) Output Example (sample)
{ "driver_liability_id": 3196434310060049502, "driver_id": 101211, "finance_liability_type_id": 3196195708503852473, "finance_liability_financier_id": 3196195708503852478, "driver_asset_id": null, "amount": 1000.77, "monthly_payment_amount": 12.34, "liability_payout_flag": "no", "liability_end_date": "2025-01-01", "liability_limit_amount": 1111.11, "finance_liability_type_name": "Credit Card Limit", "finance_liability_financier_name": "ANZ Banking", "_links": { "self": { "href": "https://api.catch-e.com/fm/driver/liabilities/3196434310060049502" } }}Error Codes
Example error output
{ "validation_messages": { "liability_end_date": { "dateInvalidDate": "The input does not appear to be a valid date" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation"}