Skip to navigation

FTL Trips overview

Move containers with your own drivers or with transporters

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.

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

optional Your fleet A transporter A transporter Get reference data (API) Create FTLs (API) Create a trip, add FTLs as stops (web) Optimize the trip (web) Who drives? Add or remove stops (API) Assign your driver (API) Outsource directly (web) Send offers (web) Transporter accepts (transporter API) Transporter assigns its driver(transporter API) Driver runs the trip
StepWhereGuide
1. Get shipping lines, payment terms, container products, ports and driversAPIGet reference data
2. Create FTLsAPICreate FTLs
3. Create a trip, add the FTLs as stops, and optimize itWeb appBuild trips
4. Read trips, add or remove stops until the trip startsAPIManage stops
5a. Run the trip with your own driverAPIAssign your driver
5b. Outsource the trip directly or through offersWeb appOutsource a trip
6. The transporter accepts and assigns its driverTransporter APITransporter side

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 userTransporter account
Who uses itYour company’s integrationA transporter working for you: the owner or a team member
LoginPOST /api/v1/partners/loginPOST /api/v1/partners/transporters/login
CredentialsThe API user Mile set up for your companyThe email or username and password the transporter uses on the Mile web app
Token works onEvery /api/v1/partners/... endpoint except /transportersOnly /api/v1/partners/transporters/...
What it doesFTLs, trip stops, your own driversAnswers 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 before your first call.

Glossary

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.

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.

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

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.

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.

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.

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

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.

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.

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.

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.

Mile’s estimate of the truck’s day: when it leaves, reaches each stop, waits, rests and gets back. See ETA plan.

Which id is which

FieldWhat it identifiesWhere you get it
shipment_idAn FTLdata.id from create an FTL, or stops[].shipment.id
customer.id, consignee.idA customer or consignee you already usedconsigner.id and consignee.id in an FTL
tripIdA tripid in list trips
order_idA stop on a tripstops[].order_id
driver_idA driverYour drivers list, or the transporter’s drivers list
partner_idA transporterpartner.id on a trip outsourced to it
offer_idOne offer to one transporteroffer_id in the transporter’s offers list