# SavedRoute

Schema: #/components/schemas/SavedRoute

Method: SCHEMA
Version: 2.0
Security: oauth2

## Schema fields:

  - `id` (string, required)
    Example: savr01HRFF3SEVSCRAV9B3CHVDFN0H

  - `url` (string, required)
    Example: https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735/saved_routes/savr01HRFF3SEVSCRAV9B3CHVDFN0H

  - `user` (string, required)
    Link to the user who owns this route.
    Example: https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735

  - `name` (string, required)
    User-supplied name for the route.

  - `favourite` (boolean, required)

  - `origin` (object, required)
    A single geographic point on a saved route.

  - `origin.latitude` (number, required)

  - `origin.longitude` (number, required)

  - `origin.name` (string, required)

  - `waypoints` (array, required)
    Ordered intermediate stops. Empty when the route is direct.

  - `waypoints.latitude` (number, required)

  - `waypoints.longitude` (number, required)

  - `waypoints.name` (string, required)

  - `waypoints.stay_minutes` (integer)
    How long the driver stays at this stop, in minutes. 0 means passing
through. Always present in responses; optional in requests.

  - `waypoints.overnight_leave_at` (string | null)
    An overnight stop: the driver stays the night and leaves the next
morning at this local time of day, as HH:MM. Null means not an
overnight stop. Only on one-way routes, with `stay_minutes` 0.
Always present in responses; optional in requests.
    Example: 07:30

  - `arrive_with_min_percent` (integer, required)
    Target battery floor on arrival.

  - `preferred_departure_minutes` (integer | null, required)
    Preferred departure hint as an offset in minutes from midnight of
the day the route is re-planned. Null means "leave now".

  - `is_return_trip` (boolean, required)
    The route comes back to its origin. The destination is the far
point; the way home is planned from it.

  - `avoid_toll_roads` (boolean, required)
    Route around toll roads where a toll-free road exists.

  - `return_departure_minutes` (integer | null, required)
    On a return trip, when the driver heads home from the destination,
as minutes from midnight on the day `return_departure_day_offset`
days after the departure. Null means straight away on arrival.
Ignored unless `is_return_trip` is true.

  - `return_departure_day_offset` (integer, required)
    Days after the departure day that `return_departure_minutes` falls
on: 0 is the same day, 1 the next.

  - `vehicle` (string | null, required)
    Link to the user's vehicle the route was planned for. Null when none
was chosen, or the vehicle has since been deleted.
    Example: https://api.ev.energy/v2/vehicles/vhcl01HQR9XN8CRKNE0M6489KW6FWG

  - `destination_arrive_with_min_percent` (integer | null, required)
    Battery floor on arrival at the destination, when the driver wants
more there than at stops on the way. Null means the same as
`arrive_with_min_percent`.

  - `break_every_minutes` (any, required)
    Driving minutes between breaks for this trip. 0 means no breaks.
Null means the driver's own setting applies.

  - `break_minutes` (integer | null, required)
    Length of each break, in minutes. Null means the driver's own setting.

  - `created_at` (string, required)

  - `last_used_at` (string, required)
    Bumped each time the route is re-planned.

