FreightCake
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:

WalkthroughWhat you build
Rate shop LTLQuote a multi-stop LTL shipment, compare carriers, pick a winner
Create a shipmentConvert a quote to a booked shipment, generate the BOL, get pickup confirmation
Track a shipmentPoll for status updates, subscribe to webhooks, handle delivery events

Each walkthrough includes:

  • A copy-pasteable TypeScript example using @freightcake/sdk
  • The equivalent raw fetch call for languages without an SDK
  • Common gotchas and how to handle them
  • Links to the underlying API reference

Prerequisites

Every walkthrough assumes you have:

  1. A FreightCake account (sign up at app.freightcake.com)
  2. A test API key (see Authentication)
  3. Node.js 20+ (for the TypeScript examples)

Install the SDK:

pnpm add @freightcake/sdk
# or
npm install @freightcake/sdk

Initialize 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 a fk_live_ key in production — no other code changes required.

On this page