Documentation menu
POST/v1/jobs/replan
Access and price
| Auth | An API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. Needs a full key; a browser (maps) key is refused. |
|---|---|
| Price | As the synchronous twin, doubled when relax_if_unassigned reserves a second solve; the unused half is refunded when the job finishes. Class: standard, or premium for truck and ADR work. Published as unit_rules.async_jobs in /pricing.json. |
| Premium | When the body asks for truck routing: "costing": "truck", a top-level adr object or "hazmat": true |
What it does
Submit a mid-shift re-plan to the asynchronous lane.
An API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. Price: As the synchronous twin, doubled when relax_if_unassigned reserves a second solve; the unused half is refunded when the job finishes.
Call it
curl -fsS -X POST "https://api.mapmap.ai/v1/jobs/replan" \
-H "Authorization: Bearer $MAPMAP_KEY" \
-H "Content-Type: application/json" \
-d @request.jsonRequest body
application/json
Exactly the POST /optimise/replan body: the original /optimise problem plus progress and changes, with an optional webhook_url. Metered on the REMAINING problem, exactly as the synchronous endpoint is, at the SN_OPTIMISE_MAX_LOCATIONS_ASYNC (2,000) ceiling rather than 200. Nothing is stored between calls here either: the async lane holds the submitted body until its retention TTL so it can run and serve the result, and that is the whole of it
Example: From website/public/docs/api-reference.md:2904
{
"changes": {
"add_jobs": [
{
"id": 20,
"location": {
"lat": 53.9599,
"lon": -1.0873
},
"service_s": 600
}
],
"cancel_job_ids": [
12
]
},
"costing": "auto",
"jobs": [
{
"id": 10,
"location": {
"lat": 52.4862,
"lon": -1.8904
},
"service_s": 300
},
{
"id": 11,
"location": {
"lat": 53.4808,
"lon": -2.2426
},
"service_s": 300
},
{
"id": 12,
"location": {
"lat": 53.8008,
"lon": -1.5491
},
"service_s": 300
}
],
"progress": [
{
"completed_stop_ids": [
10,
11
],
"current_position": {
"lat": 53.4808,
"lon": -2.2426
},
"vehicle": 1
}
],
"vehicles": [
{
"end": {
"lat": 51.5074,
"lon": -0.1278
},
"id": 1,
"start": {
"lat": 51.5074,
"lon": -0.1278
}
},
{
"id": 2,
"start": {
"lat": 52.4862,
"lon": -1.8904
}
}
]
}Responses
result_url, or wait for the signed webhook| Field | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The job id to poll. |
| kind | string | yes | optimise, replan, matrix or coverage. |
| result_url | string | yes | Where to fetch it. The same URL the webhook will carry. |
| status | string | yes | Always queued, the worker has not looked at it yet. |
| units_charged | integer | yes | Quota units this submission drew. Charged now, refunded in full if the job fails. |
Example: A response assembled from this schema's own field examples, enums, defaults and types; not a recorded call
{
"id": "string",
"kind": "string",
"result_url": "string",
"status": "string",
"units_charged": 0
}webhook_urlapplication/problem+json · Problem
unauthorized); the body carries signup, docs and a one-call hint for a free keyapplication/problem+json · Problem
X-PAYMENT). Not problem+jsonapplication/json · X402PaymentRequired
scope-insufficient), a request from an origin the key does not allow (origin-not-allowed), or an account restriction (forbidden)application/problem+json · Problem
webhook_url was given but the key has no webhook signing secretapplication/problem+json · Problem
text/plain
SN_OPTIMISE_MAX_LOCATIONS_ASYNC unique locationsapplication/problem+json · Problem
rate-limited, with Retry-After), or monthly quota exhausted with no payment path (quota-exceeded)application/problem+json · Problem
application/problem+json · Problem
request-timeout)application/problem+json · Problem
Error bodies follow the shared problem model documented on API conventions.
Also under Optimisation and jobs
Generated from https://api.mapmap.ai/openapi.json on 2026-11-12 · operationId post_replan_job