> 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.

# 1. Get reference data

An FTL refers to values that already exist in your account: shipping lines, payment terms, container products, document types and ports. Look them up first. For each one you can send the **name** or its **id**.

## FTL options

[`GET /api/v1/partners/shipments/options`](/ftl-trips/api-reference/ftl/get-ftl-options) returns every list in one call.

```bash
curl "https://lastmile.milenow.com/index.php/api/v1/partners/shipments/options" \
  -H "Authorization: Bearer $MILE_TOKEN"
```

```json
{
  "status": 200,
  "msg": "Shipment options fetched successfully",
  "msgs": [],
  "data": {
    "payment_terms": [{ "id": 32, "name": "Company Credit" }],
    "shipping_lines": [{ "id": 10, "name": "MAERSK" }, { "id": 11, "name": "MSC" }],
    "shipping_methods": [{ "id": 3, "name": "land" }],
    "categories": [
      {
        "id": 702810,
        "name": "Containers",
        "products": [
          { "id": 875776, "name": "20ft GP Container - Full" },
          { "id": 875777, "name": "40ft GP Container - Full" },
          { "id": 875789, "name": "40ft Container - Empty" }
        ]
      }
    ],
    "container_sizes": ["20ft", "40ft", "40ft HC", "45ft HC"],
    "document_types": [{ "id": 1, "name": "Bill of Landing" }],
    "vendor_required": false,
    "vendors": [],
    "vendor_categories": [],
    "countries": [{ "id": 194, "name": "Saudi Arabia", "short_name": "SA" }]
  }
}
```

| List                            | Use it for                                               |
| ------------------------------- | -------------------------------------------------------- |
| `shipping_lines`                | `shipping_line` or `shipping_line_id` (required)         |
| `payment_terms`                 | `payment_term` or `payment_term_id` (required)           |
| `categories[].products`         | Each container's `category` and `product` (required)     |
| `container_sizes`               | Each container's `size` (required)                       |
| `document_types`                | Each document's `type` (optional)                        |
| `vendors`                       | `vendor`. Required only when `vendor_required` is `true` |
| `shipping_methods`, `countries` | Optional fields                                          |

These values change rarely. Cache them and refresh them daily.

> **Tip**
>
> A wrong name returns 412 with the valid values in the message, for example `payment_term "Cash" not found. Valid values: Company Credit`.

## Ports

You need a port only when the container is picked up at a port. Search with at least 2 characters of the name, code or UN/LOCODE using [`GET /api/v1/partners/shipments/ports`](/ftl-trips/api-reference/ftl/search-ports). It returns up to 20 ports.

```bash
curl -G "https://lastmile.milenow.com/index.php/api/v1/partners/shipments/ports" \
  -H "Authorization: Bearer $MILE_TOKEN" \
  --data-urlencode "search=Jeddah"
```

```json
{
  "status": 200,
  "msg": "Ports fetched successfully",
  "msgs": [],
  "data": [
    { "id": 61021, "name": "Jiddah", "alternate_names": "Jidda", "code": "48140", "unlocode": "SA JED", "country": "Saudi Arabia" }
  ]
}
```

In an FTL, send the port as its `id` (`destination_port_id`), its `name`, its `code` or its `unlocode`, for example `"destination_port": "SA JED"`. No match returns 200 with an empty `data` list.

## Drivers

To run trips with your own fleet, list your drivers with the existing [drivers endpoint](/api-reference/drivers/get-app-apiv-1-trackingapi-getalldrivers). Use `id` as `driver_id`.

```bash
curl "https://lastmile.milenow.com/index.php/api/v1/partners/drivers" \
  -H "Authorization: Bearer $MILE_TOKEN"
```

> **Warning**
>
> This list can include drivers who belong to your transporters. You cannot put them on your trips through the API: it returns 412 `driver_id ... belongs to the transporter ...`. Through the API, only the transporter can assign them, and only to trips outsourced to it.

Next: [create FTLs](/ftl-trips/guides/create-ftls).