# Create Optimisation

Endpoint: POST /api/webhooks/ro/optimisation/v1/
Version: 1.0
Security: key

## Security:

  - `key` (unknown)
    apiKey in query key

## Request fields (application/json):

  - `type` (string)

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

  - `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` (integer)

  - `options.pickup_service_time` (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)

## Request examples:

  - `Request Body` (unknown)

## Response 201:

  - `201` (unknown)
    201

## Response 201 fields (application/json):

  - `id` (integer)
    Example: 17

  - `type` (string)
    Example: ADVANCED

  - `day` (string)
    Example: 2020-09-09

  - `options` (object)

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

  - `options.start_hub` (integer)
    Example: 101

  - `options.end_place` (string)
    Example: default_hub

  - `options.service_time` (integer)
    Example: 15

  - `options.working_hours` (object)

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

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

  - `options.use_vehicle_capacity` (boolean)
    Example: true

  - `state` (string)
    Example: VALIDATION

  - `task_status` (string)
    Example: in_progress

  - `group` (any)

  - `customers_notified` (boolean)
    Example: false

  - `log` (object)

  - `log.messages` (array)

  - `log.messages.text` (string)
    Example: 1 driver was left out of the Optimisation: all jobs were assigned between other drivers

  - `log.messages.time` (string)
    Example: 2020-11-11T20:28:51.735252+10:00

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

  - `log.steps` (array)

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

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

## Response 403:

  - `403` (unknown)
    403

## Response 403 fields (application/json):

  - `detail` (string)
    Example: You can use this API only with "Single API Key"

  - `errors` (any)

## Response 201 examples:

  - `Result` (unknown)

