# List Optimisations

Endpoint: GET /api/webhooks/ro/optimisation/v5/
Version: 1.0
Security: key

## Security:

  - `key` (unknown)
    apiKey in query key

## Query parameters:

  - `page_size` (string)

  - `page` (string)

  - `day_after` (string)
    If set, returns optimisations with `date` greater than or equal to the passed value. Example: `"2020-01-12"`. (ISO-8601). (ISO-8601)

  - `day_before` (string)
    If set, returns optimisations with `date` less than or equal to the passed value. Example: `"2020-01-13"`. (ISO-8601). (ISO-8601)

  - `merchant` (integer)

## Request fields (application/json):

  - `id` (integer)

  - `type` (string)

  - `day` (string)
    Date in ISO-8601 YYYY-MM-DD.

  - `merchant` (integer)

  - `options` (object)

  - `options.order_ids` (array)

  - `options.external_ids` (array)

  - `options.member_ids` (array)

  - `options.working_hours` (object)

  - `options.working_hours.lower` (string)

  - `options.working_hours.upper` (string)

  - `options.service_time_sec` (integer)

  - `options.pickup_service_time_sec` (integer)

  - `options.start_place` (string)

  - `options.start_hub` (integer)

  - `options.end_place` (string)

  - `options.end_hub` (integer)

  - `options.re_optimise_assigned` (boolean)

  - `options.use_vehicle_capacity` (boolean)

  - `options.use_all_not_assigned_jobs` (boolean)

  - `options.use_driver_proficiency` (boolean)

  - `options.use_driver_costs` (boolean)

  - `options.use_territories` (boolean)

  - `options.objectives` (array)
    Multi Select Enum: minimize_unassigned, minimize_cost, minimize_distance, minimize_duration, optimize_tour_count_minimize, optimize_tour_count_maximize, minimize_tour_overlap, visually_appealing_tours, maximize_priority

  - `task_status` (string)
    Possible values are `created`, `in_progress`, `completed`. Here task means background task that performs optimisation. You should wait for status `completed` to work with optimisation results.

  - `routes` (array)

  - `routes.id` (integer)

  - `routes.driver` (integer)

  - `routes.total_time` (integer)

  - `routes.driving_time` (integer)

  - `routes.driving_distance` (integer)

  - `routes.start_time` (string)

  - `routes.end_time` (string)

  - `routes.orders_count` (string)

  - `routes.points` (array)

  - `routes.points.id` (integer)

  - `routes.points.number` (integer)

  - `routes.points.point_type` (string)

  - `routes.points.point_kind` (string)

  - `routes.points.point_object_id` (integer)

  - `routes.points.point_object` (object)

  - `routes.points.service_time` (integer)

  - `routes.points.driving_time` (integer)

  - `routes.points.distance` (integer)

  - `routes.points.start_time` (string)

  - `routes.points.end_time` (string)

  - `routes.points.planned_arrival_after` (string)

  - `routes.points.planned_arrival_before` (string)

  - `routes.points.path_polyline` (string)

  - `routes.color` (string)

  - `state` (string)
    State of this optimisation. Possible values are `CREATED`, `VALIDATION`, `OPTIMISING`, `COMPLETED`, `RUNNING`, `FINISHED`, `FAILED`. Status `COMPLETED` means that optimisation process has successfully completed, driver routes has created. `FINISHED` - when drivers completes all optimised jobs. `FAILED` - in case of some failure.

  - `group` (string)

  - `customers_notified` (boolean)

  - `log` (object)

  - `log.messages` (array)

  - `log.messages.text` (string)

  - `log.messages.time` (string)

  - `log.percent` (integer)

  - `log.steps` (array)

  - `log.steps.name` (string)

  - `log.steps.completed` (boolean)

  - `cost` (integer)

## Response 200:

  - `200` (unknown)
    200

## Response 200 fields (application/json):

  - `count` (integer)
    Example: 4

  - `next` (any)

  - `previous` (any)

  - `results` (array)

  - `results.id` (integer)
    Example: 6758

  - `results.type` (string)
    Example: ADVANCED

  - `results.day` (string)
    Example: 2023-07-14

  - `results.merchant` (integer)
    Example: 59

  - `results.options` (object)

  - `results.options.day` (string)
    Example: 2025-10-18

  - `results.options.routes` (array)

  - `results.options.routes.sequence` (array)

  - `results.options.routes.sequence.order_id` (integer)
    Example: 154350857

  - `results.options.routes.sequence.point_kind` (string)
    Example: delivery

  - `results.options.routes.member_id` (integer)
    Example: 7217

  - `results.options.pickup_service_time_sec` (integer)
    Example: 900

  - `results.options.use_all_not_assigned_jobs` (boolean)
    Example: true

  - `results.options.order_ids` (array)

  - `results.options.external_ids` (array)

  - `results.options.member_ids` (array)

  - `results.options.working_hours` (object)

  - `results.options.working_hours.lower` (string)
    Example: 08:00

  - `results.options.working_hours.upper` (string)
    Example: 17:00

  - `results.options.service_time` (integer)
    Example: 5

  - `results.options.service_time_sec` (integer)
    Example: 180

  - `results.options.pickup_service_time` (integer)
    Example: 5

  - `results.options.start_place` (string)
    Example: hub_location

  - `results.options.start_hub` (integer)
    Example: 315

  - `results.options.start_location` (object)

  - `results.options.start_location.location` (object)

  - `results.options.start_location.location.lat` (number)
    Example: -37.8136

  - `results.options.start_location.location.lng` (number)
    Example: 144.9631

  - `results.options.end_place` (string)
    Example: hub_location

  - `results.options.end_hub` (integer)
    Example: 314

  - `results.options.end_location` (any)

  - `results.options.re_optimise_assigned` (boolean)
    Example: false

  - `results.options.use_vehicle_capacity` (boolean)
    Example: false

  - `results.options.objectives` (array)

  - `results.options.use_driver_proficiency` (boolean)
    Example: false

  - `results.options.use_driver_costs` (boolean)
    Example: false

  - `results.options.use_territories` (boolean)
    Example: false

  - `results.cost` (integer)
    Example: 0

  - `results.routes` (array)

  - `results.routes.id` (integer)
    Example: 9589

  - `results.routes.cost` (integer)
    Example: 0

  - `results.routes.max_utilized_capacity` (integer)
    Example: 0

  - `results.routes.max_utilized_capacities` (object)

  - `results.routes.max_utilized_capacities.capacity` (integer)
    Example: 0

  - `results.routes.max_utilized_capacities.capacity_2` (integer)
    Example: 0

  - `results.routes.max_utilized_capacities.capacity_3` (integer)
    Example: 0

  - `results.routes.driver` (object)

  - `results.routes.driver.member_id` (integer)
    Example: 98113174

  - `results.routes.driver.full_name` (string)
    Example: Jhon Doe

  - `results.routes.driver.car` (object)

  - `results.routes.driver.car.car_type` (integer)
    Example: 2

  - `results.routes.driver.car.car_type_name` (string)
    Example: Ute

  - `results.routes.driver.car.capacity` (integer)
    Example: 20

  - `results.routes.driver.is_online` (boolean)
    Example: false

  - `results.routes.driver.work_status` (string)
    Example: not_working

  - `results.routes.driver.phone` (string)
    Example: +61400000000

  - `results.routes.driver.thumb_avatar_100x100` (string)
    Example: https://radaro-api-staging.s3.us-west-2.amazonaws.com:443/media/thumbnails/Member/29d9632b-5b0b-40e9-8e65-43d47d1cd5ff_100x100.jpg

  - `results.routes.driver.status` (string)
    Example: pickup

  - `results.routes.driver.last_location` (object)

  - `results.routes.driver.last_location.location` (string)
    Example: -37.813600,144.963100

  - `results.routes.driver.transport` (object)

  - `results.routes.driver.transport.capacities` (object)

  - `results.routes.driver.transport.capacities.capacity` (integer)
    Example: 14

  - `results.routes.driver.transport.capacities.capacity_2` (integer)
    Example: 20

  - `results.routes.driver.transport.capacities.capacity_3` (integer)
    Example: 40

  - `results.routes.driver.transport.capacities.constant` (object)

  - `results.routes.driver.transport.capacities.constant.capacity` (integer)
    Example: 1

  - `results.routes.driver.transport.capacities.constant.capacity_2` (integer)
    Example: 2

  - `results.routes.driver.transport.capacities.constant.capacity_3` (integer)
    Example: 3

  - `results.routes.driver.transport.capacities.one_time` (object)

  - `results.routes.driver.transport.limits` (object)

  - `results.routes.driver.transport.limits.max_distance` (integer)
    Example: 500

  - `results.routes.driver.transport.limits.max_working_time` (integer)
    Example: 13000

  - `results.routes.driver.transport.limits.min_stops` (any)

  - `results.routes.driver.transport.limits.max_stops` (integer)
    Example: 479

  - `results.routes.driver.transport.territories` (object)

  - `results.routes.driver.transport.territories.constant` (object)

  - `results.routes.driver.transport.territories.constant.correspondence` (any)

  - `results.routes.driver.transport.territories.one_time` (object)

  - `results.routes.options` (object)

  - `results.routes.total_time` (integer)
    Example: 2267

  - `results.routes.driving_time` (integer)
    Example: 1967

  - `results.routes.driving_distance` (integer)
    Example: 16349

  - `results.routes.start_time` (string)
    Example: 2023-07-14T17:20:00+10:00

  - `results.routes.end_time` (string)
    Example: 2023-07-14T17:57:47+10:00

  - `results.routes.orders_count` (integer)
    Example: 1

  - `results.routes.points` (array)

  - `results.routes.points.id` (integer)
    Example: 146055

  - `results.routes.points.number` (integer)
    Example: 1

  - `results.routes.points.point_kind` (string)
    Example: hub

  - `results.routes.points.service_time` (integer)
    Example: 0

  - `results.routes.points.driving_time` (integer)
    Example: 0

  - `results.routes.points.distance` (integer)
    Example: 0

  - `results.routes.points.start_time` (string)
    Example: 2023-07-14T17:20:00+10:00

  - `results.routes.points.end_time` (string)
    Example: 2023-07-14T17:20:00+10:00

  - `results.routes.points.planned_arrival_after` (string)
    Example: 2023-07-14T16:30:00+10:00

  - `results.routes.points.planned_arrival_before` (string)
    Example: 2023-07-14T18:30:00+10:00

  - `results.routes.points.planned_arrival` (string)
    Example: 2023-07-14T17:20:00+10:00

  - `results.routes.points.utilized_capacity` (integer)
    Example: 0

  - `results.routes.points.utilized_capacities` (object)

  - `results.routes.points.utilized_capacities.capacity` (integer)
    Example: 0

  - `results.routes.points.utilized_capacities.capacity_2` (integer)
    Example: 0

  - `results.routes.points.utilized_capacities.capacity_3` (integer)
    Example: 0

  - `results.routes.points.point_type` (string)
    Example: hub

  - `results.routes.points.point_object_id` (integer)
    Example: 379

  - `results.routes.points.point_object` (any)

  - `results.routes.color` (string)
    Example: #40BF40

  - `results.routes.state` (string)
    Example: FINISHED

  - `results.routes.approved` (boolean)
    Example: true

  - `results.state` (string)
    Example: FINISHED

  - `results.task_status` (string)
    Example: completed

  - `results.group` (any)

  - `results.customers_notified` (boolean)
    Example: false

  - `results.log` (object)

  - `results.log.messages` (array)

  - `results.log.messages.text` (string)
    Example: Optimisation started

  - `results.log.messages.time` (string)
    Example: 2023-07-10T18:22:25.136642+10:00

  - `results.log.progress` (integer)
    Example: 100

  - `results.log.steps` (array)

  - `results.log.steps.name` (string)
    Example: Composing the distance matrix

  - `results.log.steps.completed` (boolean)
    Example: true

## Response 403:

  - `403` (unknown)
    403

## Response 403 fields (application/json):

  - `detail` (string)
    Example: Route optimisation is not active for you

  - `errors` (object)

  - `errors.permission_denied` (array)

  - `code` (any)

## Response 200 examples:

  - `Result` (unknown)

## Response 403 examples:

  - `Not Active` (unknown)

  - `Start Date` (unknown)

