Ellipse Gradient for Header

Flexport Integration Guide

Connect Flexport logistics data with enterprise systems through REST APIs, selected webhook notifications, OAuth 2.0-based authentication, and orchestrated synchronization workflows.

Flexport integration options at a glance

Flexport provides REST APIs for logistics and supply-chain data, including Shipments, Bookings, Purchase Orders, Products, Commercial Invoices, and shipment milestones. Selected events and resources can generate webhook-style notifications, although coverage, verification, retry behavior, and payload detail must be confirmed for each account. Flexport API access uses bearer tokens with OAuth 2.0-based authorization. Document and attachment handling is available for some logistics resources but should be verified by product and endpoint. Martini can consume the REST APIs, receive supported notifications, paginate and checkpoint synchronizations, transform Flexport JSON, apply business rules, and deliver results to ERP, commerce, warehouse, document, or analytics systems.

Integration pointSupported by Flexport?Common use casesHow Martini supports it
REST APIsYesRetrieve and manage Shipments, Bookings, Purchase Orders, Products, Commercial Invoices, and shipment milestones. REST APIs are the primary mechanism for new Flexport integrations.Martini can consume Flexport REST endpoints from workflows, manage request configuration, map JSON responses, expose normalized APIs, and orchestrate writes to downstream systems.
Webhooks and outbound callbacksLimitedReceive notifications for selected Flexport events or resources, such as shipment or booking changes. Coverage and delivery semantics are not universal across all objects.Martini can expose a receiving API or webhook workflow, validate notifications, apply idempotency checks, retrieve the current resource, and route the event to target applications.
AuthenticationYesFlexport API access uses bearer access tokens with OAuth 2.0-based authorization. Grant type, scopes, token lifetime, and tenant permissions depend on the account configuration.Martini can store client credentials and tokens in Secrets Management and apply bearer authentication to Flexport API requests without embedding credentials in workflows.
File and attachment handlingLimitedFlexport manages Commercial Invoices and other shipment-related documents, but general file or attachment API coverage must be confirmed for each resource and product.Martini can retrieve document metadata, follow supported URLs or perform separate downloads, validate files, transform metadata, and deliver documents to repositories or business applications.
Scheduled synchronizationYesScheduled retrieval supports incremental synchronization of Shipments, Bookings, Purchase Orders, Products, and milestones when endpoint-specific filters, timestamps, or pagination are available.Martini can schedule workflows, persist cursors or timestamps, paginate requests, throttle processing, reconcile results, and retry transient failures.
Incremental synchronizationLimitedIncremental processing can use documented filtering, pagination, timestamps, statuses, or updated-at fields, but query parameters vary by Flexport resource.Martini can maintain checkpoints, resource identifiers, update timestamps, and deduplication keys while applying endpoint-specific synchronization logic.
Bulk, asynchronous, and batch APIsNot confirmedA general-purpose Flexport bulk or batch API is not confirmed. Logistics operations may be asynchronous, but job endpoints should not be assumed without product-specific documentation.Martini can implement paginated and scheduled processing with bounded concurrency and checkpointing instead of assuming a bulk API.
GraphQL and SOAP APIsNot confirmedNo official Flexport GraphQL or SOAP API was confirmed in the supplied research.Martini integrations should use documented Flexport REST endpoints and supported webhook mechanisms unless Flexport confirms another interface.

How Flexport exposes data and business events

Flexport REST APIs

Flexport REST APIs are the primary integration mechanism for retrieving and managing logistics resources. The documented resource model includes Shipments, Bookings, Purchase Orders, Products, Commercial Invoices, and shipment milestones, with exact availability depending on enabled products and account permissions.

Martini implementation pattern

Martini implementation pattern: a workflow authenticates with a protected bearer token, calls the required Flexport endpoint, handles pagination and endpoint-specific filters, maps the JSON response to a canonical model, applies business rules, and writes the result to one or more target systems. For updates, Martini validates the request model, preserves external identifiers, and records the Flexport response for reconciliation.

Implementation sequence

Authenticate the workflow with a protected Flexport bearer token
Invoke the documented Flexport REST resource
Follow endpoint-specific pagination or continuation data
Validate required fields and preserve Flexport identifiers
Map Flexport JSON to the canonical target model
Apply status, freshness, and duplicate-prevention rules‌,

Common Flexport integration patterns

Pattern 1: Sync shipment milestones to enterprise systems

When to use this pattern

Use this pattern when ERP, CRM, commerce, or analytics systems need current shipment status, estimated delivery dates, carrier information, or customs and delivery milestones. A scheduled workflow is appropriate when webhook coverage does not include the required resource or when reconciliation is required.

Integration direction
Flexport
Martini
NetSuite, SAP S/4HANA, or Salesforce
Example Mapping
Flexport FieldCanonical FieldTarget Field
shipment_idshipment.externalIdExternal shipment ID
statusshipment.normalizedStatusFulfillment or delivery status
estimated_arrival_dateshipment.estimatedArrivalEstimated delivery date
milestonesshipment.milestonesTracking milestones
Martini implementation pattern

A scheduler invokes Martini, which retrieves changed Shipments and milestones using documented filters and pagination. The workflow preserves the original status, normalizes known values, rejects stale updates, updates the target application, and records checkpoints. Rate-limit responses and transient failures are retried, while unmapped statuses are routed for review.

Martini capabilities used
  • Scheduled workflows
  • API consumption
  • Pagination and checkpointing
  • Data mapping
  • Business rules
  • Error handling and retry

Pattern 2: Synchronize purchase orders from an ERP to Flexport

When to use this pattern

Use this pattern when procurement or ERP purchase orders must be submitted or synchronized with Flexport for shipment planning and execution. The exact create and update operations must be confirmed for the Flexport account and enabled API product.

Integration direction
NetSuite, SAP S/4HANA, or Microsoft Dynamics 365
Martini
Flexport
Example Mapping
Flexport FieldCanonical FieldTarget Field
purchase_order_numberpurchaseOrder.externalIdPurchase order reference
line_itemspurchaseOrder.productsProducts and quantities
supplier_codepurchaseOrder.supplierReferenceSupplier reference
requested_ship_datepurchaseOrder.requestedShipDateRequested shipment date
Martini implementation pattern

Martini receives or polls the ERP purchase order, maps line items to Flexport Products, validates required fields, and submits only operations supported by the Flexport API. It stores the Flexport response identifier, uses a stable source version to prevent duplicate writes, and routes validation or partial-update failures to an operational queue or exception process.

Martini capabilities used
  • Workflow orchestration
  • API consumption
  • Data transformation
  • Validation
  • Business rules
  • Idempotency and error handling

Pattern 3: Route Flexport webhook notifications to operational applications

When to use this pattern

Use this pattern when selected Flexport event notifications should update downstream systems with low latency. It is suitable for supported Shipment or Booking events, but event coverage and verification requirements must be confirmed for the customer account.

Integration direction
Flexport
Martini
Salesforce, Microsoft Dynamics 365, or a warehouse application
Example Mapping
Flexport FieldCanonical FieldTarget Field
event_idevent.idIntegration event ID
resource_idshipmentOrBooking.externalIdShipment or booking reference
event_typeevent.typeOperational event type
event_timestampevent.occurredAtSource event time
Martini implementation pattern

A Martini API receives the notification, validates the request according to Flexport requirements, and checks a durable idempotency key before processing. The workflow retrieves the current Shipment or Booking when the event contains only an identifier, prevents older events from overwriting newer state, and forwards the normalized event after a successful check.

Martini capabilities used
  • API exposure
  • Webhook consumption
  • Request validation
  • Idempotency
  • Data mapping
  • Conditional routing

Pattern 4: Distribute commercial invoices and shipment documents

When to use this pattern

Use this pattern when commercial documentation must be made available in an ERP, SharePoint, or internal repository for customs, compliance, or operational processing. The implementation depends on whether the Flexport resource provides inline content, a temporary URL, or a document identifier.

Integration direction
Flexport
Martini
Microsoft SharePoint, NetSuite, or SAP S/4HANA
Example Mapping
Flexport FieldCanonical FieldTarget Field
document_iddocument.externalIdRepository document key
document_urldocument.downloadReferenceRetrieval reference
shipment_iddocument.shipmentIdShipment relationship
document_typedocument.typeDocument classification
Martini implementation pattern

Martini retrieves document metadata and uses the documented retrieval method, then validates content, size, type, and access lifetime before delivering the file. The workflow records the destination identifier, avoids persisting expiring URLs as permanent references, and retries downloads or target writes without creating duplicate documents.

Martini capabilities used
  • API consumption
  • File processing
  • Data mapping
  • Validation
  • Secure configuration
  • Retry and reconciliation

Applications commonly integrated with Flexport

Flexport data can be coordinated with enterprise applications that manage procurement, fulfillment, customer communication, commerce, documents, and supply-chain analytics. The exact operations depend on the Flexport products and API permissions enabled for the customer account.

Application Scenario Direction Martini Pattern
NetSuite Synchronize Purchase Orders, shipment costs, inventory-related information, fulfillment status, and delivery milestones between logistics operations and the ERP. NetSuite → Martini → Flexport Martini receives or retrieves NetSuite purchase-order and fulfillment data, maps it to Flexport request models, and then returns shipment and milestone updates to NetSuite through a separate workflow. External identifiers, duplicate prevention, validation, and retry handling are retained across both directions.
SAP S/4HANA Connect procurement, materials, purchase-order, transportation, and goods-receipt processes with Flexport shipment execution data. SAP S/4HANA → Martini → Flexport Martini orchestrates bidirectional API exchanges, converts SAP structures into Flexport JSON and normalizes Flexport milestones for SAP processes. Checkpoints, reconciliation, validation, and controlled retries support long-running supply-chain synchronization.
Microsoft Dynamics 365 Synchronize purchase orders, products, fulfillment progress, and delivery milestones with logistics operations. Microsoft Dynamics 365 → Martini → Flexport A Martini workflow consumes Dynamics data, maps line items and external references to Flexport Products and Purchase Orders, and processes Flexport shipment updates back into Dynamics. Business rules distinguish accepted, rejected, and unmapped statuses.
Salesforce Expose shipment status, estimated delivery dates, and logistics exceptions to sales, account-management, and customer-service users. Flexport → Martini → Salesforce Martini polls changed Shipments or receives selected Flexport notifications, retrieves current resource details when necessary, and maps milestones to Salesforce customer or order context. Duplicate events and stale updates are filtered before Salesforce is updated.
Shopify Link orders and products with international freight, shipment tracking, and delivery updates. Shopify → Martini → Flexport Martini correlates Shopify order or fulfillment references with Flexport Purchase Orders, Products, or Shipments, then publishes tracking and delivery changes back to Shopify where the available APIs support the required operation. Failed writes are retried without duplicating fulfillment updates.
Microsoft SharePoint Store and distribute Commercial Invoices, customs documents, and shipment records for internal operations and compliance. Flexport → Martini → Microsoft SharePoint Martini retrieves document metadata or a supported download reference from Flexport, validates the content and filename, and writes the document to SharePoint with shipment and purchase-order metadata. Temporary URLs are used promptly and are not treated as permanent storage references.
Snowflake Consolidate shipment, booking, milestone, and purchase-order data for supply-chain reporting and analytics. Flexport → Martini → Snowflake Scheduled Martini workflows page through Flexport resources, normalize nested JSON into analytical structures, checkpoint progress, and load the results into Snowflake. Reconciliation counts and update timestamps identify missed or duplicated data.

How to build a Flexport integration in Martini

Objective

Establish Flexport API access using the account’s OAuth 2.0-based authorization configuration and bearer-token request pattern.

Instructions in Martini

  • Confirm the Flexport product, tenant permissions, scopes, grant, and token endpoint
  • Store client credentials, access tokens, and webhook verification material in Martini Secrets Management
  • Configure the workflow to send the bearer token without exposing credentials in definitions or logs

Objective

Select an event-driven or scheduled entry point based on the Flexport resource and the required freshness of the integration.

Instructions in Martini

  • Use a Martini API or webhook workflow for supported Flexport notifications
  • Use a scheduler for polling, reconciliation, and resources without suitable event coverage
  • Define a replay path for missed notifications and failed synchronization windows

Objective

Call the relevant Flexport REST resource and obtain complete current data for processing.

Instructions in Martini

  • Request Shipments, Bookings, Purchase Orders, Products, Commercial Invoices, or milestones as required
  • Implement endpoint-specific pagination and supported incremental filters
  • Retrieve the current resource when a webhook payload contains only an identifier

Objective

Coordinate validation, enrichment, routing, target writes, and integration state within a maintainable Martini workflow.

Instructions in Martini

  • Separate notification receipt from downstream processing when asynchronous handling is appropriate
  • Correlate Flexport resources with source-system identifiers
  • Persist checkpoints, event keys, response identifiers, and reconciliation information

Objective

Convert Flexport JSON and logistics status models into canonical and target-specific structures.

Instructions in Martini

  • Map shipment identifiers, dates, carrier details, Products, and milestones
  • Keep original Flexport statuses alongside normalized values
  • Handle unknown fields and enum values explicitly rather than silently treating them as completed

Objective

Protect data quality and operational correctness before writing to downstream systems or Flexport.

Instructions in Martini

  • Validate required fields and account for partial updates
  • Prevent duplicate submissions and duplicate event processing
  • Reject stale events and preserve estimated dates separately from actual completion dates

Common Flexport data objects used in integrations

ObjectTypical UseCommon target systemsMartini handling
ShipmentsRepresent freight movements and shipment-level operational information, including carrier context, dates, status, and related milestones.NetSuite, SAP S/4HANA, Microsoft Dynamics 365, Salesforce, Shopify, SnowflakeMartini retrieves or receives shipment changes, preserves the original Flexport status, maps identifiers and dates to a canonical shipment model, and applies freshness and idempotency rules before delivery.
BookingsRepresent freight booking requests and confirmed carrier or transport arrangements.SAP S/4HANA, NetSuite, Microsoft Dynamics 365, SnowflakeMartini maps booking references and status values, correlates bookings with Shipments, validates required fields, and records failed or unmapped states for reconciliation.
Purchase OrdersAssociate goods being shipped with procurement and logistics execution.NetSuite, SAP S/4HANA, Microsoft Dynamics 365, ShopifyMartini transforms ERP purchase-order lines into Flexport request structures, preserves external identifiers, prevents duplicate submissions, and stores Flexport response identifiers.
ProductsRepresent items or SKUs associated with purchase orders, inventory, and shipments.NetSuite, SAP S/4HANA, Microsoft Dynamics 365, Shopify, SnowflakeMartini maps SKU, quantity, descriptions, and references where available, applies validation and normalization, and correlates Products with Purchase Orders and Shipments.
Commercial InvoicesProvide commercial documentation used for customs and shipment processing.NetSuite, SAP S/4HANA, Microsoft SharePoint, internal document repositoriesMartini retrieves metadata or supported document content, validates file type and size, protects sensitive data, and delivers the document with shipment and purchase-order context.
Shipment milestonesDescribe operational events such as booking, departure, arrival, customs, and delivery.Salesforce, NetSuite, SAP S/4HANA, Microsoft Dynamics 365, SnowflakeMartini normalizes milestone names and timestamps, keeps estimated and actual dates distinct, rejects stale updates, and routes unknown statuses for review.

Authentication and security considerations

OAuth 2.0-based bearer authentication

Flexport API access uses bearer access tokens and developer documentation describes OAuth 2.0-based authorization. The required grant, scopes, token lifetime, tenant permissions, and enabled API products must be confirmed for each account.

Credential protection

  • Store client credentials, access tokens, webhook verification material, and document access references in Martini Secrets Management.
  • Do not place authorization headers or secrets in workflow definitions or application logs.
  • Restrict Martini endpoints that receive Flexport notifications and validate requests according to Flexport’s documented requirements.

Sensitive logistics data

Commercial invoices, customs information, shipment data, and temporary document URLs should be treated as sensitive business data. Apply least-privilege access, controlled retention, and secure transfer practices.

Operational considerations for Flexport integrations

Rate limits and pagination

Confirm limits for the relevant Flexport API product. Use bounded concurrency, backoff for HTTP 429 responses, endpoint-specific pagination, and checkpoints for long-running synchronizations.

Events and idempotency

Webhook notifications may be duplicated or delivered out of order. Store event identifiers or stable business keys, retrieve current resources when needed, and prevent older events from overwriting newer shipment state.

Schema and status changes

Preserve original Flexport statuses alongside normalized values. Validate required fields and monitor enum, nested-object, pagination, and authentication changes without failing on harmless additive fields.

Documents and reconciliation

Confirm whether document endpoints return content, temporary URLs, identifiers, or metadata. Download expiring references promptly, validate files, and reconcile Shipments, Bookings, Purchase Orders, and Products using counts and update timestamps.

Testing and monitoring

Test representative success, validation, rate-limit, duplicate, out-of-order, and partial-update cases. Monitor workflow outcomes, retries, checkpoint progress, and unmapped statuses while avoiding sensitive payloads in logs.

Why use Martini instead of scripts or point-to-point integrations?

Centralized orchestration

Martini centralizes Flexport API calls, webhook receipt, scheduling, transformation, business rules, target writes, and exception handling in maintainable workflows rather than distributing logic across scripts.

Reusable integration assets

Teams can expose normalized APIs, reuse authentication and mapping logic, and apply consistent idempotency, checkpointing, retry, and reconciliation patterns across Flexport resources and target applications.

Adaptable implementation

Because the integration uses documented Flexport APIs and supported notifications, Martini can accommodate account-specific permissions, resource coverage, evolving status models, and different downstream data contracts without creating separate point-to-point implementations for every target.

Frequently asked questions

How can Flexport be integrated with enterprise systems?

Flexport can be integrated through its REST APIs, bearer-token authentication with OAuth 2.0-based authorization, and webhook-style notifications for selected events and resources. Enterprise workflows can synchronize Shipments, Bookings, Purchase Orders, Products, Commercial Invoices, and milestones with ERP, commerce, CRM, document, warehouse, or analytics applications.

Can Martini integrate with Flexport?

Yes. Martini can consume Flexport REST APIs, receive supported webhook notifications through an exposed API or workflow, map Flexport JSON, apply business rules, and synchronize the results with enterprise applications. Exact resource and event availability depends on the Flexport account and enabled products.

Do I need a connector to integrate Flexport with Martini?

No. A dedicated Flexport connector is not required. Martini can integrate using Flexport’s confirmed native mechanisms, including REST APIs, bearer-token authentication, selected webhook notifications, and supported document endpoints.

Is there any extra Lonti cost to integrate Flexport with Martini?

Lonti does not charge an additional per-connector or per-vendor fee to integrate Flexport. The integration is subject to the provisioned capacity of the Martini environment. Separate costs may apply from Flexport, cloud infrastructure, or other third-party systems based on subscription, usage, and deployment model.

Which Flexport integration methods should new projects use?

REST APIs are the primary recommended mechanism. Use selected webhook notifications where the required event is supported, and use scheduled, paginated synchronization for reconciliation or resources without adequate event coverage. GraphQL and SOAP were not confirmed in the available Flexport materials.

Are Flexport events or webhooks available?

Flexport supports webhook-style notifications for selected events and resources, but coverage is not universal. The account and API documentation should be checked for event types, subscription configuration, signatures, retry behavior, payload completeness, ordering, and duplicate delivery.

How does Martini synchronize Flexport data?

Martini can run scheduled workflows or process supported notifications, call the relevant REST endpoints, follow endpoint-specific pagination, and persist timestamps, cursors, identifiers, and deduplication keys. It can then map and transform data for target systems and reconcile missed or failed updates.

How does Martini handle Flexport errors, retries, and duplicates?

Martini workflows can validate requests, apply bounded retries and backoff for transient failures such as rate limiting, persist idempotency keys, and route unrecoverable errors for operational review. Webhook processing should account for duplicate delivery, out-of-order events, and stale resource updates.