Skip to main content
RapidDev - Software Development Agency
retool-integrationsREST API Resource

How to Integrate Retool with Freightos

Connect Retool to Freightos using a REST API Resource with API key authentication to access freight quote, booking, and tracking endpoints. Build logistics procurement dashboards where operations teams compare ocean, air, and truck freight rates across multiple carriers, book shipments, and track freight status — all without switching between the Freightos portal and other business tools.

What you'll learn

  • How to obtain a Freightos API key and configure it in a Retool REST API Resource
  • How to request freight rate quotes comparing multiple carriers and shipping modes
  • How to build a freight rate comparison table for logistics procurement decisions
  • How to track booked shipment status using the Freightos tracking API
  • How to use JavaScript transformers to format freight rate data for display and comparison
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Intermediate15 min read25 minutesOtherLast updated April 2026RapidDev Engineering Team
TL;DR

Connect Retool to Freightos using a REST API Resource with API key authentication to access freight quote, booking, and tracking endpoints. Build logistics procurement dashboards where operations teams compare ocean, air, and truck freight rates across multiple carriers, book shipments, and track freight status — all without switching between the Freightos portal and other business tools.

Quick facts about this guide
FactValue
ToolFreightos
CategoryOther
MethodREST API Resource
DifficultyIntermediate
Time required25 minutes
Last updatedApril 2026

Build Freight Procurement and Tracking Dashboards in Retool with Freightos

Logistics teams managing international freight face a constant challenge: comparing rates across multiple carriers and shipping modes requires jumping between carrier portals or waiting for manual quotes. Freightos solves this at the data level by aggregating rates from hundreds of freight providers, and Retool extends this by embedding Freightos's rate data and booking functionality directly into your operations workflows alongside your orders, inventory, and supplier data.

Freightos's API covers the full freight lifecycle: rate requests (specifying origin, destination, cargo type, weight, and dimensions to get instant quotes), booking (committing to a specific rate and providing shipment details to create a booking), and tracking (monitoring booked shipments through their transit lifecycle). The API is REST-based with JSON request and response bodies, using API key authentication in request headers.

Common Retool apps built with Freightos include: procurement decision panels that show freight rate options alongside order details so logistics managers can choose the best carrier for each shipment, freight spend analysis dashboards that track committed spend by carrier and lane over time, shipment tracking panels that aggregate status for all in-transit international shipments, and rate alert tools that compare current quotes against historical averages and flag when rates spike significantly above the baseline.

Integration method

REST API Resource

Freightos uses API key authentication for its REST API. The API key is included in request headers to authenticate all calls to the Freightos API. Configure a Retool REST API Resource with the Freightos API base URL and your API key in the headers, then query freight rate, booking, and shipment tracking endpoints. All requests are proxied server-side through Retool, keeping credentials secure and eliminating CORS issues.

Prerequisites

  • A Freightos account with API access enabled (requires contacting Freightos for API credentials — not available on all plans)
  • A Freightos API key obtained from your account representative or the Freightos developer portal
  • Your Freightos organization ID or account identifier needed for API requests
  • A Retool account with permission to create Resources
  • Basic understanding of freight terminology (FCL, LCL, origin/destination port codes)

Step-by-step guide

1

Obtain your Freightos API credentials

Freightos API access is not self-service for all plan tiers — contact your Freightos account manager or reach out through the Freightos developer portal at dev.freightos.com to request API access for your account. If you have an existing Freightos enterprise account, API credentials may already be available. Once API access is enabled for your account, navigate to the Freightos portal settings or developer documentation to find your API key. The API key is a string token that authenticates all your API requests. Additionally, note your Freightos account/organization identifier, which is required as a parameter in rate request and booking API calls. Freightos also maintains a sandbox environment for testing — request sandbox credentials alongside production credentials so you can test your Retool integration before using it for live freight operations. Sandbox credentials use the same API format but return simulated rate quotes without creating actual bookings or charges.

Pro tip: Freightos sandbox environments return realistic rate data with simulated carrier options. Always develop and test your Retool integration against the sandbox first, then switch to production credentials when you are confident the queries and transformers are working correctly.

Expected result: You have a Freightos API key and organization identifier ready, plus sandbox credentials for testing.

2

Create the Freightos REST API Resource in Retool

In Retool, navigate to the Resources tab and click 'Create New'. Select 'REST API' from the resource type list. Set the Base URL to 'https://api.freightos.com' for production, or the sandbox URL provided by your Freightos account team for testing. Under the Headers section, add the authentication header. Freightos uses an 'X-API-Key' header (or 'Authorization' header depending on your API version — check the documentation provided with your credentials) with your API key value. Use '{{ retoolContext.configVars.FREIGHTOS_API_KEY }}' as the header value. Also add 'Content-Type: application/json' as a default header. Before saving, go to Retool Settings → Configuration Variables and create 'FREIGHTOS_API_KEY' with your API key value marked as secret, and 'FREIGHTOS_ORG_ID' with your organization identifier (does not need to be secret). Click 'Save Resource'. Test the connection by creating a simple query to a list or account endpoint — a 200 response confirms the credentials are working.

resource-config.json
1{
2 "Base URL": "https://api.freightos.com",
3 "Headers": {
4 "X-API-Key": "{{ retoolContext.configVars.FREIGHTOS_API_KEY }}",
5 "Content-Type": "application/json",
6 "Accept": "application/json"
7 }
8}

Pro tip: Freightos API versioning is included in the path (e.g., /api/v2/). Check the Freightos developer documentation for the current API version number and use it consistently in all query paths — mixing versions in the same integration can cause unexpected behavior.

Expected result: The Freightos REST API Resource is saved with your API key configured as a secret configuration variable. A test query returns a successful response.

3

Request freight rate quotes

Create a rate request query to get freight quotes from Freightos. Set the method to POST and the path to the rate request endpoint (consult Freightos documentation for the exact path, typically '/api/v2/rates' or similar). The request body specifies the shipment parameters: origin location (UN/LOCODE for ports, e.g., 'CNSHA' for Shanghai), destination location (e.g., 'USLAX' for Los Angeles), cargo details including total weight, volume or dimensions, number of units, and cargo type (FCL, LCL, or air). The response returns an array of rate options, each with a carrier name, transit time in days, shipping mode, earliest available departure date, and detailed cost breakdown including origin handling charges, ocean or air freight, and destination charges. Add Retool components for the input fields: Select dropdowns for origin and destination ports (populated from a list of common routes your company uses), number inputs for weight and volume, and a Select for shipping mode. Trigger the rate query when the user clicks a 'Get Rates' button.

rate-request-query.json
1// POST /api/v2/rates (verify path with Freightos docs)
2// Body (JSON):
3{
4 "origin": {
5 "locodePort": "{{ originPort.value }}"
6 },
7 "destination": {
8 "locodePort": "{{ destPort.value }}"
9 },
10 "cargo": {
11 "type": "{{ cargoType.value || 'LCL' }}",
12 "totalWeight": {
13 "amount": {{ weightInput.value || 100 }},
14 "unit": "kg"
15 },
16 "totalVolume": {
17 "amount": {{ volumeInput.value || 1 }},
18 "unit": "cbm"
19 }
20 },
21 "organizationId": "{{ retoolContext.configVars.FREIGHTOS_ORG_ID }}"
22}

Pro tip: Port codes in Freightos use the UN/LOCODE standard — 5-character codes combining country code and city code (e.g., 'CNSHA' = China/Shanghai, 'USLAX' = US/Los Angeles, 'NLRTM' = Netherlands/Rotterdam). Build a lookup table in Retool with the ports your company commonly uses to populate Select dropdowns with human-readable city names rather than raw codes.

Expected result: The rate request returns an array of freight options from multiple carriers for the specified lane and cargo parameters.

4

Transform and display rate comparison data

Add a JavaScript transformer to the rate request query to reshape the raw API response into a format suitable for Retool's Table component. The Freightos rate response typically contains nested objects for cost components — extract total cost, currency, carrier name, transit days, shipping mode, and earliest departure date into a flat array. Calculate a cost-per-CBM or cost-per-kg metric for comparison across options with different total charges. Sort the results by total price ascending by default. Add a Table component bound to the transformer output with columns for carrier, mode, transit days, departure date, and total price. Include a 'Select' action column that stores the chosen rate option in a Retool state variable for the booking step. Add Stat components above the Table showing the lowest rate, fastest transit, and average market rate for the queried lane.

rate_comparison_transformer.js
1// Transformer: format rate options for comparison table
2const rates = data && data.results ? data.results : data || [];
3
4return rates.map((rate, index) => {
5 const totalCharge = rate.totalCharge || rate.price || {};
6 const amount = totalCharge.amount || totalCharge.value || 0;
7 const currency = totalCharge.currency || 'USD';
8
9 const departureDate = rate.schedule && rate.schedule.departureDate
10 ? new Date(rate.schedule.departureDate).toLocaleDateString('en-US', {
11 year: 'numeric', month: 'short', day: 'numeric'
12 })
13 : 'Flexible';
14
15 const transitDays = rate.schedule
16 ? rate.schedule.transitDays || rate.schedule.estimatedTransitDays
17 : null;
18
19 return {
20 option: index + 1,
21 carrier: rate.carrier || rate.provider || 'Unknown',
22 mode: rate.serviceType || rate.mode || 'Unknown',
23 transit_days: transitDays ? `${transitDays} days` : 'Varies',
24 transit_days_raw: transitDays || 999,
25 departure: departureDate,
26 total_price: `${currency} ${parseFloat(amount).toFixed(2)}`,
27 total_price_raw: parseFloat(amount),
28 quote_id: rate.id || rate.quoteId || `option-${index}`
29 };
30}).sort((a, b) => a.total_price_raw - b.total_price_raw);

Pro tip: Freight rates can vary dramatically based on market conditions — a rate valid today may not be valid tomorrow. Freightos quotes typically have a validity window (often 24-72 hours). Display the quote expiry time prominently in your comparison panel and refresh quotes before confirming a booking.

Expected result: The Table displays freight options sorted by total price with clear carrier, transit time, and cost information. The cheapest and fastest options are easily identifiable.

5

Build tracking queries and shipment monitoring panel

Create a tracking query to monitor booked shipments. Use GET with the path to the shipment tracking endpoint, typically '/api/v2/shipments/{shipmentId}/tracking' or '/api/v2/bookings/{bookingId}'. The tracking response includes the current shipment status, a list of milestone events (each with timestamp, event description, and location), estimated arrival date, and any exception or delay information. Read booking IDs from your logistics database — store Freightos booking IDs in your database when bookings are created — and create a query that loops through active booking IDs and fetches status for each. For bulk tracking without a loop, query your database for all booking IDs and pass them to a Retool Workflow that fetches tracking data for each and stores results in a staging table. Build a Retool Container with two panels: a summary table showing all active shipments with status, and a detail panel showing the full event timeline for the selected shipment. For complex multi-source integrations combining Freightos data with your order management system, RapidDev's team can help architect and build your Retool solution.

tracking_transformer.js
1// GET /api/v2/shipments/{shipment_id}/tracking
2
3// Transformer: format tracking milestones for timeline display
4const shipment = data || {};
5const milestones = shipment.events || shipment.milestones || [];
6
7const statusMap = {
8 'booked': 'Booking Confirmed',
9 'cargo_received': 'Cargo Received at Origin',
10 'departed_origin': 'Departed Origin Port',
11 'in_transit': 'In Transit',
12 'arrived_destination': 'Arrived at Destination Port',
13 'customs_cleared': 'Customs Cleared',
14 'delivered': 'Delivered',
15 'exception': 'Exception — Attention Required'
16};
17
18return {
19 shipment_id: shipment.id,
20 status: statusMap[shipment.status] || shipment.status || 'Unknown',
21 is_exception: shipment.status === 'exception' || shipment.delayed === true,
22 eta: shipment.estimatedArrival
23 ? new Date(shipment.estimatedArrival).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' })
24 : 'Unknown',
25 milestones: milestones.map(m => ({
26 event: statusMap[m.type] || m.description || m.type,
27 location: m.location || m.port || '',
28 timestamp: m.timestamp || m.date
29 ? new Date(m.timestamp || m.date).toLocaleString('en-US', { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' })
30 : ''
31 }))
32};

Pro tip: Store Freightos booking IDs and shipment IDs in your application database immediately after a booking is confirmed. These IDs are the link between your order records and Freightos tracking data — without them, you cannot query tracking status for your shipments.

Expected result: The tracking query returns current shipment status and a list of milestone events with timestamps and locations for the selected booking. The timeline panel shows the complete event history for the selected shipment.

Common use cases

Build a freight rate comparison panel for procurement decisions

Create a Retool tool where logistics teams enter cargo details — origin port, destination port, cargo type, weight, and dimensions — and instantly receive a comparison table of available freight options from Freightos. Display each option with carrier name, transit time, shipping mode (FCL, LCL, air, truck), earliest departure date, and total rate. Sort by price by default but allow sorting by transit time for urgent shipments. When a team member selects an option, show the full rate breakdown including origin charges, freight charges, and destination charges before committing to a booking.

Retool Prompt

Build a Retool freight rate calculator where users enter origin port (dropdown), destination port (dropdown), cargo weight (lbs or kg), and container type (20ft FCL, 40ft FCL, LCL per CBM). Query Freightos for rate options and display them in a Table sorted by total price, showing carrier, transit days, shipping mode, departure date, and total cost.

Copy this prompt to try it in Retool

Create a shipment tracking and status dashboard

Pull all booked Freightos shipments from your logistics database and query their current status via the Freightos tracking API. Display a consolidated tracking panel showing all in-transit shipments with their carrier, origin, destination, estimated arrival date, and latest milestone (e.g., 'Cargo received at origin port', 'Vessel departed', 'Customs cleared at destination'). Color-code shipments by status — on-time in green, delayed in yellow, exception in red — and surface the number of days delayed for shipments past their estimated arrival.

Retool Prompt

Create a Retool freight tracking dashboard that reads active shipment booking IDs from the logistics database, queries Freightos for current status for each, and displays a Table with carrier, origin, destination, estimated arrival, current milestone, and days until/since expected arrival. Highlight delayed shipments in yellow and exceptions in red.

Copy this prompt to try it in Retool

Build a freight spend analysis and lane performance report

Query historical Freightos bookings data to analyze freight spend by lane (origin-destination pair), carrier, and time period. Calculate the average cost per lane, identify the lanes with the highest spend, and compare current rates against the historical average for each lane to detect rate increases. Display trend charts showing freight cost per CBM or per kg over the past 12 months by major shipping lane, helping procurement teams negotiate better carrier rates based on volume data.

Retool Prompt

Build a Retool freight spend dashboard that queries completed Freightos shipments for the past 12 months, groups by shipping lane and carrier, calculates average cost per lane, and displays a bar chart of spend by lane and a trend line showing rate changes over time. Include a comparison of current quoted rates vs. the 90-day average for each lane.

Copy this prompt to try it in Retool

Troubleshooting

API returns 401 Unauthorized or 403 Forbidden on all requests

Cause: The API key is invalid, expired, or the account does not have API access enabled. The header name may also be incorrect if Freightos uses a different authentication header format for your account tier.

Solution: Contact your Freightos account manager to verify API access is active for your account and to confirm the correct authentication header name and format. Check whether your account uses 'X-API-Key', 'Authorization: Bearer', or a custom header format — this varies by Freightos account tier and API version. Update the resource configuration header accordingly.

Rate request returns empty results array or no quotes for a valid route

Cause: The origin or destination port code is not recognized by Freightos, no carriers currently serve the requested lane, or the cargo parameters (weight, volume, type) are outside acceptable ranges for the service type.

Solution: Verify port codes using the UN/LOCODE standard — confirm the 5-character code matches the actual port (e.g., 'CNSHA' for Shanghai Yangshan port). Test with a well-known high-volume lane like CNSHA → USLAX before testing less common routes. Check that cargo weight and volume are within the range your Freightos account is authorized to quote — very large cargo (multiple containers) or very small shipments may require special handling.

Rate quotes expire before the team can review and book

Cause: Freightos freight quotes have limited validity windows (typically 24-72 hours), and if the team is reviewing rates retrieved earlier in the day, some options may have expired by the time a decision is made.

Solution: Display the quote expiry time prominently in your rate comparison table by including the validUntil or expiryDate field from each rate option. Add a warning highlight when a quote expires within 2 hours. Build a 'Refresh Rates' button that re-triggers the rate request query with the same parameters to fetch fresh quotes before finalizing a booking selection.

Tracking status shows no events even though the shipment is in transit

Cause: The shipment ID being queried does not match the Freightos booking ID (these may be different from your internal order IDs), or tracking data has not yet been synchronized from the carrier to Freightos.

Solution: Confirm you are using the Freightos-assigned shipment or booking ID, not your internal order reference number. Freightos tracking data depends on carrier EDI feeds — some carriers have a 24-48 hour delay before milestone events appear in the Freightos API. If tracking is consistently empty for recent bookings, contact Freightos support to verify the carrier data feed for the affected lanes.

Best practices

  • Store your Freightos API key in Retool configuration variables as a secret — the key grants access to your freight account including the ability to create bookings and view pricing agreements
  • Always display quote validity/expiry times alongside rate options — freight quotes have limited validity windows and booking a rate after it expires results in errors or price changes
  • Store Freightos booking IDs in your order management database immediately after booking — these IDs are required for tracking queries and cannot be reconstructed if lost
  • Build a port code lookup table in Retool with human-readable city names mapped to UN/LOCODE codes — requiring users to know 'CNSHA' instead of 'Shanghai' creates friction and increases the chance of input errors
  • Use Retool Workflows for bulk tracking updates rather than live dashboard queries — fetch tracking status for all active shipments in a scheduled Workflow and cache results in a Retool database table that the dashboard reads from, keeping the dashboard fast without real-time API calls on every load
  • Include total landed cost in rate comparisons rather than just freight cost — ask your Freightos account team how to include origin handling charges and destination charges in API responses to give an accurate total cost comparison
  • Build separate Retool apps for rate browsing and for booking confirmation — the booking step creates a financial commitment, and separating it from the exploration step reduces the risk of accidental bookings

Alternatives

Frequently asked questions

Does Retool have a native Freightos connector?

No, Retool does not have a native Freightos connector. You connect using a REST API Resource with your Freightos API key in the request headers. Freightos's REST API provides access to rate requests, bookings, and tracking endpoints that can be queried from Retool's visual query builder.

Can I create freight bookings directly from Retool?

Yes, if your Freightos account has booking permissions via the API. After retrieving and selecting a rate quote, use POST to Freightos's booking endpoint with the selected quote ID and shipment details (cargo description, shipper and consignee information, special handling requirements) to create a confirmed booking. The response includes a booking confirmation number and tracking ID. Always implement a confirmation step in your Retool app before triggering the booking query, as freight bookings create financial commitments.

Is Freightos suitable for domestic shipping, or only international freight?

Freightos focuses primarily on international freight — ocean (FCL and LCL), air freight, and international truck/rail. For domestic parcel shipping within the US or other countries, dedicated carrier APIs (UPS, FedEx) or multi-carrier parcel platforms like ShipStation are more appropriate. Freightos's strength is international freight where comparing rates across dozens of carriers and freight forwarders provides significant value.

How do I get a list of supported port codes for rate requests?

Port codes follow the UN/LOCODE standard (United Nations Code for Trade and Transport Locations), which is a publicly available directory. The full list is available at unece.org/trade/cefact/UNLOCODE_Download. Your Freightos account team can also provide the specific subset of ports and lanes where you have active rates configured. Build a lookup table in Retool with the ports your company frequently uses to make the rate request form user-friendly.

Are there rate limits on the Freightos API?

Freightos enforces API rate limits that vary by account tier and agreement. Rate request calls are computationally intensive (they query carrier rate systems in real time), so limits on rate requests are typically more restrictive than limits on tracking or account management endpoints. Contact your Freightos account team for the specific limits on your account. For high-frequency use cases, implement query caching in Retool for rate quotes that are still within their validity window.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Integrations are where projects stall

We wire Retool integrations like this one every week — auth, webhooks, edge cases included. Fixed-price builds from $13K, delivered in 6–10 weeks.

Talk to an integration engineer

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.