v15

latestOpenAPI 3.1.02026-07-1295183803.5 KB
Optimization

Assign Drivers to Orders

Assigns available drivers (vehicles) to open orders based on specified criteria and constraints.

post/optimization/driver-assignment/v1

Query parameters

keystring 32 character alphanumeric string required
Example:key=API_KEY

A key is a unique identifier that is required to authenticate a request to the API.

Request body

Example request

{
  "orders": [
    {
      "vehicle_preferences": {
        "required_all_of_attributes": [
          {
            "attribute": "\"attribute\": \"driver_rating\"",
            "value": "\"value\": \"4\"",
            "operator": "\"operator\":\"==\""
          }
        ],
        "required_any_of_attributes": [
          {
            "attribute": "\"attribute\": \"driver_rating\"",
            "value": "\"value\": \"4\"",
            "operator": "\"operator\":\">\""
          }
        ],
        "exclude_all_of_attributes": [
          {
            "attribute": "\"attribute\": \"driver_rating\"",
            "value": "\"value\": \"4\"",
            "operator": "\"operator\":\"<\""
          }
        ]
      }
    }
  ],
  "options": {
    "order_attribute_priority_mappings": [
      {
        "attribute": "\"attribute\": \"driver_rating\"",
        "value": "\"value\": \"4\"",
        "operator": "\"operator\":\"==\""
      }
    ],
    "vehicle_attribute_priority_mappings": [
      {
        "attribute": "\"attribute\": \"driver_rating\"",
        "value": "\"value\": \"4\"",
        "operator": "\"operator\":\"==\""
      }
    ]
  }
}

Response

statusinteger

An integer indicating the HTTP response code. See the API Error Handling section below for more information.

messagestring

Displays indicative error message in case of a failed request or operation. Please note that this parameter is not returned in the response in case of a successful request.