---
title: "Queue plan"
method: POST
path: "/lots/{id}/plan"
tags: ["lots"]
---

# Queue plan

`POST /lots/{id}/plan`

## Request

- Base URL: `https://api.vepathos.com`
- URL: `https://api.vepathos.com/lots/{id}/plan`
- Auth: API key in header `Authorization`

Sends the lot to the optimizer. No body. The lot moves to `PROCESSING`.

Returns `409` when the lot is already `PROCESSING` or `OPTIMIZING`, and `422` when the fleet has no vehicles, the lot has no deliveries or its stop bounds cannot be met. Queueing a `PROCESSED` lot starts a fresh plan.

## Path parameters

- `id` integer, required

## Response `202`

Plan queued. Returns the optimizer async session id for progress polling.

- QueuePlanResponse
  - `code` integer, required
  - `message` string, required
  - `session_id` string, uuid, required: Optimizer run id. Also returned in `X-Optimizer-Session-Id`.
  - `optimizer_session_id` string, uuid, required: Same UUID as session_id.

## Other responses

- `401`: Missing, expired or invalid access token.
- `403`: A plan quota or optimization option blocks the request. `reason` names the limit. Nothing is reserved or charged.
- `404`: The resource does not exist in your account.
- `409`: The lot is already `PROCESSING` or `OPTIMIZING`.
- `422`: The body or a parameter does not match the schema.

---

[API](https://skmtc.dev/vepathos/apis/vepathos-route-optimization-api.md) · [All operations](https://skmtc.dev/vepathos/apis/vepathos-route-optimization-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vepathos/apis/vepathos-route-optimization-api/revisions/00caa1ca62d9?raw)
