api.automapa.comv3 - all systems normal

Optimise stop order (async)

Routes.optimizeQueue

Submit 3–50 points for asynchronous stop-order optimization. Use requestId to retrieve the result.

POST/v3/Routes/optimizeQueueapi.automapa.com

Body parameters

BodyTypeDescription
pointsobject[] REQUIREDArray of { id, x, y } points.
optimizeBystring REQUIRED"time" or "distance".
routeobject REQUIREDRequired route options. Send an empty object to use defaults.
objectobject REQUIREDRequired vehicle configuration. For a car, send {"type":"car"}.

Example request

{
    "points": [
        {
            "id": "Warszawa",
            "x": 21.0020722,
            "y": 52.2278077
        },
        {
            "id": "Krakow",
            "x": 19.9277367,
            "y": 50.0548261
        },
        {
            "id": "Bydgoszcz",
            "x": 18.0269292,
            "y": 53.1119322
        },
        {
            "id": "Gdansk",
            "x": 18.6453959,
            "y": 54.3471121
        }
    ],
    "optimizeBy": "time",
    "route": {
        "start": "NOW",
        "avoidTolls": true,
        "avoidFerries": true,
        "avoidHighways": false
    },
    "object": {
        "type": "truck",
        "truckParams": {
            "axleLoad": 8,
            "truckWeight": 40,
            "truckLength": 16.2,
            "truckWidth": 2.5,
            "truckHeight": 4
        }
    }
}

Example response

{
    "result": {
        "requestId": "reef1.220830.123557.targeo.0x7DB3"
    }
}

result fields

result fieldsTypeDescription
requestIdstringToken used to fetch the result via optimizeQueueResult.
resultReadybooleanIf present, false means pending and true means ready.