What we do
Tools
Industries
Department
How we workLet's talk →
Home/Flexport/Which Flexport API Your Shipments Need
Flexport

The Flexport API Is Really Two APIs. Pick the One for Your Cargo.

If Flexport moves your containers and clears your customs, you want its freight platform API. If Flexport stores and ships your e-commerce orders, you want the Logistics API, the successor to the old Deliverr API. They sit on different hosts, use different tokens, and expose different records, so the first decision is which one your shipments live in.

Getting a token

Freight platform: create API credentials, choosing which resources they can reach, then POST the Client ID and Secret to https://api.flexport.com/oauth/token with grant_type: client_credentials. The token lasts 24 hours.

Your Business Settings API Credentials Create Credentials

Logistics API: an administrator generates a token in Seller Portal. Merchant tokens expire after a year by default, and each carries scopes such as read_logistics_orders.

Settings API Tokens

Either way, send it as Authorization: Bearer <token>. On the freight API, a Flexport-Version header overrides your account's default version.

Flexport freight API and Logistics API, side by side

api.flexport.com

Freight platform API

  • For importers whose ocean, air and customs work runs through Flexport.
  • Shipments with milestones and containers, bookings, purchase orders, customs entries, freight and commercial invoices, products.
  • More than 35 document types to post or retrieve, from bills of lading to customs paperwork.
  • Can create bookings, purchase orders, commercial invoices and products, not only read them.
logistics-api.flexport.com

Logistics API

  • For merchants and partners on Flexport's fulfillment network.
  • Fulfillment orders, B2B outbounds, products with inventory, inbound shipments, parcels, returns and reports.
  • Webhooks for order, shipment and inventory changes, so you don't poll.
  • Some resources need account approval or a billing account before they open up.

Use both if Flexport does both jobs for you: the freight API for goods on the water, the Logistics API for orders leaving the warehouse.

What the Flexport data turns into once it leaves the portal

Shipment milestones become messages in the channel or ticket queue where ops already works: departed, arrived, customs hold, released. Documents Flexport generates get attached to the matching purchase order in your ERP, so nobody downloads a bill of lading to re-upload it.

Data can flow into Flexport as well. Purchase orders raised in your ERP get created in Flexport through the API, so the booking starts from the same numbers. Freight invoices and customs entries feed the landed cost that our Flexport overview breaks down line by line.

n-frames builds these feeds on whichever Flexport API holds your data, and on the ERP, accounting or planning system on the other side.

Flexport API mistakes that lock you out or let bad data in

Asking for a new token on every call

How you'll know: Requests start failing mid-morning even though the credentials are fine.

Fix: The freight API caps token requests at 10 a day. Cache the token, read its expiry from the exp claim, and fetch a fresh one only when it's close.

Still running on a legacy API key

How you'll know: One key in a config file that can reach every endpoint, and you can't narrow it.

Fix: Move to API credentials limited to the resources the job needs. Legacy keys are only required for v1 of the API.

Checking the webhook signature against parsed JSON

How you'll know: Signature checks fail at random, so someone switched them off.

Fix: Compute HMAC-SHA256 over the raw request body with the endpoint's secret and compare it to X-Hub-Signature-256. Return a 200 once it's accepted.

A Logistics token that quietly reaches its end date

How you'll know: A fulfillment sync that worked for a year starts returning auth errors, or 403 on one resource after a change.

Fix: Note each token's expiry when it's created and renew it ahead of time. A 403 usually means the token lacks the scope for that resource.

Flexport API questions, from first token to webhooks

Does Flexport have an API?

Yes, two. The freight platform API at api.flexport.com covers shipments, bookings, purchase orders, documents, invoices and customs entries. The Logistics API covers Flexport's fulfillment network. Both are documented on developers.flexport.com, alongside EDI documentation.

What can I pull from the Flexport API?

From the freight API: shipment details with milestones and containers, bookings, purchase orders, commercial and freight invoices, customs entries and documents. From the Logistics API: fulfillment orders, inventory through the products endpoints, inbounds, parcel tracking, returns and reports.

Does Flexport integrate with Shopify?

Flexport offers a Shopify connection for fulfillment orders, aimed at a standard store setup. When you need something it doesn't do, the Logistics API is built for merchants writing their own store integration.

Do I need to use the Flexport API, or is the portal enough?

The portal is enough while one person checking it and updating your other systems keeps up. Once that person is the bottleneck, or the data has to land in a specific ERP or planning tool, the API takes them out of the loop.

Let's talk

Tell us the one thing your team does manually that eats up time. We read every message and reply within a day.