Skip to main content

Flexport Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow data flow that sends data to a Flexport location.
flexport_api.png

Flexport

Create a Flexport Destination

  1. Click the + icon on the Nexset that will be sent to the Flexport destination, and select the Send to Destination option from the menu.

  2. Select the Flexport connector from the list of available destination connectors. Then, select the credential that will be used to connect to the Flexport account, and click Next; or, create a new Flexport credential for use in this flow.

  3. In Nexla, Flexport destinations can be created using pre-built endpoint templates, which expedite destination setup for common Flexport API operations. Each template is designed specifically for the corresponding Flexport endpoint, making destination configuration easy and efficient.
    • To configure this destination using a template, follow the instructions in Configure Using a Template.

    Flexport destinations can also be configured manually, allowing you to send data to Flexport API endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this destination manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Flexport endpoints. Each template is designed specifically for the corresponding Flexport API operation, making destination setup easy and efficient.

  • To configure this destination using a template, select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

    Create a Freight Booking (Ocean, Air, or Trucking)

    Creates a new freight booking in Flexport for ocean, air, or trucking shipments. Use this destination endpoint when you want to automate the creation of freight bookings in Flexport by pushing booking request data from Nexla. This is useful for organizations that generate booking data in other systems and need to submit those bookings to Flexport programmatically.

    • No additional URL parameters are required for this endpoint. Nexla will send the booking details from the Nexset as a JSON request body to the Flexport bookings API at https://api.flexport.com/bookings.
    • Ensure the Nexset data is structured to match the fields expected by the Flexport bookings API. At a minimum, the request body should include freight mode, shipper, consignee, cargo details, and requested sailing dates. Refer to the Flexport booking tutorial for the required field structure.

    Bookings created via this endpoint will appear in the Flexport Platform under your account's shipment management section. Ensure your Flexport credential has the appropriate permissions to create bookings before using this endpoint.

    Update / Cancel a Fulfillment Order

    Updates or cancels an existing fulfillment order in Flexport by its order ID. Use this destination when you need to modify order details—such as shipping address, requested delivery date, or order status—or to programmatically cancel orders. This is particularly useful for integrations that need to keep Flexport fulfillment orders in sync with an external OMS or ERP.

    • Enter the unique Flexport order ID of the fulfillment order to update or cancel in the Order ID field. This field is required.
    • The request body sent by Nexla should contain only the fields you want to update, formatted as JSON. To cancel an order, include the appropriate cancellation status field in the request body. Refer to the Flexport Logistics API documentation for supported update fields.

    This endpoint uses the PATCH HTTP method, which means only the fields included in the request body will be updated. Fields not included in the payload will retain their current values in Flexport.

    Update an Existing Product Record

    Updates an existing product record in the Flexport product catalog by its product ID. Use this destination to keep your Flexport product catalog synchronized with external product information systems—such as a PIM, ERP, or e-commerce platform—by pushing product attribute updates programmatically.

    • Enter the unique Flexport product ID of the product record to update in the Product ID field. This field is required.
    • The request body sent by Nexla should contain the product fields to update, formatted as JSON. Updatable fields may include product name, description, dimensions, weight, and SKU attributes. Refer to the Flexport Products API tutorial for supported fields and formats.

    This endpoint uses the PATCH HTTP method. Only the fields included in the request payload will be updated; all other product attributes will remain unchanged.

    Purchase a Selected Shipping Quote for an Inbound Shipment

    Purchases a specific shipping quote for an inbound shipment in Flexport. Use this destination endpoint to automate the carrier selection and quote purchase step in your inbound shipment workflow, enabling straight-through processing from quote retrieval to purchase confirmation.

    • Enter the unique identifier of the inbound shipment in the Shipment ID field. This field is required.
    • Enter the unique identifier of the shipping quote to purchase in the Quote ID field. This field is required. Quote IDs can be retrieved using the Get Shipment Quotes source endpoint.

    Purchasing a quote commits to using the selected carrier and rate for the inbound shipment. Ensure the correct quote ID is provided before executing this action. For reference, see the Flexport Inbounds API documentation.

    Asynchronously Request Shipping Quotes for an Inbound Shipment

    Asynchronously requests shipping quotes for an inbound shipment in Flexport. This endpoint initiates the quoting process, and the resulting quotes can be retrieved using the Get Shipment Quotes source endpoint once they are ready. Use this endpoint to trigger the quoting process as part of an automated inbound shipment workflow.

    • Enter the unique identifier of the inbound shipment for which to request quotes in the Shipment ID field. This field is required.

    Quote generation is asynchronous—after initiating the request with this endpoint, allow time for Flexport to process and generate the quotes before retrieving them. For reference, see the Flexport Inbounds API documentation.

    Update an Existing Inbound Inventory Shipment

    Updates an existing inbound inventory shipment in Flexport. Use this destination to modify shipment details—such as origin address, item quantities, packaging, or prep instructions—after the initial shipment has been created. This is useful for workflows that need to incorporate late-breaking changes from external systems before a shipment is finalized.

    • Enter the unique identifier of the inbound shipment to update in the Shipment ID field. This field is required.
    • The request body sent by Nexla should contain the shipment fields to update, formatted as JSON. Refer to the Flexport Inbounds API documentation for supported fields.

    Cancel a Fulfillment Order

    Cancels a fulfillment order in Flexport by its order ID. Use this destination to programmatically cancel orders that should not be fulfilled—for example, due to customer cancellation requests, fraud checks, or out-of-stock conditions detected in an upstream system.

    • Enter the unique Flexport order ID of the fulfillment order to cancel in the Order ID field. This field is required.

    Cancelling an order may not be possible if the order has already progressed beyond a certain fulfillment state. For reference, see the Flexport Orders API documentation.

    Retry Fulfillment of a Failed Order

    Retries fulfillment of a previously failed order in Flexport. Use this destination endpoint to re-trigger fulfillment processing for orders that encountered errors—enabling automated recovery workflows that detect failed orders and resubmit them without manual intervention.

    • Enter the unique Flexport order ID of the failed order to retry in the Order ID field. This field is required.

    For reference, see the Flexport Orders API documentation.

    Cancel a Parcel Shipping Label

    Cancels a parcel shipping label that was previously created in Flexport. Use this destination endpoint when a package should not be shipped—for example, due to an order cancellation or a packing error—to void the label and prevent unintended shipments.

    • Enter the unique Flexport parcel ID of the label to cancel in the Parcel ID field. This field is required.

    Label cancellation may be subject to time constraints depending on the carrier. For reference, see the Flexport Parcels API documentation.

    Delete a Product from the Flexport Product Catalog

    Deletes a product from the Flexport product catalog by its product ID. Use this destination to programmatically remove discontinued or erroneous product records from Flexport, keeping your catalog synchronized with an external product management system.

    • Enter the unique Flexport product ID of the product to delete in the Product ID field. This field is required.

    :::warning Important Product deletion is permanent. Ensure that the correct product ID is provided and that the product is no longer needed before executing this action. For reference, see the Flexport Products API documentation. :::

    Exchange an Authorization Code for an OAuth Access Token

    Exchanges an OAuth 2.0 authorization code for a Flexport access token. Use this destination endpoint when building OAuth flows that require programmatic token exchange—for example, in partner or multi-merchant integration scenarios where Flexport OAuth credentials are used instead of API keys.

    • Enter the authorization code received from the Flexport authorization server in the Authorization Code field. This field is required.
    • Enter the Client ID issued by Flexport for your OAuth application in the Client ID field. This field is required.
    • Enter the Client Secret issued by Flexport for your OAuth application in the Client Secret field. This field is required.

    This endpoint posts to https://logistics-api.flexport.com/logistics/api/2023-10/oauth/token using the application/x-www-form-urlencoded content type. For reference, see the Flexport OAuth Token Exchange documentation.

Configure Manually

Flexport destinations can be manually configured to send data to any valid Flexport API endpoint.

Using manual configuration, you can also configure Nexla to automatically send the response received from the Flexport API after each call to a new Nexla webhook data source.

API Method

  1. To manually configure this destination, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the Flexport API from the Method pulldown menu. Common methods for Flexport destination operations include:

    • POST: For creating new resources (bookings, orders, inbound shipments, parcels)
    • PATCH: For partial updates to existing resources (orders, products, inbound shipments)
    • DELETE: For removing resources (products, parcel labels)

Data Format

  1. Select the format in which the Nexset data will be sent to the Flexport API from the Content Format pulldown menu. Nexla will automatically convert the data to the selected format for each API call. Flexport API endpoints typically expect JSON (application/json) for POST and PATCH requests.

API Endpoint URL

  1. Enter the URL of the Flexport API endpoint to which you want to send the Nexset data in the URL field. For update or cancel operations, include the ID of the object to be updated at the end of the URL.

Flexport operates two primary API base URLs. Use https://api.flexport.com for freight forwarding and booking endpoints. Use https://logistics-api.flexport.com/logistics/api/2023-10 for fulfillment, orders, inbounds, parcels, products, returns, and OAuth endpoints. Ensure the URL matches the Flexport API surface your credential is configured for.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this destination, enter the headers & corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2).

    You do not need to include the Authorization header here, as it is automatically applied by Nexla using the API key configured in your Flexport credential.

Exclude Attributes from the Call

Optional
  • If any record attributes in the Nexset should be omitted when sending data to this Flexport destination, select the attributes from the Exclude Attributes pulldown menu.

  • Any number of attributes can be selected for exclusion, and all excluded attributes will be shown in the field. To remove an attribute from the list, click the X icon next to the attribute name.

Record Batching

Optional
  1. If records should be sent to this destination in batched API calls, check the box next to Would you like to batch your records together? to enable record batching.

  2. Enter the maximum number of records that should be batched together in a single API call in the Batch Size field. By default, this value is set to 100.

  3. Select the algorithm that will be used to group records into batches from the Grouping Algorithm pulldown menu. The sample request shown in the panel on the right will be updated to reflect the current batching settings. Some algorithms require additional settings—click on an algorithm listed below to view instructions for configuring these settings.

Property Inside JSON Object

  1. Enter the name of the JSON property that should contain the batched records in the Property Name field.
  2. If any additional properties should be included in the request, enter the properties in the Other Props field in JSON format.

Code

  1. Enter the code that will be used to create the batched request in the code editor below the Grouping Algorithm field.

Response Webhook

Optional

Nexla can automatically send the response received from the Flexport API after each call to a new Nexla webhook data source. This option allows you to track the status of each API call and capture any additional information returned by Flexport—such as the generated order ID, shipment ID, or error messages—for downstream processing or auditing.

  • To enable this option, check the box next to Would you like to process the API response as a Nexla Webhook source?.

Sample Request Payload

Sample request payloads containing a portion of the Nexset data that will be sent to the Flexport API endpoint based on the current settings are shown in the Sample Payload panel on the right. These samples can be referenced to ensure that the destination and request settings are correctly configured.

  • Click on a sample request payload to expand it and view the complete payload content.
  • Sample payloads are automatically updated with each setting change, making it easy to verify that changes achieve the desired effect.

Endpoint Testing (Manual Configuration)

After all endpoint settings have been configured, Nexla can send a test payload to the Flexport API to ensure that the destination is configured correctly.

  1. To send a test payload, select the Test button at the top of the Sample Payload panel, and click on a listed sample payload to expand it.

  2. If any modifications to the sample payload are needed, make the necessary changes directly within the sample window.

  3. Click the Send Test Data button at the top of a sample payload to send the test payload to the Flexport API using the current settings.

Save & Activate the Destination

  • Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To begin sending data to the configured Flexport endpoint, open the destination resource menu, and select Activate.

    The Nexset data will not be sent to the Flexport API until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.