Working examples that quote → book → track an LTL shipment against the Warp freight API. Same flow in six languages.
| Language | Path |
|---|---|
| curl (bash) | curl/ |
| Node.js | node/ |
| Python | python/ |
| Go | go/ |
| Ruby | ruby/ |
| PHP | php/ |
Three endpoints. Bearer auth with a wak_* token.
| Step | Method + path | Body | Returns |
|---|---|---|---|
| 1. Quote | POST https://www.wearewarp.com/api/v1/warp/freight/quote |
{pickupZip, deliveryZip, pickupDate, pallets, weightPerPallet} |
{ok, quotes: [{quoteId, carrier, rate, transitDays, mode}]} |
| 2. Book | POST https://www.wearewarp.com/api/v1/warp/freight/book |
{quoteId, pickupDate, pallets, weightPerPallet, pickup: {…}, delivery: {…}} |
{ok, trackingNumber, orderId, shipmentId, charged, stripePaymentIntentId} |
| 3. Track | GET https://www.wearewarp.com/api/v1/warp/freight/track/{trackingNumber} |
— | {shipmentId, status, events: […]} |
All examples ship a 1-pallet 500-lb LTL from 90007 (Los Angeles) to 90038
(Hollywood) with pickup on 2026-06-25 — that lane is known to return a Warp
quote so the examples actually run end-to-end against the live API.
npm install -g @warpfreight/cli-agent
warp-agent signup
# wak_live_* + wak_test_* saved to ~/.warp/config.jsonOr grab a key from your Warp portal after signing up.
Set the environment variable each example reads:
export WARP_API_KEY="wak_test_..." # sandbox — no real charges
# or
export WARP_API_KEY="wak_live_..." # production — real labels, real money# curl — no deps
./curl/quote-book-track.sh
# node 20+ — no deps
node node/quote-book-track.mjs
# python 3.8+ — no deps (uses stdlib urllib)
python3 python/quote_book_track.py
# go 1.21+
go run go/main.go
# ruby 3+
ruby ruby/quote_book_track.rb
# php 8+
php php/quote_book_track.php- Sends a quote request → captures the Warp
quoteIdfrom the response - Books the quote with pickup + delivery addresses → captures the tracking number
- Tracks the shipment by tracking number → prints current status
Each runs as a single script with no framework dependencies. Read time per file: ~2 minutes.
| Key prefix | Behavior |
|---|---|
wak_test_* |
Sandbox. Quotes are real (read-only); bookings return synthetic tracking numbers and never charge a card. |
wak_live_* |
Production. Bookings dispatch real carriers and charge your card on file. |
The book step in each example charges ~$98.36 (1 pallet × 500 lb on the
90007→90038 lane) when run with a live key. Use wak_test_* if you're just
exploring.
warp-agent-mcp— MCP server for AI agents (Claude Desktop / Cursor / Claude Code)warp-cli-agent— CLI for scripting + CI
MIT © Warp Technology, Inc.