Skip to main content
Kardinal’s Always-on Route Optimization API (ARO) works around two steps: you submit a plan (vehicles, orders, constraints), and you retrieve the solution the engine computes for it. This tutorial walks through both, using the smallest possible plan.
AI agent modeling a real client’s data, not just running this tutorial? See Start here if you’re an AI agent first — this tutorial’s minimal plan skips several decisions (capacity feasibility, hard vs. soft time windows) that matter as soon as you’re working from real data.
Access to the API is provisioned by invitation: you’re invited to set a password for a username (usually your company email), and given an environment URL that looks like https://<env>.kardinal.ai (for example https://app.kardinal.ai). There is currently no self-serve sign-up flow — if you don’t have credentials yet, contact your Account Executive or api@kardinal.ai.

Step 1 — Authenticate

Kardinal uses JWT authentication. Exchange your username and password for an access_token:
Response
Keep the access_token — every following request uses it as a bearer token. It’s valid for one hour; see Authentication and API keys for how to refresh it.

Step 2 — Submit a minimal plan

A plan is created with a single PUT request (this doubles as create and update — see How the optimization engine works). Here is the smallest viable plan: one resource and three pickup-only orders in Paris.
"type": "fly" is a crow-fly vehicle profile — it’s fast to compute and ideal for a first test. Real integrations typically use car or truck profiles (see the data model reference).
You can also submit a plan as a file upload (-F "file=@plan.json") instead of an inline -d body, and as XLSX instead of JSON — column names in the spreadsheet match the JSON field names. As soon as the plan is accepted, optimization starts automatically — there’s no separate “start” call.

Step 3 — Retrieve the solution

The response wraps the result in an item field and gives you, per resource, the ordered list of stops (tours[].wayPoints) with arrival/departure times, plus any stop that couldn’t be planned:
Response (abridged)
For a small test plan like this one, the solution is typically ready within seconds — for larger plans, poll the plan’s status field until optimization settles (see the polling workflow in How the optimization engine works).

Next steps

  • Update test_plan again with the same id to see interactive re-optimization in action — read How the optimization engine works first to understand what happens on update.
  • Add time windows, capacities, and skills to your orders and resources — see the full data model reference.
  • Move from crow-fly (fly) to a real vehicle profile (car, truck) before going further than a smoke test.