> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.milenow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.milenow.com/_mcp/server.

# FTL Trips overview

The FTL Trips API lets you create FTLs (full truck loads), read and change the trips that carry them, and run them with your own drivers. Some steps are done in the **Mile web app**: creating a trip, optimizing it, and assigning or offering it to transporters. Transporters use their own endpoints to answer offers and assign their drivers.

> **Info**
>
> Need to create trips, optimize them or assign them to transporters through the API? Contact Mile support and we will enable it for your account.

## How it works

```mermaid
flowchart TD
    A["Get reference data (API)"] --> B["Create FTLs (API)"]
    B --> C["Create a trip, add FTLs as stops (web)"]
    C --> K["Optimize the trip (web)"]
    K --> D{Who drives?}
    K -.->|optional| L["Add or remove stops (API)"]
    L -.-> D
    D -->|Your fleet| E["Assign your driver (API)"]
    D -->|A transporter| F["Outsource directly (web)"]
    D -->|A transporter| G["Send offers (web)"]
    G --> H["Transporter accepts (transporter API)"]
    F --> I["Transporter assigns its driver (transporter API)"]
    H --> I
    E --> J[Driver runs the trip]
    I --> J
```

| Step                                                                        | Where           | Guide                                                  |
| --------------------------------------------------------------------------- | --------------- | ------------------------------------------------------ |
| 1. Get shipping lines, payment terms, container products, ports and drivers | API             | [Get reference data](/ftl-trips/guides/reference-data) |
| 2. Create FTLs                                                              | API             | [Create FTLs](/ftl-trips/guides/create-ftls)           |
| 3. Create a trip, add the FTLs as stops, and optimize it                    | Web app         | [Build trips](/ftl-trips/guides/build-trips)           |
| 4. Read trips, add or remove stops until the trip starts                    | API             | [Manage stops](/ftl-trips/guides/manage-stops)         |
| 5a. Run the trip with your own driver                                       | API             | [Assign your driver](/ftl-trips/guides/assign-driver)  |
| 5b. Outsource the trip directly or through offers                           | Web app         | [Outsource a trip](/ftl-trips/guides/outsource)        |
| 6. The transporter accepts and assigns its driver                           | Transporter API | [Transporter side](/ftl-trips/guides/transporter)      |

## Two accounts

The API has two kinds of account. Each has its own login and token, and a token works only on its own endpoints.

|                | Company API user                                                                        | Transporter account                                                         |
| -------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| Who uses it    | Your company's integration                                                              | A transporter working for you: the owner or a team member                   |
| Login          | [`POST /api/v1/partners/login`](/api-reference/login/post-app-apiv-1-trackingapi-index) | `POST /api/v1/partners/transporters/login`                                  |
| Credentials    | The API user Mile set up for your company                                               | The email or username and password the transporter uses on the Mile web app |
| Token works on | Every `/api/v1/partners/...` endpoint except `/transporters`                            | Only `/api/v1/partners/transporters/...`                                    |
| What it does   | FTLs, trip stops, your own drivers                                                      | Answers offers, sees its trips, assigns its own drivers                     |

Transporter accounts exist once you approve the transporter in the Mile web app. Read [authentication and errors](/ftl-trips/authentication) before your first call.

## Glossary

#### FTL (full truck load)

A cargo booking that fills one truck: FTL number, bill of lading (BL) number, customer, consignee and one or more containers. `created_on` is the **pickup day** and `expected_on` the **delivery day**.

The API calls an FTL a **shipment** in endpoint paths and field names: `/shipments`, `/shipment-trips`, `shipment_id`, `shipment_no`, `stops[].shipment`. These names are real and stay as they are. Wherever you see "shipment" in a path, field or API message, read it as FTL.

#### Customer and consignee

The customer (shown as `consigner` in responses) is the shipper. By default the container is picked up at the customer's address. The consignee is the receiver, where the container is delivered.

#### Container

One container on an FTL: number, seal number, size (`20ft`, `40ft`, `40ft HC`, `45ft HC`), product, quantity and weight.

#### Trip

The work for one truck: a list of stops, the order to do them in, and an ETA plan. A trip is run by one driver, either yours or a transporter's.

#### Stop

One FTL on a trip: where and when it is picked up, and where and when it is delivered. A stop is identified by its `order_id`.

#### Outbound and return leg

Every stop is on the outbound leg (the default) or the return leg. Return stops are done after the outbound deliveries, for example taking empty containers back to the port.

#### Round trip

A trip with at least one return stop. Its `type` is `round_trip`. A trip with only outbound stops has `type` `outbound`.

#### Transporter (partner)

An outside trucking company that works for you. Company endpoints and the web app call it a partner (`partner`, `partner_id`). Transporter endpoints call it a transporter. They are the same thing. The `/api/v1/partners` prefix is shared by all endpoints and does not mean transporter.

#### Outsource

Give a trip to a transporter, in the Mile web app. You can do it directly, or through offers that the transporter accepts or rejects.

#### Offer

An offer asks one transporter to take one trip before a deadline. You send offers from the web app, for one or more trips, each with an ordered list of transporters to try.

#### Own driver and transporter driver

Your own drivers work for your company and go on trips you keep. Transporter drivers belong to a transporter. Through the API, only that transporter can put them on a trip, and only on trips outsourced to it.

#### ETA plan

Mile's estimate of the truck's day: when it leaves, reaches each stop, waits, rests and gets back. See [ETA plan](/ftl-trips/business-rules#eta-plan).

## Which id is which

| Field                         | What it identifies                       | Where you get it                                       |
| ----------------------------- | ---------------------------------------- | ------------------------------------------------------ |
| `shipment_id`                 | An FTL                                   | `data.id` from create an FTL, or `stops[].shipment.id` |
| `customer.id`, `consignee.id` | A customer or consignee you already used | `consigner.id` and `consignee.id` in an FTL            |
| `tripId`                      | A trip                                   | `id` in list trips                                     |
| `order_id`                    | A stop on a trip                         | `stops[].order_id`                                     |
| `driver_id`                   | A driver                                 | Your drivers list, or the transporter's drivers list   |
| `partner_id`                  | A transporter                            | `partner.id` on a trip outsourced to it                |
| `offer_id`                    | One offer to one transporter             | `offer_id` in the transporter's offers list            |

#### [Authentication and errors](/ftl-trips/authentication)

Logins, tokens, rate limits and status codes.

#### [Business rules and FAQ](/ftl-trips/business-rules)

Dates, statuses, ETA plan and the rules that trip people up.