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:
- Access to a FreightCake organization
- 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. A key prefixed
fk_test_reads and writes isolated test-mode data. Carrier responses depend on the test integrations configured for your organization. Switch to afk_live_key only for production operations.