Build a Shipping Feature in 10 Minutes
Add freight shipping to your app using Warp's API. This tutorial walks through building a complete quote to delivery workflow. Works with any language. Even faster with AI coding tools.
10 minutes · Any language · Real freight · 38,000+ carriers
What you will build
A shipping module that connects your application to real freight capacity. By the end of this tutorial, your app will be able to:
- -Accept origin and destination addresses
- -Get instant freight quotes across LTL, box truck, and cargo van
- -Book the selected option
- -Track the shipment in real time
- -Receive webhook notifications for delivery and exceptions
Step 1: Set up your Warp client
Minute 0 to 2. Create a simple wrapper around the Warp API. This handles authentication and provides clean methods for quoting, booking, and tracking. Here it is in Python and Node.js.
Python
import requests
class WarpClient:
BASE_URL = "https://www.wearewarp.com/api/v1"
def __init__(self, api_key: str):
self.headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {api_key}"
}
def quote(self, pickup_zip, delivery_zip, pallets, weight_per_pallet):
# Quote is keyless — no Authorization header required
return requests.post(
f"{self.BASE_URL}/ltl/quote",
headers={"Content-Type": "application/json"},
json={
"origin_zip": pickup_zip,
"destination_zip": delivery_zip,
"pickup_date": "2026-07-24",
"pallets": pallets,
"weight_lbs_per_pallet": weight_per_pallet,
"mode": "LTL"
}
).json()
def book(self, quote_id, pickup, delivery):
return requests.post(
f"{self.BASE_URL}/book",
headers=self.headers,
json={
"quote_id": quote_id,
"pickup_date": "2026-07-24",
"pallets": 2,
"weight_lbs_per_pallet": 400,
"pickup": pickup,
"delivery": delivery
}
).json()
def track(self, shipment_id):
return requests.get(
f"{self.BASE_URL}/track",
headers=self.headers,
params={"booking_id": shipment_id}
).json()
warp = WarpClient("wak_live_YOUR_KEY")Node.js
const BASE_URL = "https://www.wearewarp.com/api/v1";
class WarpClient {
constructor(apiKey) {
this.headers = {
"Content-Type": "application/json",
"Authorization": "Bearer wak_live_YOUR_KEY",
};
}
async quote(originZip, destinationZip, pallets, weightLbsPerPallet) {
// Quote is keyless — no Authorization header required
const res = await fetch(BASE_URL + "/ltl/quote", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
origin_zip: originZip,
destination_zip: destinationZip,
pickup_date: "2026-07-24",
pallets,
weight_lbs_per_pallet: weightLbsPerPallet,
mode: "LTL",
}),
});
return res.json();
}
async book(quoteId, pickup, delivery) {
const res = await fetch(BASE_URL + "/book", {
method: "POST",
headers: this.headers,
body: JSON.stringify({
quote_id: quoteId,
pickup_date: "2026-07-24",
pallets: 2,
weight_lbs_per_pallet: 400,
pickup,
delivery,
}),
});
return res.json();
}
async track(shipmentId) {
const res = await fetch(BASE_URL + "/track?booking_id=" + shipmentId, {
method: "GET",
headers: this.headers,
});
return res.json();
}
}
const warp = new WarpClient("wak_live_YOUR_KEY");Replace wak_live_YOUR_KEY with the key from your Warp dashboard. All requests go to https://www.wearewarp.com/api/v1 with the Authorization Bearer header for authentication.
Step 2: Get freight quotes
Minute 2 to 4. Call the quote method for the mode that fits your freight (LTL, FTL, cargo van, or box truck) with origin/destination zip codes and item dimensions. Each mode is its own keyless endpoint — for a side-by-side comparison, fire the four calls in parallel and pick the best response.
Python: Get a quote
# Get a quote from LA to Phoenix (keyless — no API key needed)
quote = warp.ltl_quote(
origin_zip="90001",
destination_zip="85001",
pickup_date="2026-07-24",
pallets=2,
weight_lbs_per_pallet=400,
commodity="general freight",
length_in=48, width_in=40, height_in=48,
)
print(f"Quote ID: {quote['quote_id']}")
print(f"Price: ${quote['price_usd']}")
print(f"Transit: {quote['transit_days']} days")
print(f"Delivery: {quote['delivery_date']}")The response includes a quote_id that you pass to the booking endpoint in the next step. Quotes include carrier, transit time, mode, and rate fields.
Step 3: Book the shipment
Minute 4 to 6. Pass the quote ID along with full pickup and delivery details. Warp confirms the booking and returns a tracking number immediately.
Python: Book a shipment
# Full pickup and delivery details
pickup_info = {
"company": "Sender Co",
"street": "123 Warehouse Blvd",
"city": "Los Angeles",
"state": "CA",
"zip": "90001",
"contact": "Dispatch Team",
"phone": "3105551234",
"email": "dispatch@example.com"
}
delivery_info = {
"company": "Receiver Co",
"street": "456 Distribution Dr",
"city": "Phoenix",
"state": "AZ",
"zip": "85001",
"contact": "Receiving Dock",
"phone": "6025551234",
"email": "receiving@example.com"
}
# Book with the quote_id from step 2
booking = warp.book(quote["quote_id"], pickup_info, delivery_info)
shipment = booking
print(f"Shipment ID: {shipment['shipment_id']}")
print(f"Tracking: {shipment['tracking_number']}")
print(f"Order ID: {shipment['order_id']}")The booking response includes the shipment_id, tracking_number, and order_id. Save all three; use the shipment_id with the tracking endpoint.
Step 4: Track the shipment
Minute 6 to 8. Use the tracking number to get the current status, location, and full event history. Warp provides granular statuses from pickup through delivery, not just "in transit" and "delivered."
Python: Track a shipment
# Track using the shipment_id from the booking response
result = warp.track(shipment["shipment_id"])
tracking = result["tracking"]
print(f"Status: {tracking.get('statusInfo', {}).get('status')}")
# Store the full tracking payload in your app
print(tracking)Each event in the history includes a timestamp, status code, location, and description. Statuses include pickupSuccessful, inRouteToDelivery, arrivedAtWarehouse, departedFromWarehouse, arrivedAtDelivery, and delivered among others.
Step 5: Set up webhooks
Minute 8 to 10. Instead of polling the tracking endpoint, register a webhook URL in your Warp dashboard and receive real time status events pushed directly to your application. Here is a simple Flask handler that processes delivery and exception events.
Python: Webhook handler
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route("/webhooks/warp", methods=["POST"])
def warp_webhook():
event = request.json
if event["status"] == "delivered":
# Shipment delivered. Update your order system.
order_id = event["order_id"]
tracking = event["tracking_number"]
print(f"Delivered: {tracking} for order {order_id}")
# update_order_status(order_id, "delivered")
elif event["status"] == "exception":
# Something went wrong. Alert your ops team.
print(f"Exception on {event['tracking_number']}: {event['description']}")
# send_alert(event)
elif event["status"] == "pickupSuccessful":
# Freight picked up. Notify your customer.
print(f"Picked up: {event['tracking_number']}")
# notify_customer(event)
return jsonify({"received": True}), 200
# Register this URL in your Warp dashboard under WebhooksWarp pushes events as shipments move through each status. Your handler receives the full event payload including tracking number, order ID, status, timestamps, and GPS coordinates. No polling required.
Ship your first load
You have everything you need. Pick the path that fits your workflow.
Even faster with AI coding tools
Everything above took 10 minutes to code manually. With Claude Code, Cursor, or another AI coding tool, you can describe the entire shipping feature in natural language and have the AI generate it. Tell it: "Add a freight shipping module to this app. Use Warp's API. Support quoting, booking, and tracking." The AI reads the docs and writes the integration.
The Warp Agent CLI adds another option. AI agents running in terminals can call warp-agent ltl quote, warp-agent book, and warp-agent track as shell commands without writing any integration code at all.
What modes are available
One keyless endpoint per mode, identical request shape. Pick the path that fits the freight — or fire all four in parallel for a comparison.
LTL
1 to 12 pallets
Less than truckload freight moves through Warp operated cross dock facilities. Consolidated with other shipments for cost efficiency. 38,000+ carriers.
Box Truck
26 foot, liftgate equipped
Dedicated 26 foot box trucks with liftgate standard. Temperature controlled available. Ideal for mid size freight that needs dedicated handling.
Cargo Van
Cartons, cases, parcels, or up to 3 pallets
Same day dispatch for urgent freight. Fastest vehicle type in the Warp network. 14,000+ cargo vans and box trucks available.
Truckload
Dry van and reefer
Full truckload capacity up to 44,000 lbs. Dry van and refrigerated options. Direct lanes with dedicated trailers.
Frequently asked questions
What programming languages work with Warp API?
Any language that can make HTTP requests. The API is standard REST with JSON. Python, Node.js, Go, Ruby, Java, PHP, Rust, or any other language.
Do I need an SDK to build a shipping app on Warp?
No. The API works with plain HTTP requests. Warp also provides client libraries for Python and Node.js if you prefer.
Can I use this in production?
Yes. The same API handles production freight for thousands of shippers. Start with test mode for development, then switch to live when ready.
How much does it cost?
No software fees. No API call charges. You pay when you ship with all inclusive per pallet pricing. No fuel surcharges or hidden fees.
What if I need help integrating?
Warp's developer team can help with integration. Start with the public docs at wearewarp.com/freight-api or talk to the Warp team at wearewarp.com/book-a-meeting.
Related pages
From zero to shipping in 10 minutes.
One API key. Three endpoints. Real freight capacity across 38,000+ carriers. Start building now.
10 minutes · Any language · Real freight · 38,000+ carriers