# Lytx.DriverAssignment.API

Version: 1.0.0

## Servers

```
https://api.lytx.com
```

## Security

### bearerAuth

Type: http
Scheme: bearer

## Download OpenAPI description

[Lytx.DriverAssignment.API](https://developer.lytx.com/_bundle/openapispec/driver.assignment.openapi.yaml)

## Driver Assignments (DriveCam)

### Retrieve Assignments

 - [GET /v1/driver-assignments](https://developer.lytx.com/openapispec/driver.assignment.openapi/driver-assignments-(drivecam)/paths/~1v1~1driver-assignments/get.md): Retrieve a list of all the driver assignments in a organization or subset of an organization.

### Submit Dispatch Schedule

 - [POST /v1/driver-assignments/dispatch](https://developer.lytx.com/openapispec/driver.assignment.openapi/driver-assignments-(drivecam)/paths/~1v1~1driver-assignments~1dispatch/post.md): Schedules drivers to specific vehicles over specified periods, facilitating efficient fleet management. Unlike the Driver Assignment API, which tracks actual driver usage of vehicles, this API focuses solely on planned schedules.
      
Below is the reference list of validation response codes that can be found in response after submitting dispatch schedule:
- "SUCCESS" - Success
- "E_UNKNOWN" - Unknown error processing entry
- "E_NO_MATCH" - No matching entry found
- "E_NO_MATCH_DRIVER" - No matching entry found for Driver
- "E_NO_MATCH_VEHICLE" - No matching entry found for Vehicle
- "E_ACCESS_DENIED" - Access has been denied to one or more objects in this operation
- "E_CREATE_USER_ACCESS_DENIED" - Access has been denied while attempting to create a new user object
- "E_DUPLICATE_USERNAME_OR_EMPLOYEENUM" - The UserName field or EmployeeId field matches an existing active user
- "E_CREATE_USER_INCLUDE_SPECIAL_CHARACTER - The FirstName field, LastName field or EmployeeId field include special character
- "I_CREATE_USER_SUCCESS" - The user was successfully created
- "I_DUPLICATE_RULE" - A rule was added to the system that is a duplicate of an existing rule.  The previous rule has been removed
- "E_CONFLICTING_SCHEDULE" - Another schedule with similar schedule details was found, or was recently processed
- "E_FIRSTNAME_OR_LASTNAME_NOT_ALLOW_NULL" - The FirstName and LastName fields are required while auto adding driver
- "E_DUPLICATE_VEHICLES" - Could not identify the vehicle because there are multiple vehicles using the same vehicle name in company

### Retrieve Submission Log Status

 - [GET /v1/driver-assignments/status](https://developer.lytx.com/openapispec/driver.assignment.openapi/driver-assignments-(drivecam)/paths/~1v1~1driver-assignments~1status/get.md): Retrieve the status of a submission log to understand if processing is complete or in progress.

### Retrieve Submission Logs

 - [GET /v1/driver-assignments/result](https://developer.lytx.com/openapispec/driver.assignment.openapi/driver-assignments-(drivecam)/paths/~1v1~1driver-assignments~1result/get.md): Retrieve submission entries of a submission log, which provide the driver, vehicle, and dispatch start and end time.

