updateDriversList
updateDriversList
Overview
This method updates a list of existing drivers in a single request. Each driver in the list is identified by its driver_id.
This method requires the Drivers:Update permission to be associated with your role.
Permissions
The permission for this api is stored in [gb_api_permissions]permission as 'Drivers:Update'.
Only roles with a stored link to this permission in [gb_role_api_permissions] can run this api.
HTTP Method
Use the HTTP Method 'PUT' for consuming this web service.
URL Examples
https://api.demo.catch-e.com/fm/drivers
https://api.{{environment}}.catch-e.com/fm/drivers https://api.test.catch-e.com/fm/drivers Input Fields (Header)
Input Fields (JSON)
Send an array of drivers. Each driver uses the same fields as getDriver and createDrivers; see those articles for the full field list.
Example
[ { "driver_id": "4321", "mobile": "[MOBILE-E164]" }, { "driver_id": "4322", "email": "[EMAIL]" } ] The example is shortened. Only a selection of fields is shown.
Duplicate Driver Warnings
Each driver in the list is checked for a duplicate name or employee number at its client, in the same way as updateDriver: on the driver as it will be after the update, using stored values for any field not sent.
Each driver carries its own
override_warnings_flag.If a driver is refused, no driver in the list is saved, including drivers listed before it.
The refused driver is reported keyed by its position in the request, starting at 0.
Each driver is also compared with drivers changed earlier in the same request. For example, if two drivers are both renamed to the same name, the second is refused.
Response Details
Success
200 - OK
The drivers were updated successfully. The swagger defines the response body only as a JSON object, with no fields listed.
Error Response Details
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Found", "status": 404, "detail": "Not Found" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Acceptable", "status": 406, "detail": "Not Acceptable" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unsupported Media Type", "status": 415, "detail": "Not Acceptable" } { "warning_messages": {}, "validation_messages": { "fieldName": { "validationExceptionCode": "A textual description of the validation exception" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" } { "warning_messages": { "1": { "surname": { "duplicateDriverName": "Driver 'Alex Smith' already exists for Client 'Example Client Pty Ltd'" } } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "string", "status": 599, "detail": "string" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "string", "status": 599, "detail": "string" } Was this helpful?
Still need help? Ask the team