This guide explains how to leverage GoFreight’s API to find shipments in GoFreight that you want to read, update, or attach files to.

Step-by-Step Process

Match the Invoice to the Correct Bill of Lading (B/L)

Each invoice must be matched with the appropriate Bill of Lading (B/L) in GoFreight by referencing the correct B/L ID. This ensures that invoices are properly filed in the system.

Follow these steps to associate an invoice with a B/L:

  1. Get the B/L No. or Container

    • First, regardless of whether the information comes from the pre-alert B/L, booking confirmation, or vendor, start by identifying the correct B/L No. or container to locate.
  2. Call the Relevant APIs

    Depending on the information extracted from the invoice, choose the appropriate API to fetch the B/L reference:

    • For Master Bill of Lading (MB/L) Number: If your source file provides an MB/L No., call the Get Shipment Master Bill API to retrieve the MB/L Ref.
    • For House Bill of Lading (HB/L) Number: If your source file provides an HB/L No., call the Get Shipment House Bills API to retrieve the HB/L Ref.
  3. Retrieve the B/L Ref. ID

    Once the API successfully locates the B/L number or Container number, it will return the corresponding Bill of Lading (B/L) reference ID. This ID links the invoice to the appropriate shipment in GoFreight.

  4. Handling Missing or Incorrect B/L Ref. ID

    If the system cannot find a matching B/L reference ID, follow these troubleshooting steps:

    • Notify the User: Display an interface alerting the user that could not find a matched B/L No.
    • Verify Source B/L No. or Container No.: Ensure that the B/L No. or Container No. is accurate.
    • Check for Existing B/Ls in GoFreight: Verify whether the relevant B/L already exists in GoFreight. If not, create a new B/L entry.
    • Retry the Matching Process: After correcting any errors, re-trigger the matching process.
  5. Handling Multiple Matching B/L Ref. IDs

    If the API returns multiple potential B/L reference IDs, take the following steps:

    • Retrieve Detailed B/L Data: Use each B/L Ref. ID to call the Get Ocean Import MB/L by Ref. or Get Ocean Import HB/L by Ref. API to gather full details.
    • Narrow Down the Matches: Use additional shipment information, such as the shipment date, shipper, customer, trucker, and carrier, to help identify the correct B/L.
    • Provide User Interface for Manual Selection: If there are still multiple matches, present a user interface to allow the user to manually select the correct B/L from the list of potential matches.
    • Finalize the Match: Once the user selects the correct B/L, capture the selected B/L Ref. ID and proceed with further processing.