1. Pick the path
If you can’t tell, ask: “Do you have a load that needs a truck, or a truck that needs a load?“
2. Get a key
- Use the key the person already gave you. Send it as
Authorization: Bearer ls_live_…. - No key: sign them up. Every signup reply, including errors, has
next_step; follow it. Over HTTP usePOST /v1/signup(no key needed). An MCP app with no key gets the Lanesurf sign-in page, where the person can sign up.
- Ask for the carrier’s MC and/or DOT number and their work email (not a free mailbox such as Gmail, Yahoo or Outlook; see Carrier sign up for the list; there is no phone signup).
POST /v1/signupwithrole: "carrier". Tell them where the code went (sent_to).- Ask for the 8-digit code, then
POST /v1/signup/{signup_id}/verifywithcode. - Give them
api_keyto store securely. It’s shown once. - Read
principal.verification.needs_review: tell them their carrier account is under review; they can post and manage trucks and lanes and list bids, but can’t search loads, read a load, get truck matches, see outreach they received or bid until Lanesurf verifies it.
- Ask for the brokerage’s MC and/or DOT number and their work email.
POST /v1/signupwithrole: "broker".- Ask for the code and their name, job title and company name (phone and website optional),
then
POST /v1/signup/{signup_id}/verifywithcode,name,job_title,company_name. A missing one answers422 missing_fieldsbefore a code attempt is used: ask for it and send the same code again. - Give them
api_keyto store securely. It’s shown once. - Tell them Lanesurf reviews new brokerages before carrier outreach starts (
activated: false). They can fill in their setup (PATCH /v1/broker/setup) and post loads, which showstalleduntil then.
GET /v1/me if you’re not sure who a key belongs to.
3. Ask only for what’s missing
Turn what the person said into the fields in the schema (LoadFields for loads, TruckInput for
trucks). If the reply is 422 with code: missing_fields:
- Read the
missinglist. It names exact fields (e.g.destinations[0].delivery_ready_date). - Ask the person for those items only. One short question.
- Add them and send the whole load (or truck) again. Nothing was created yet.
- For a load,
201withstatus: sourcingmeans Lanesurf is working it. Every load answer hasnext_step; follow it.
assumed and tell the
person what Lanesurf filled in (for example, commodity “General freight”).
Every load post needs an Idempotency-Key header (a fresh UUID per load; over MCP, idempotency_key).
Without it you get 400 idempotency_key_required (missing fields are reported first). If the call times
out, retry with the same key, the same API key and the same load: you get the original load back
(200) with its current status, never a second one.
400 load_rejected: Lanesurf couldn’t process the load. Don’t send it again unchanged. Check the stop cities, states, zip codes and dates with the person, then send it with a new key.422 idempotency_key_reused: the key was already used for a different load. Nothing was created. Use a new key for a new load.409 idempotency_in_progress: the first post is still running. WaitRetry-Afterseconds, then retry with the same key and load.
4. Capture the carrier basics
Every carrier interaction should end with three things on record: the MC or DOT number, the dispatch contact (email or phone), and the carrier’s terminals (the lanes its trucks run). Save terminals withPOST /v1/carrier/lanes (see Lanes). When you post a truck, put
where it wants to go in destinations. Posted trucks and saved lanes are how Lanesurf pitches the
carrier loads: its reps email or call the carrier about matching loads (verified carriers only). Remove a
truck once it’s loaded.
5. Confirm before you commit
Before you accept an offer or bid on a load, show the person:- the load (lane, dates, equipment),
- the carrier or the load id,
- the rate,
{"rate": 1850}; over MCP, rate). If the carrier
changed its rate since, nothing is accepted and you get 409 offer_changed with current_rate. Tell the
person the new rate and ask again.
6. Know what Lanesurf does and doesn’t do
- Accepting an offer records the choice and stops Lanesurf’s outreach. Lanesurf does not contact the
carrier or send a rate confirmation: give the person the winner’s
contact_email/contact_phoneso their team reaches out to book, and sends the rate confirmation from their own TMS. - Declining an offer only records the choice. It doesn’t stop Lanesurf’s outreach to that carrier.
- When posting a load returns
post_with, tell the broker to use that email and phone wherever they advertise the load, so carrier replies reach Lanesurf. Nopost_with(common for app sign-ins): say nothing about it; Lanesurf’s own outreach runs either way. - If the broker covered the load another way, call
POST /v1/loads/{id}/coveredso Lanesurf stops. - To change a load use
PATCH /v1/loads/{id}; on hold, pause it; cancelled, delete it; carrier fell off, reopen it. Never post it again or mark it covered to change or cancel it. See Manage a load. - With many open loads,
GET /v1/loads?needs_decision=trueshows which have offers waiting, in one call. - A
409 already_coveredmeans the load already has a winner, was marked covered, or is gone. Read the load again and tell the person.
7. Poll politely
- Check a load with
GET /v1/loads/{id}, or bids withGET /v1/carrier/bids, about every 2 to 5 minutes, not every second. Stop polling a load when its status iscovered,inactiveordeleted. - Each API key can make up to 120 requests per minute (counted on each Lanesurf server, so treat it as the most to send). On
429, wait theRetry-Afterseconds. On500,502or503, back off and retry later. - On
400, fix the request. Don’t send the same thing again. - Every answer has an
X-Request-Idheader, and every error arequest_id(over MCP, successful results have it in_meta["lanesurf/request_id"]). When something keeps failing, tell the person to quote it to support@lanesurf.com. See Request IDs.
8. Keep secrets
- Never show, log or repeat an API key. Never put it in a URL.
- Never share one party’s contact details with another. Load search, load details and truck matches hide
the broker’s identity and contacts. Outreach a carrier received (
GET /v1/carrier/outreach) names the brokerage that contacted it, with no contacts. To go for a load, a carrier bids. - Only use data the key gives you for the person you’re working for.