# Create Sequenced Optimisation

Endpoint: POST /api/webhooks/ro/route-import/v1/
Version: 1.0
Security: key

## Security:

  - `key` (unknown)
    apiKey in query key

## Request fields (application/json):

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

  - `options` (object, required)

  - `options.working_hours` (object, required)

  - `options.working_hours.lower` (string, required)

  - `options.working_hours.upper` (string, required)

  - `options.service_time_sec` (number)
    Seconds

  - `options.pickup_service_time_sec` (number)
    Seconds

  - `options.start_place` (string)
    default_hub if use driver's default start hub. hub_location if use specific hub that you can set in start_hub field.

  - `options.start_hub` (number)

  - `options.end_place` (string)
    default_hub if use driver's default end hub. hub_location if use specific hub that you can set in end_hub field.

  - `options.end_hub` (number)

  - `routes` (array, required)

  - `routes.member_id` (number, required)

  - `routes.sequence` (array)

  - `routes.sequence.external_id` (string)
    In case this pickup from Concatenated Job send child order id here.

  - `routes.sequence.order_id` (string)
    In case this pickup from Concatenated Job send child order id here.

  - `routes.sequence.point_kind` (string)
    pickup or delivery

## Request examples:

  - `Example` (unknown)

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 200 examples:

  - `OK` (unknown)

## Response 400 examples:

  - `Lower & Upper Required` (unknown)

  - `Lower > Upper` (unknown)

  - `Lower/Upper Incorrect` (unknown)

  - `Lower < Now` (unknown)

  - `order_id & external_id not provided` (unknown)

  - `order_id & external_id different jobs` (unknown)

  - `No Pickup` (unknown)

  - `Job/Pickup & Driver Merchant different` (unknown)

  - `Sequence Driver mismatch` (unknown)

  - `> 250 Points` (unknown)

  - `Member ID not unique` (unknown)

  - `Duplicate Jobs` (unknown)

  - `No Start Hub` (unknown)

  - `No End Hub` (unknown)

  - `Start Hub doesn't exist` (unknown)

  - `End Hub doesn't exist` (unknown)

  - `No default Start Hub` (unknown)

  - `No default End Hub` (unknown)

  - `Pickup disabled` (unknown)

  - `Concatenated Jobs disabled` (unknown)

  - `Nested job part of a Concatenated Job & sent as Delivery Point` (unknown)

  - `Invalid Status` (unknown)

  - `Job Date differs from Optimisation Day` (unknown)

  - `Service Time > Job Delivery Window` (unknown)

  - `Job Deadlines outside Working Hours` (unknown)

  - `Pickup without Job` (unknown)

  - `Pickup after Job` (unknown)

  - `Missing Pickup` (unknown)

  - `Pickup Window invalid` (unknown)

  - `Job in different Optimisation` (unknown)

## Response 401 examples:

  - `Unauthorized` (unknown)

## Response 403 examples:

  - `Forbidden` (unknown)

  - `Route Optimisation V4 disabled` (unknown)

  - `Route Optimisation disabled` (unknown)

  - `Sequenced Optimisation disabled` (unknown)

