To use Freightos with V0, generate a freight quote comparison UI in V0, then create a Next.js API route at app/api/freightos/route.ts that calls the Freightos WebCargo API using your API key stored in Vercel environment variables. Freightos returns real-time freight rates for air, sea, and land shipments that your V0-generated dashboard can display and compare.
Building a Freight Rate Comparison App with V0 and Freightos
Freightos is the leading digital freight marketplace, powering rate transparency for international shipping across air, ocean, and land carriers. Through its WebCargo API, you can programmatically fetch real-time freight quotes from hundreds of carriers and forwarders, making it possible to build tools that help logistics teams, e-commerce operators, and supply chain managers instantly compare shipping costs without calling freight brokers manually.
For V0 users, the integration pattern is straightforward: V0 generates the quote request form and results display, while a Next.js API route handles the secure communication with Freightos. Since the Freightos API requires authentication with credentials that must never be exposed client-side, all API calls must go through the server-side route handler. Your V0-generated React components collect shipment details from the user and POST them to your API route, which then queries Freightos and returns structured quote data.
One important V0-specific consideration: the Freightos API sometimes uses an asynchronous quote-request model where you first submit a rate request and then poll for results. V0 can generate the polling UI logic, but you will need to structure your API route to handle both the initial request and the status check flow. For most use cases, building a simple quote form that displays the results after a loading state is the practical starting point.
Integration method
V0 generates your freight quote UI components while a Next.js API route handles all communication with the Freightos WebCargo API server-side, keeping your API credentials out of the browser. The API route proxies rate requests to Freightos and returns structured quote data that your V0-generated React components display in a comparison table or dashboard.
Prerequisites
- A V0 account with a Next.js project generated at v0.dev
- A Freightos WebCargo API account — apply at webcargo.co/api for developer access
- Your Freightos API key and any required client credentials from your WebCargo developer portal
- A Vercel account with your V0 project deployed via GitHub
- Familiarity with freight shipping concepts: Incoterms, FCL/LCL, HS codes (helpful but not required)
Step-by-step guide
Generate the Freight Quote UI in V0
Generate the Freight Quote UI in V0
Start by prompting V0 to generate the front-end interface for your freight quote tool. The UI needs two main sections: a quote request form where users enter shipment details, and a results area that displays the carrier quotes returned by the API. For the quote form, the typical Freightos rate request requires origin and destination (usually port codes like SHA for Shanghai or NLRTM for Rotterdam), cargo type (FCL for full container, LCL for less-than-container, or air freight), commodity weight and volume, and optionally an HS code or commodity description. V0 is good at generating clean, accessible form components with Tailwind CSS — tell it exactly what fields you need and what API endpoint the form should POST to. For the results display, a card grid or sortable table works well. Each quote from Freightos includes the carrier name, service type, transit time in days, departure and arrival dates, and the rate. A sortable table that lets users click column headers to re-sort by price or transit time is a practical feature that V0 can generate with a few lines of React state. After V0 generates the components, check that the form's submit handler calls fetch('/api/freightos/quotes', { method: 'POST', ... }) with the correct request body shape. You will define the exact request schema when you build the API route in the next step, so it is fine if the form just sends all the fields as a JSON object for now. Make sure the results component handles the loading state with a spinner or skeleton while the API call is in progress — Freightos quotes can take a few seconds to return.
Create a freight rate quote tool with two panels. Left panel: a form with fields for origin port (text input, e.g. 'SHA - Shanghai'), destination port (text input, e.g. 'NLRTM - Rotterdam'), shipment type (radio: FCL / LCL / Air), weight in kg (number input), and volume in CBM (number input). Include a 'Get Freight Quotes' button. Right panel: show a loading state initially, then display results as cards with carrier logo placeholder, carrier name, transit time in days, departure date, and rate in USD. Sort results by price ascending by default.
Paste this in V0 chat
Pro tip: Ask V0 to include a 'No results found' empty state for when the API returns no quotes for a given route, and an error state for API failures. Freightos may return empty results for routes with limited carrier coverage.
Expected result: V0 generates a freight quote form and results display component. The form collects shipment details and the results area is wired to show quote cards from the API response.
Create the Freightos API Route
Create the Freightos API Route
Now create the Next.js API route that proxies requests to the Freightos WebCargo API. This server-side route keeps your API credentials secure and handles the HTTP communication with Freightos on behalf of your V0-generated frontend. Create the file app/api/freightos/route.ts in your project. The Freightos WebCargo API uses REST endpoints with API key authentication. The primary endpoint for fetching freight rates is typically a POST request to the WebCargo API that accepts your shipment parameters and returns available quotes. Authentication is via an Authorization header with your API key. The WebCargo API may return quotes synchronously for some routes and asynchronously (requiring polling) for others. For a robust implementation, your API route should handle both cases: if the initial response includes quotes directly, return them immediately; if the response includes a quote request ID, return that ID so the frontend can poll a status endpoint. For the initial version, focus on the synchronous flow where quotes are returned directly. Structure the route to accept the form data from your V0 components — origin, destination, cargo details — transform them into the format the WebCargo API expects, make the authenticated request, and return the normalized quote data to the client. Add proper error handling for cases where the API is unavailable or returns an error status code. Note that V0 generates standard Next.js App Router code, which means your route handler uses the Web Fetch API (not the Node.js http module). You can use fetch() natively in your route handler without importing any HTTP library, which keeps the implementation clean.
Create a Next.js API route at app/api/freightos/route.ts that accepts POST requests with { origin, destination, shipmentType, weightKg, volumeCbm } and calls the Freightos WebCargo API to fetch freight rates. Use the Authorization header with FREIGHTOS_API_KEY from environment variables. Return an array of quote objects with fields: carrierId, carrierName, transitDays, departureDate, arrivalDate, rateUsd, serviceType.
Paste this in V0 chat
1import { NextRequest, NextResponse } from 'next/server';23const WEBCARGO_API_URL = 'https://api.webcargo.co/v1';45interface FreightQuoteRequest {6 origin: string;7 destination: string;8 shipmentType: 'FCL' | 'LCL' | 'AIR';9 weightKg: number;10 volumeCbm: number;11}1213interface FreightQuote {14 carrierId: string;15 carrierName: string;16 transitDays: number;17 departureDate: string;18 arrivalDate: string;19 rateUsd: number;20 serviceType: string;21}2223export async function POST(request: NextRequest) {24 try {25 const body: FreightQuoteRequest = await request.json();2627 if (!body.origin || !body.destination) {28 return NextResponse.json(29 { error: 'Origin and destination are required' },30 { status: 400 }31 );32 }3334 const apiKey = process.env.FREIGHTOS_API_KEY;35 if (!apiKey) {36 return NextResponse.json(37 { error: 'Freightos API key not configured' },38 { status: 500 }39 );40 }4142 // Map shipment type to WebCargo format43 const modeMap = { FCL: 'ocean_fcl', LCL: 'ocean_lcl', AIR: 'air' };4445 const quotePayload = {46 origin: { port_code: body.origin.split(' ')[0] },47 destination: { port_code: body.destination.split(' ')[0] },48 cargo: {49 mode: modeMap[body.shipmentType] || 'ocean_fcl',50 weight: { value: body.weightKg, unit: 'kg' },51 volume: { value: body.volumeCbm, unit: 'cbm' },52 },53 };5455 const response = await fetch(`${WEBCARGO_API_URL}/rates`, {56 method: 'POST',57 headers: {58 'Authorization': `Bearer ${apiKey}`,59 'Content-Type': 'application/json',60 'Accept': 'application/json',61 },62 body: JSON.stringify(quotePayload),63 });6465 if (!response.ok) {66 const errorText = await response.text();67 console.error('Freightos API error:', response.status, errorText);68 return NextResponse.json(69 { error: `Freightos API returned ${response.status}` },70 { status: response.status }71 );72 }7374 const data = await response.json();7576 // Normalize the response to our quote format77 const quotes: FreightQuote[] = (data.rates || data.quotes || []).map(78 (rate: Record<string, unknown>) => ({79 carrierId: String(rate.carrier_id || rate.carrierId || ''),80 carrierName: String(rate.carrier_name || rate.carrierName || 'Unknown Carrier'),81 transitDays: Number(rate.transit_days || rate.transitDays || 0),82 departureDate: String(rate.departure_date || rate.departureDate || ''),83 arrivalDate: String(rate.arrival_date || rate.arrivalDate || ''),84 rateUsd: Number(rate.total_price?.amount || rate.rateUsd || 0),85 serviceType: String(rate.service_type || rate.serviceType || body.shipmentType),86 })87 );8889 return NextResponse.json({ quotes, total: quotes.length });90 } catch (error) {91 console.error('Freightos route error:', error);92 return NextResponse.json(93 { error: 'Failed to fetch freight quotes' },94 { status: 500 }95 );96 }97}Pro tip: The WebCargo API response structure may vary depending on your API tier and the type of rates returned. Always normalize the response to your own interface before returning to the client — this decouples your frontend from API changes.
Expected result: The API route accepts shipment details and returns an array of normalized freight quote objects. Testing the route with a tool like curl or Postman returns quote data for valid port pairs.
Add Environment Variables in Vercel
Add Environment Variables in Vercel
Your API route reads FREIGHTOS_API_KEY from environment variables. You need to configure this in Vercel so it is available when your serverless functions run in production — it should never be hardcoded in your source code or sent to the browser. Go to your Vercel Dashboard and open your project. Click the Settings tab, then click Environment Variables in the left sidebar. Add the following variable: FREIGHTOS_API_KEY — set this to your Freightos WebCargo API key from your developer portal. This key must only live on the server side. Do not add the NEXT_PUBLIC_ prefix — that would expose it to the browser and anyone who inspects your JavaScript bundle. Select all three environment scopes: Production, Preview, and Development. If your Freightos API setup requires additional credentials (such as a client ID, account ID, or separate secret), add those as separate environment variables following the same SCREAMING_SNAKE_CASE naming convention. Update your API route code to read these additional variables using process.env.VARIABLE_NAME. After saving the environment variables in Vercel, you must redeploy your project for the new variables to take effect in serverless functions. Trigger a redeployment by pushing any commit to your connected GitHub repository. For local development, create a .env.local file in your project root and add FREIGHTOS_API_KEY=your_key_here. This file should already be listed in .gitignore in your V0-generated project — verify this before committing to avoid accidentally leaking the key to GitHub.
Pro tip: If Freightos provides separate sandbox and production API keys, add both to Vercel using different environment scopes: sandbox key for Preview environment, production key for Production environment. This lets you test on preview deployments without affecting real carrier integrations.
Expected result: Vercel Dashboard shows FREIGHTOS_API_KEY saved in environment variables. After redeployment, your API route can access process.env.FREIGHTOS_API_KEY without errors and the freight quote fetch succeeds.
Handle Asynchronous Quote Polling
Handle Asynchronous Quote Polling
The Freightos WebCargo API uses an asynchronous quote model for some routes and carrier types. Instead of returning quotes immediately, the initial rate request returns a quote request ID, and you must poll a status endpoint until the quotes are ready. This is particularly common for complex multi-leg shipments or routes with limited spot market coverage. To handle this pattern in your V0 app, you need two API routes: one for submitting the initial quote request (app/api/freightos/route.ts, which you already created) and one for polling the status (app/api/freightos/status/route.ts). The frontend polls the status endpoint every 2-3 seconds until the quotes are populated or a timeout is reached. On the frontend side, V0 can generate the polling logic using React's useEffect hook and a state machine pattern. The UI transitions through states: idle (form shown), loading (request submitted, polling), results (quotes received), and error (timeout or API failure). Ask V0 to generate a component that manages this state and auto-stops polling after a reasonable timeout like 30 seconds. For the status polling API route, it should accept a GET request with the quote request ID, call the Freightos status endpoint, and return either the quotes (if ready) or a status indicator (if still processing). Include appropriate caching headers to prevent Vercel from caching intermediate polling responses. This asynchronous pattern is a V0 limitation to be aware of: V0's preview sandbox runs in Vercel Sandbox VMs with real server execution, but complex polling logic with state management may need refinement after initial generation. If V0's polling implementation does not behave correctly in the preview, pull the code locally and test with your real Freightos credentials before deploying.
Add a polling mechanism to the freight quote form. After submitting, if the API returns a { requestId } instead of quotes, start polling GET /api/freightos/status?requestId=xxx every 3 seconds. Show a progress indicator with text like 'Fetching quotes from 12 carriers...' during polling. Stop polling after 30 seconds and show an error if no quotes are returned. Display quotes as soon as they are available.
Paste this in V0 chat
1import { NextRequest, NextResponse } from 'next/server';23const WEBCARGO_API_URL = 'https://api.webcargo.co/v1';45export async function GET(request: NextRequest) {6 const { searchParams } = new URL(request.url);7 const requestId = searchParams.get('requestId');89 if (!requestId) {10 return NextResponse.json(11 { error: 'requestId parameter is required' },12 { status: 400 }13 );14 }1516 const apiKey = process.env.FREIGHTOS_API_KEY;17 if (!apiKey) {18 return NextResponse.json(19 { error: 'Freightos API key not configured' },20 { status: 500 }21 );22 }2324 try {25 const response = await fetch(26 `${WEBCARGO_API_URL}/rates/requests/${requestId}`,27 {28 headers: {29 'Authorization': `Bearer ${apiKey}`,30 'Accept': 'application/json',31 },32 // Disable Next.js data cache for polling endpoints33 cache: 'no-store',34 }35 );3637 if (!response.ok) {38 return NextResponse.json(39 { error: `Status check failed: ${response.status}` },40 { status: response.status }41 );42 }4344 const data = await response.json();45 const status = data.status || 'processing';4647 if (status === 'completed' || status === 'ready') {48 const quotes = (data.rates || data.quotes || []).map(49 (rate: Record<string, unknown>) => ({50 carrierId: String(rate.carrier_id || ''),51 carrierName: String(rate.carrier_name || 'Unknown Carrier'),52 transitDays: Number(rate.transit_days || 0),53 departureDate: String(rate.departure_date || ''),54 arrivalDate: String(rate.arrival_date || ''),55 rateUsd: Number((rate.total_price as Record<string, unknown>)?.amount || 0),56 serviceType: String(rate.service_type || ''),57 })58 );59 return NextResponse.json({ status: 'ready', quotes });60 }6162 return NextResponse.json({ status: 'processing', quotes: [] });63 } catch (error) {64 console.error('Freightos status check error:', error);65 return NextResponse.json(66 { error: 'Failed to check quote status' },67 { status: 500 }68 );69 }70}Pro tip: Add a cache: 'no-store' option to the fetch call in your polling route to prevent Next.js from caching the status check responses. Without this, Next.js may return a cached 'processing' response even after the quotes are ready.
Expected result: The status polling route returns a { status: 'processing' } response while quotes are loading and { status: 'ready', quotes: [...] } once they are available. The frontend stops polling and displays results automatically.
Display and Filter Freight Quotes
Display and Filter Freight Quotes
With the API routes working, the final step is to ensure your V0-generated UI presents the freight quotes in a way that is useful for making booking decisions. Raw quote data from Freightos includes a mix of carriers, service types, transit times, and prices — giving users filtering and sorting controls dramatically improves the experience. Ask V0 to add filter controls to the results panel: a price range slider, transit time filter (e.g., fastest, balanced, cheapest), and carrier type filter (e.g., ocean only, air only). V0 can implement these as client-side filters that operate on the already-fetched quote array, which is more responsive than re-querying the API for each filter change. For the quote cards, include enough context for a decision: not just the price and transit time, but also the service type (port-to-port, door-to-door), whether the rate includes customs clearance or just freight, and the validity date of the quote if the API provides it. Freightos quotes are often valid for a limited window, so displaying the expiry date prevents stale quotes from being acted on. V0 has a known limitation for complex data tables with many dynamic interactions: the generated code works well for simple sorting but may need refinement for multi-column filters or draggable rows. If you need advanced table features, ask V0 to use the @tanstack/react-table library, which V0 knows well and generates clean integration code for. For production use, consider adding a 'Request to Book' button on the cheapest or best-matched quote that either opens the Freightos booking flow (if available via API) or captures the user's intent and sends them an email with the selected quote details. This keeps your app useful even before you build a full booking integration. RapidDev's team can help you connect the Freightos quote selection to a booking confirmation workflow.
Add filtering and sorting to the freight quote results panel. Add three filter controls above the results: a 'Sort by' dropdown (Price: Low to High, Price: High to Low, Fastest Transit, Latest Departure), a 'Max Transit Days' slider from 5 to 45 days, and a 'Service Type' checkbox group (Ocean FCL, Ocean LCL, Air). Implement filters as client-side operations on the fetched quotes array. Show the count of filtered results (e.g., 'Showing 8 of 14 quotes').
Paste this in V0 chat
Pro tip: Freightos quotes include a validity window — if your API response includes an expiry timestamp, display it prominently on each quote card. Freight rates can change rapidly, and showing a 'Quote valid until [date]' label sets correct expectations for users.
Expected result: The results panel shows filterable, sortable freight quotes. Users can filter by transit time and service type, sort by price or speed, and clearly see which option is the best value for their shipment.
Common use cases
E-Commerce Freight Quote Calculator
An e-commerce operator builds a shipping cost estimator that lets their team compare ocean freight rates for bulk product imports. V0 generates a form with origin/destination ports, cargo dimensions, and weight fields. The API route queries Freightos and returns ranked carrier quotes that the team can compare before booking.
Create a freight quote calculator form with fields for origin port (dropdown with major ports), destination port (dropdown), cargo type (FCL or LCL), weight in kg, and volume in CBM. Add a 'Get Quotes' button that POSTs to /api/freightos/quotes and displays results in a card grid showing carrier name, transit time, and price per container.
Copy this prompt to try it in V0
Logistics Dashboard with Rate History
A logistics manager builds an internal dashboard that tracks freight rate trends over time. V0 generates a dashboard with a route selector and a chart showing how rates have changed over recent weeks. The API route fetches current quotes and the app stores historical data in a database for trend analysis.
Build a logistics rate dashboard with a sidebar showing saved routes (e.g., Shanghai to Rotterdam, Shenzhen to Los Angeles). When a route is selected, display a table of current freight quotes sorted by price, with columns for carrier, transit days, departure date, and rate. Include a refresh button that re-fetches live quotes.
Copy this prompt to try it in V0
Supplier Shipping Cost Comparator
A sourcing team builds a tool to instantly compare shipping costs from different supplier locations to their warehouse. V0 generates a multi-row comparison table where each row represents a supplier's origin port, and columns show freight rates from different forwarders for each route.
Create a table component that shows freight rate comparisons across multiple origins. Each row should show: origin city, destination, best available rate, carrier name, and transit time. Add a 'Refresh All' button that calls /api/freightos/quotes for each row simultaneously. Show a loading skeleton while rates are loading.
Copy this prompt to try it in V0
Troubleshooting
API route returns 401 Unauthorized when calling Freightos
Cause: The FREIGHTOS_API_KEY environment variable is not set in Vercel, is set incorrectly, or the API key has been revoked in your Freightos developer portal.
Solution: Check Vercel Dashboard → Settings → Environment Variables to confirm FREIGHTOS_API_KEY is present and matches exactly what is shown in your Freightos WebCargo developer portal. Ensure there are no extra spaces before or after the key value. After updating, redeploy your project.
Freight quotes return empty array for valid port combinations
Cause: The port codes in your request do not match the format expected by the Freightos API. Freightos uses UN/LOCODE format (e.g., CNSHA for Shanghai, NLRTM for Rotterdam), not IATA airport codes or plain city names.
Solution: Verify the port codes in your request use the correct UN/LOCODE format. The Freightos WebCargo API documentation lists accepted port codes. Update your form to use a port code lookup or a curated dropdown of valid UN/LOCODE values rather than free-text input.
1// UN/LOCODE examples for common ports2// Shanghai: CNSHA3// Rotterdam: NLRTM4// Los Angeles: USLAX5// Hamburg: DEHAM6// Singapore: SGSIN78const COMMON_PORTS = [9 { label: 'Shanghai, China', code: 'CNSHA' },10 { label: 'Rotterdam, Netherlands', code: 'NLRTM' },11 { label: 'Los Angeles, USA', code: 'USLAX' },12 { label: 'Singapore', code: 'SGSIN' },13];Quote request times out after 30 seconds with no results
Cause: The Freightos API returned a quote request ID (async mode) instead of immediate results, but your polling implementation either is not calling the status endpoint or is not handling the asynchronous flow correctly.
Solution: Check your API route's response — if it returns a requestId field instead of a quotes array, the Freightos API is using async mode for that route. Implement the polling flow described in Step 4 of this guide. Ensure your frontend checks for requestId in the response and triggers the polling loop if present.
1// In your V0 component's submit handler:2const response = await fetch('/api/freightos/quotes', { method: 'POST', ... });3const data = await response.json();45if (data.requestId) {6 // Async mode: start polling7 startPolling(data.requestId);8} else if (data.quotes) {9 // Sync mode: display immediately10 setQuotes(data.quotes);11}CORS error when calling the Freightos API directly from the browser
Cause: You are attempting to call the Freightos WebCargo API directly from client-side React code rather than through your Next.js API route. The Freightos API does not allow direct browser requests due to CORS restrictions and because exposing your API key client-side is a security risk.
Solution: Move all Freightos API calls to the server-side API route at app/api/freightos/route.ts. Your V0-generated React component should only call /api/freightos/quotes (your own API route), never the Freightos API URL directly. Check for any fetch() calls in your component files that target api.webcargo.co or freightos.com and move them to the route handler.
1// WRONG — calling Freightos directly from a React component2const quotes = await fetch('https://api.webcargo.co/v1/rates', {3 headers: { Authorization: `Bearer ${process.env.NEXT_PUBLIC_FREIGHTOS_API_KEY}` }4});56// CORRECT — calling your own API route which proxies to Freightos7const quotes = await fetch('/api/freightos/quotes', {8 method: 'POST',9 headers: { 'Content-Type': 'application/json' },10 body: JSON.stringify(quoteRequest)11});Best practices
- Always proxy Freightos API calls through a Next.js API route — never call the WebCargo API directly from client-side code, as this exposes your credentials.
- Cache freight quotes for short periods (5-10 minutes) on repeated identical requests to reduce API usage costs and improve response times for popular routes.
- Use UN/LOCODE port codes in your quote requests rather than free-text city names to ensure consistent API responses from Freightos.
- Handle both synchronous and asynchronous quote responses from the Freightos API — the same port pair can return instantly via one carrier and asynchronously via another.
- Display quote validity windows prominently in the UI — freight rates can change within hours, and a stale quote shown as current can cause pricing mismatches.
- Implement a request timeout of 25-30 seconds on your polling logic to prevent infinite loops when the Freightos API is slow or the route has no available carriers.
- Store quote snapshots in your database when a user selects a quote for booking — Freightos rates are live and the displayed rate may change before the user completes the booking process.
- Test with real port pairs that have high carrier coverage (e.g., Shanghai to Rotterdam) before testing edge routes — edge routes may return sparse results that make it hard to debug unrelated issues.
Alternatives
FedEx is an alternative if you need parcel and small package shipping rates rather than international freight and container shipments.
UPS is an alternative if your shipments are parcel-weight packages where UPS has better domestic coverage than international freight forwarders.
Shippo is an alternative if you want a unified multi-carrier API for domestic parcel shipping with label generation, rather than a freight marketplace for bulk cargo.
Frequently asked questions
What is the difference between Freightos and FedEx or UPS for V0 integrations?
Freightos is a freight marketplace that aggregates rates from hundreds of freight forwarders and carriers for international bulk shipments — think containers, pallets, and air cargo measured in cubic meters. FedEx and UPS are parcel carriers optimized for boxes under 70kg. For an e-commerce store shipping small packages, use a parcel carrier API. For importing products from overseas factories, Freightos is the right tool.
Does Freightos have a free tier or sandbox environment for testing?
Freightos WebCargo API access requires a developer account through the WebCargo platform. The availability of a free sandbox depends on your account tier. Contact Freightos directly at webcargo.co/api to understand current developer access options, as pricing and sandbox availability change periodically. Always ask about sandbox credentials separately from production credentials so you can test without affecting live carrier integrations.
Why does the V0 preview not show real freight rates?
V0's preview sandbox runs real server-side code, but your FREIGHTOS_API_KEY must be configured in the Vercel project's environment variables for the API calls to succeed. The V0 Vars panel (accessible from the chat sidebar) lets you add environment variables that sync to your Vercel project. Add your Freightos API key there, then reload the V0 preview to test with live data.
How do I handle the case where Freightos returns no quotes for a route?
Some port pairs have limited carrier coverage in the Freightos marketplace, particularly for less common trade lanes or LCL shipments. Your API route should return an empty quotes array with a helpful message indicating no coverage is available. In the UI, show a fallback message suggesting the user try a nearby major port or contact a freight forwarder directly. Do not treat an empty quotes response as an error.
Can V0 generate a complete freight booking flow, not just a quote comparison?
V0 can generate the UI for a booking flow including quote selection, shipper/consignee details forms, and confirmation screens. However, actually submitting a booking via the Freightos API requires additional API endpoints and business logic around document collection, payment, and shipment tracking. Start with the quote comparison as described in this guide, then layer in booking functionality once you understand the Freightos booking API's requirements for your account tier.
Why does the freight quote API sometimes take 10-20 seconds to respond?
Freightos is querying multiple carriers and freight forwarders in real time when processing your rate request. For popular high-volume routes, results often return quickly because carriers have pre-cached rates. For less common routes, the API may need to query each carrier individually, which takes longer. Implement a loading state in your UI that sets accurate expectations, and consider the polling approach described in Step 4 for routes where the API consistently uses async mode.
How do I keep freight quotes from appearing stale in my V0 app?
Add a 'Last updated' timestamp to each quote and a 'Refresh Rates' button that re-fetches current quotes from the Freightos API. Avoid caching quotes for more than 10-15 minutes server-side, as freight rates can change within the hour for peak shipping seasons. If you store quotes in a database, always mark them with a fetched_at timestamp and display a warning if the quote is older than 30 minutes.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation