Get Driver Endpoints: GetDriverEventCodes

API endpoints for retrieving driver data

GetDriverEventCodes

This method returns a list of driver event codes.

Use this information to find and populate the required value for events in the API createDriverEvents.

Supplementary SWAGGER documentation is available here: https://api.catch-e.com/docs/#/Drivers%20%2F%20Events/getDriverEventCodes

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 DriverEventCodes:Get

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 'GET' for consuming this web service.

URL Examples

https://api.demo.catch-e.com/authenticate
https://api..catch-e.com/authenticate
https://api.test.catch-e.com/fm/driver-event-codes

Parameters - Path Variables

KeyFormatNotesMandatory
drivereventcodestringdrivereventcode. This field supports the wildcard % operator (See Wildcard % operator notes below).No
namestringname. This field supports the wildcard % operator (See Wildcard % operator notes below).No
includeinactiveflagstringAvailable values : no, yes Default value : noNo
pageinteger($int32)Page number. Default value : 1No
page_sizeinteger($int32)Page size. Default value : 25No

Wildcard % operator notes:

If you are using "Postman" app, with the wildcard operator, the search string of either %ab% or %ba%, will give this response:

"field_name": {"isEmpty": "Value is required and can't be empty"}.

If you need to search either %ab% or %ba%, please use %25ab%25 or %25ba%25 as required to return results as expected.

Successful Response Example

{ "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-event-codes/?driver_event_code=EMAIL&include_inactive_flag=yes&page=1&page_size=25" }, "first": { "href": "https://api.test.catch-e.com/fm/driver-event-codes/?driver_event_code=EMAIL&include_inactive_flag=yes&page_size=25" }, "last": { "href": "https://api.test.catch-e.com/fm/driver-event-codes/?driver_event_code=EMAIL&include_inactive_flag=yes&page=1&page_size=25" } }, "_embedded": { "fm_driver_event_codes": [ { "driver_event_code_id": "100002", "driver_event_code": "EMAIL", "name": "Email", "status_flag": "active", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-event-codes/100002" } } } ] }, "page_count": 1, "page_size": 25, "total_items": 1, "page": 1}

Error Response Details

Validation MessagesComments
404 Not Found
"detail": "API endpoint not found"
200 Success
{"_embedded": { "fm_driver_event_codes": [] }, "page_count": 0, "page_size": 25, "total_items": 0, "page": 0}}

| The name passed is not stored in the database, therefore blank result is returned |
| 423 Failed Validation | |
| "detail": "Locked" | Either the Driver is being edited or Billing is being processed. Try again once the Driver is no longer in use or the Billing process has completed. |
| 403 - Forbidden | |
| "detail": "Forbidden" | You do not have permissions for this request. |

GetDriverEventDescriptions

This method returns a list of Driver event descriptions.

Use this information to find and populate the required description for events in the API createDriverEvents.

Supplementary SWAGGER documentation is available here: https://api.catch-e.com/docs/#/Driver%20%2F%20Events/getDriverEventDescriptions(https://api.catch-e.com/docs/#/Driver%20%2F%20Events/getDriverEventDescriptions)

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 DriverEventDescriptions:Get

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 'GET' for consuming this web service.

URL Examples

https://api.demo.catch-e.com/authenticate
https://api..catch-e.com/authenticate
https://api.test.catch-e.com/fm/Driver-event-descriptions

Parameters - Path Variables

KeyFormatNotesMandatory
drivereventcode_idstringdrivereventcode_id.No
includeinactiveflagstringAvailable values : no, yes Default value : no Set to yes if inactive event codes are required in the list.No
pageinteger($int32)Page number. Default value : 1No
page_sizeinteger($int32)Page size. Default value : 25No

Successful Response Example

{ "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-event-descriptions/?page=1" }, "first": { "href": "https://api.test.catch-e.com/fm/driver-event-descriptions/" }, "last": { "href": "https://api.test.catch-e.com/fm/driver-event-descriptions/?page=1" } }, "_embedded": { "fm_driver_event_descriptions": [ { "driver_event_description_id": "100000", "driver_event_code_id": "100000", "event_description": "Test", "default_flag": "no", "status_flag": "active", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-event-descriptions/100000" } } }, { "driver_event_description_id": "100002", "driver_event_code_id": "100007", "event_description": "CC Description 1", "default_flag": "yes", "status_flag": "active", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-event-descriptions/100002" } } }, { "driver_event_description_id": "100003", "driver_event_code_id": "100007", "event_description": "CC Description 2", "default_flag": "no", "status_flag": "active", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-event-descriptions/100003" } } }, { "driver_event_description_id": "100005", "driver_event_code_id": "100008", "event_description": "Test3", "default_flag": "no", "status_flag": "active", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-event-descriptions/100005" } } } ] }, "page_count": 1, "page_size": 25, "total_items": 4, "page": 1}

Error Response Details

Validation MessagesComments
404 Not Found
"detail": "API endpoint not found"
422 Unprocessable Entity
{"driver_event_code_id":{"noRecordFound": "No record matching the input was found"}}

| The name passed is not stored in the database. |
| 423 Failed Validation | |
| "detail": "Locked" | Either the Driver is being edited or Billing is being processed. Try again once the Driver is no longer in use or the Billing process has completed. |
| 403 - Forbidden | |
| "detail": "Forbidden" | You do not have permissions for this request. |

GetDriverEventValues

This method returns a list of Driver event values.

Use this information to find and populate the required value for events in the API createDriverEvents.

Supplementary SWAGGER documentation is available here: https://api.catch-e.com/docs/#/Driver%20%2F%20Events/getDriverEventValues(https://api.catch-e.com/docs/#/Driver%20%2F%20Events/getDriverEventValues)

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 DriverEventValues:Get

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 'GET' for consuming this web service.

URL Examples

https://api.demo.catch-e.com/authenticate
https://api..catch-e.com/authenticate
https://api.test.catch-e.com/fm/Driver-event-values

Parameters - Path Variables

KeyFormatNotesMandatory
drivereventcode_idstringdrivereventcode_idNo
eventvalueidstringeventvalueidNo
includeinactiveflagstringAvailable values : no, yes Default value : no Set to yes if inactive event codes are required in the list.No
pageinteger($int32)Page number. Default value : 1No
page_sizeinteger($int32)Page size. Default value : 25No

Successful Response Example

{ "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-event-values/?page=1" }, "first": { "href": "https://api.test.catch-e.com/fm/driver-event-values/" }, "last": { "href": "https://api.test.catch-e.com/fm/driver-event-values/?page=1" } }, "_embedded": { "fm_driver_event_values": [ { "driver_event_value_id": "11989979731563994522", "driver_event_code_id": "100001", "event_value": "Authorised", "default_flag": "no", "status_flag": "active", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-event-values/11989979731563994522" } } }, { "driver_event_value_id": "11989979731563994523", "driver_event_code_id": "100001", "event_value": "Pending", "default_flag": "yes", "status_flag": "active", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-event-values/11989979731563994523" } } }, { "driver_event_value_id": "11989979731563994524", "driver_event_code_id": "100001", "event_value": "Re-issue", "default_flag": "no", "status_flag": "active", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-event-values/11989979731563994524" } } } ] }, "page_count": 1, "page_size": 25, "total_items": 3, "page": 1}

Error Response Details

Validation MessagesComments
404 Not Found
"detail": "API endpoint not found"
422 Unprocessable Entity
{"driver_event_code_id":{"noRecordFound": "No record matching the input was found"}}

| The name passed is not stored in the database. |
| 423 Failed Validation | |
| "detail": "Locked" | Either the Driver is being edited or Billing is being processed. Try again once the Driver is no longer in use or the Billing process has completed. |
| 403 - Forbidden | |
| "detail": "Forbidden" | You do not have permissions for this request. |

GetDriverEvents

This API returns details for a list of driver events.

Supplementary SWAGGER documentation is available here: https://api.catch-e.com/docs/#/Drivers%20%2F%20Events/getDriverEvents

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:Get.

Note: This API is not configured for external use.
Contact your Account Manager to discuss access to this API.

Authentication

Authenticate with the API before running this API.

HTTP Method

Use the HTTP Method 'GET' for consuming this web service.

URL Examples

https://api.test.catch-e.com/fm/driver-events/

Path Variables

Refer to the swagger for the parameters: https://api.catch-e.com/docs/#/Drivers%20%2F%20Events/getDriverEvents

All parameters are optional.

Only records where = 'active' are passed.

Response Details

Validation MessagesComments
200 OK
{ "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-events/?page=1" }, "first": { "href": "https://api.test.catch-e.com/fm/driver-events/" }, "last": { "href": "https://api.test.catch-e.com/fm/driver-events/?page=16" }, "next": { "href": "https://api.test.catch-e.com/fm/driver-events/?page=2" } }, "_embedded": { "fm_driver_events": [{ "driver_event_id": "100024", "driver_id": "101047", "driver_event_code_id": "100007", "event_date": "2012-06-18", "event_value": "", "description": "Call driver about his quote", "driver_event_value_id": null, "driver_event_description_id": null, "driver_event_action_id": "100002", "due_date": "2012-06-19", "completed_flag": "yes", "attachment_id": "102031", "user_id_edit": "10003", "last_edit": "2012-06-18 04:56:49", "status_flag": "active", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver-events/100024" } } } ] }, "page_count": 16, "page_size": 25, "total_items": 396, "page": 1}

| Success |
| 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": { "driver_event_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"}

| driver event id not found. |

GetDriverLiabilities

Overview

Allows you to retrieve a Drivers' Liabilities for use in the updateDriverLiabilities) web services.

HTTP Method

Use the HTTP Method 'GET' for consuming this web service.

Input Fields (Header)

  • Header should contain the 'Content-Type' Key with the Value = 'application/json' or 'application/hjson'.

Input Fields (Body)

JSON FieldFormatNotesMandatory
driver_idIntDriver IDYes
pagestringOptional page number. Defaults to 1No
page_sizestringOptional Page size. Defaults to 25 records per page.No

Input URL Examples

For a list of a Drivers' Liabilities:

https://api.test.catch-e.com/fm/driver/liabilities?driver_id=&page=1&page_size=25== (Successful) Output Example (sample) =={ "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver/liabilities/?driver_id=101211&page=1" }, "first": { "href": "https://api.test.catch-e.com/fm/driver/liabilities/?driver_id=101211" }, "last": { "href": "https://api.test.catch-e.com/fm/driver/liabilities/?driver_id=101211&page=1" } }, "_embedded": { "driver_liabilities": [ { "driver_liability_id": 3196434310060049470, "driver_id": 101211, "finance_liability_type_id": 3196195708503852473, "finance_liability_financier_id": 3196195708503852519, "driver_asset_id": null, "amount": 3456.78, "monthly_payment_amount": 45.67, "liability_payout_flag": null, "liability_end_date": null, "liability_limit_amount": 3333.33, "finance_liability_type_name": "Credit Card Limit", "finance_liability_financier_name": "NAB", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver/liabilities/3196434310060049470" } } }, { "driver_liability_id": 3196434310060049494, "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": null, "liability_limit_amount": 2000.88, "finance_liability_type_name": "Credit Card Limit", "finance_liability_financier_name": "ANZ Banking", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/driver/liabilities/3196434310060049494" } } } ] }, "page_count": 1, "page_size": 25, "total_items": 2, "page": 1}

Error Codes

Example error output

{ "validation_messages": { "driver_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"}