POST /v1/integration-importRichiesta
{
"external_job_id": "BATCH-001",
"title": "Morning Deliveries",
"driver_email": "driver@example.com",
"stops": [
{
"external_stop_id": "STOP-1",
"address": "1 George St, Brisbane QLD 4000",
"label": "Customer A",
"parcel_count": 2
}
]
}Risposta
{
"job_id": "e7ad097b-...",
"optimization": {
"total_distance_km": 12.4,
"total_duration_minutes": 25
},
"stops": [ /* optimized order */ ],
"warnings": [...]
}Ottieni le credenziali
Genera client ID e secret dalla pagina impostazioni del dashboard RouteMate.
Richiedi il token
Scambia le tue credenziali con un bearer token valido per un'ora.
Chiama la API
Includi il token nell'header Authorization per richieste di importazione e stato.
Flusso client credentials
La API di RouteMate usa un flusso OAuth2 client credentials. Scambia client ID e secret con un bearer token temporaneo e includilo poi nell'header Authorization.
01
Ottieni le credenziali
Genera client ID e secret dalla pagina impostazioni del dashboard RouteMate.
02
Richiedi il token
Scambia le tue credenziali con un bearer token valido per un'ora.
03
Chiama la API
Includi il token nell'header Authorization per richieste di importazione e stato.
Endpoint API principali
Questi endpoint coprono le attività di integrazione più comuni per i flussi di consegna.
/v1/integration-tokenGet Access Token
Exchange client credentials for a short-lived access token valid for 1 hour.
Request
{
"client_id": "rm_ci_your_client_id",
"client_secret": "rm_cs_your_client_secret"
}Response
{
"access_token": "rm_at_e5988dd1b91a...",
"token_type": "Bearer",
"expires_in": 3600
}/v1/integration-importImport Job & Optimize Route
Import a job with stops, geocode addresses, optimize the route, and assign the driver.
Request
{
"external_job_id": "BATCH-001",
"title": "Morning Deliveries",
"driver_email": "driver@example.com",
"stops": [
{
"external_stop_id": "STOP-1",
"address": "1 George St, Brisbane QLD 4000",
"label": "Customer A",
"parcel_count": 2
}
]
}Response
{
"job_id": "e7ad097b-...",
"optimization": {
"total_distance_km": 12.4,
"total_duration_minutes": 25
},
"stops": [ /* optimized order */ ],
"warnings": [...]
}/v1/integration-jobsQuery Job Status
Check job and stop status, including delivery progress and counts.
Request
// GET requestResponse
{
"job_id": "e7ad097b-...",
"status": "assigned",
"stop_count": 3,
"status_counts": {
"pending": 2,
"completed": 1
},
"stops": [...]
}Inizia in pochi minuti
Usa gli esempi qui sotto per autenticarti, importare job e controllare lo stato delle consegne.
curl -X POST https://api.routemate.app/v1/integration-token \
-H "Content-Type: application/json" \
-d '{"client_id":"rm_ci_your_client_id","client_secret":"rm_cs_your_client_secret"}'const tokenRes = await fetch("https://api.routemate.app/v1/integration-token", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
client_id: "rm_ci_your_client_id",
client_secret: "rm_cs_your_client_secret",
}),
});import requests
token_res = requests.post(
"https://api.routemate.app/v1/integration-token",
json={
"client_id": "rm_ci_your_client_id",
"client_secret": "rm_cs_your_client_secret",
},
)Pronto per la produzione dal primo giorno
Progettato per workflow affidabili, retry e operazioni a valle.