Walkthroughs
Walkthroughs
Step-by-step recipes for the most common FreightCake API integrations.
These walkthroughs show end-to-end integrations for the three workflows that cover ~95% of FreightCake API usage:
| Walkthrough | What you build |
|---|---|
| Rate shop LTL | Quote a multi-stop LTL shipment, compare carriers, pick a winner |
| Create a shipment | Convert a quote to a booked shipment, generate the BOL, get pickup confirmation |
| Track a shipment | Poll for status updates, subscribe to webhooks, handle delivery events |
Each walkthrough includes:
- A copy-pasteable TypeScript example using
@freightcake/sdk - The equivalent raw
fetchcall for languages without an SDK - Common gotchas and how to handle them
- Links to the underlying API reference
Prerequisites
Every walkthrough assumes you have:
- A FreightCake account (sign up at app.freightcake.com)
- A test API key (see Authentication)
- Node.js 20+ (for the TypeScript examples)
Install the SDK:
pnpm add @freightcake/sdk
# or
npm install @freightcake/sdkInitialize the client once and reuse it across requests:
import { FreightCake } from '@freightcake/sdk'
export const fc = new FreightCake({
apiKey: process.env.FREIGHTCAKE_API_KEY!,
// Test keys are auto-routed to the sandbox; no separate env flag needed.
})Test mode is automatic. Any key prefixed
fk_test_returns mock-carrier rates and never touches a real carrier API. Switch to afk_live_key in production — no other code changes required.