> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lanesurf.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> You are reading the Lanesurf Agent API docs. Start with /for-ai-agents.md for the rules an agent must follow.
> The API is at https://agent.lanesurf.com and the MCP server at https://agent.lanesurf.com/mcp. Lanesurf doesn't send webhooks: poll.
> Limits: /rate-limits.md. Keys: /api-keys.md. Safe retries: /idempotency.md. Every route on one page: /api-reference.md.
> Always confirm with the person before accepting a carrier offer or bidding on a load. Never reveal an API key, and never show broker contact details to a carrier.
> The full contract is at /openapi.yaml.
> Sign up with POST /v1/signup (carrier or broker, a work email, an MC and/or DOT number), then POST /v1/signup/{signup_id}/verify. Follow next_step on every signup answer.

# Manage a load

> Edit, pause, resume, reopen or delete a load you posted.

Anything the Lanesurf dashboard can do to a load, your agent can do through the API. Every change answers with
the load's status, like `GET /v1/loads/{id}`, including what was posted (`load`). `{id}` is the `load_id` or the
`tms_id`.

> [!WARNING]
>
> Confirm every change with the person first. `resume` and `reopen` start contacting carriers again (real
> emails and calls).

| Situation | REST | MCP tool |
| - | - | - |
| Rate, dates, stops or details changed | `PATCH /v1/loads/{id}` | `edit_load` |
| Shipper put the load on hold | `POST /v1/loads/{id}/pause` | `pause_load` |
| Back on | `POST /v1/loads/{id}/resume` | `resume_load` |
| Carrier fell off after a cover | `POST /v1/loads/{id}/reopen` | `reopen_load` |
| Shipper cancelled it | `DELETE /v1/loads/{id}` | `delete_load` |
| You covered it yourself | `POST /v1/loads/{id}/covered` | `mark_covered` |

Don't post a load again or mark it covered to change or cancel it: that contacts the same carriers twice, or
records a cover that didn't happen.

## Edit

Send only the fields that change, in the same shape as [posting a load](https://docs.lanesurf.com/brokers/cover-a-load.md), plus
`reference_number`:

```bash theme={null}
curl -X PATCH https://agent.lanesurf.com/v1/loads/$LOAD_ID \
  -H "Authorization: Bearer $LANESURF_API_KEY" -H "Content-Type: application/json" \
  -d '{"rate_max": 1950, "reference_number": "PO-4471"}'
```

* **Stops:** `origins` and `destinations` go together and replace every stop. Send all of them, as the load's
  `load` shows them, with your change. A new stop missing a city, state or date answers
  `422 missing_fields`.
* **Rates:** on a load with no rate yet, one of `rate_min` / `rate_max` sets both, as when posting. Otherwise
  only the one you send changes.
* Numbers may be numbers or strings (`1950`, `"$1,950"`); one that isn't a number answers `400`.
  `currency` must be USD, CAD or MXN.
* Lanesurf re-reads the load. Carriers already contacted keep the details they were given.
* A **paused** load can change everything but its stops, temperature and pallets: resume it first, or change
  those in the dashboard.
* A **covered** load needs `reopen` first. A **deleted** one can't change.

## Pause and resume

`pause` stops Lanesurf contacting carriers and takes the load off the market; it shows as `inactive`.
`resume` puts it back, with outreach as it was before the pause: a load that had no outreach still has none.

* Both are safe to call twice.
* Resume answers `409 invalid_state` when the first pickup has passed. Change the dates in the dashboard, or
  post the load again.

## Reopen

For a covered load whose carrier fell off, or whose cover fell through. The accepted offer becomes declined (or
the covered-elsewhere mark is removed) and the load looks for a carrier again. The other offers on it can be
accepted.

* Nothing changes when the first pickup has passed (`409 invalid_state`).
* On a paused load that isn't covered, `reopen` does what `resume` does.

## Delete

Deletes the load, as the dashboard does: Lanesurf stops all work on it and it shows as `deleted`. It can't be
brought back through the API. Safe to call twice.

## When a change isn't allowed

`409 invalid_state` means the load's state doesn't allow the change. `error` says why (deleted, covered,
paused, or pickup passed) and `next_step` says what to do. See [Errors](https://docs.lanesurf.com/errors.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.