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.catch-e.com/fm/driver-event-codes

https://api.catch-e.com/fm/driver-event-codes?driver_event_code=EMAIL&include_inactive_flag=yes&page=1&page_size=25

Parameters - Query String

Key

Format

Notes

Mandatory

driver_event_code

string

Driver event code. This field supports the wildcard % operator (see Wildcard % operator notes below)

No

name

string

Name of event code. This field supports the wildcard % operator (see Wildcard % operator notes below)

No

include_inactive_flag

string

Available values: no, yes. Default value: no

No

page

integer

Page number. Default value: 1

No

page_size

integer

Page size. Default value: 25

No

Wildcard % Operator Notes

If you are using the Postman app with the wildcard operator, search strings such as %ab% or %ba% will return an error response.

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

Response Details

Validation Message

Comments

200 OK

Successful response returns paginated list of driver event codes

200 Success (Empty Results)

The name passed is not stored in the database, therefore blank result is returned

404 - Not Found

API endpoint not found

423 - Locked

Either a 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

You do not have permissions for this request

Successful Response Example

{ "_links": { "self": { "href": "https://api.catch-e.com/fm/driver-event-codes/?driver_event_code=EMAIL&include_inactive_flag=yes&page=1&page_size=25" }, "first": { "href": "https://api.catch-e.com/fm/driver-event-codes/?driver_event_code=EMAIL&include_inactive_flag=yes&page_size=25" }, "last": { "href": "https://api.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.catch-e.com/fm/driver-event-codes/100002" } } } ] }, "page_count": 1, "page_size": 25, "total_items": 1, "page": 1 } 

Error Response Examples

200 Success - Empty Results

{ "_embedded": { "fm_driver_event_codes": [] }, "page_count": 0, "page_size": 25, "total_items": 0, "page": 0 } 

The name or code passed is not stored in the database, therefore blank result is returned.

423 Locked

{ "detail": "Locked" } 

Either a 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.

404 Not Found

{ "detail": "API endpoint not found" }