Skip to main content
POST
/
planner
/
v2
Submit route optimization
curl --request POST \
  --url https://staging.api.fryte.xyz/planner/v2 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "battery_level_end": 0.2,
  "battery_level_start": 0.8,
  "poi_info": {
    "connector_pos": "RIGHT",
    "connector_type": [
      "CCS"
    ],
    "min_kW": 150,
    "truck_approved": "T"
  },
  "section_list": [
    {
      "payload_kg": 19300,
      "section_id": "section_0",
      "service_time_min": 30,
      "start_pos": [
        48.7758,
        9.1829
      ],
      "stop_pos": [
        49.4521,
        11.0767
      ]
    }
  ],
  "start_time_tour": "08:00:00",
  "vehicle_id": "010160700001"
}
'
{
  "job_id": "c3f1c944-a44c-4c07-ab52-7df7ba94024a",
  "message": "202 - Job submitted.",
  "optimization_id": 7658,
  "tour_id": 7615
}

Documentation Index

Fetch the complete documentation index at: https://docs.fryte.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

corridor
integer
default:8000

Search corridor width in meters around the route for finding charging stations.

Required range: 1000 <= x <= 20000
tenant_id
integer | null

Tenant ID

Body

application/json

Top-level request body schema for the planner.

vehicle_id
string
required

The unique identifier of the vehicle. See Vehicles.

battery_level_start
number
required

The starting battery level of the vehicle (from 0.1 to 1.0).

Required range: 0.1 <= x <= 1
section_list
SectionRequest · object[]
required

A list of route sections to be processed.

poi_info
POIInfo · object
required

Filter criteria for charging stations along the route.

battery_level_end
number | null
default:0.2

The desired battery level at the end of the tour (from 0.1 to 0.8).

Required range: 0.1 <= x <= 0.8
service_time_departure_min
number | null
default:0

Service time at departure in minutes, counted as driving time.

start_time_tour
string | null

Start time of the tour in HH:MM:SS or ISO-8601 format.

include_available_charging_stations
boolean
default:false

When true, the response includes all charging stations along the corridor.

Response

Successful Response

message
string
required

Human-readable status message.

tour_id
integer
required

Internal tour identifier.

optimization_id
integer | null

Optimization identifier. Use this to retrieve the result via GET /planner/optimizations/{optimization_id}/result.

job_id
string | null

Job identifier (UUID). Use this to poll for status via GET /planner/jobs/{job_id}.

warnings
string[] | null

Warnings about the request, if any.