# EDI 310 Specification: Ocean B/L and Freight Invoice

> EDI 310 explained: the ocean bill of lading and freight invoice, its B3, V1, R4, N7 and L1 segments, a live sample, and how it fits with the 300, 301 and 315.

<QuickAnswer>
The EDI 310 Freight Receipt and Invoice (Ocean) is the X12 transaction an ocean carrier sends to report bill of lading data and bill freight for one shipment. It carries the B/L and booking numbers, vessel and voyage, shipper, consignee and notify parties, ports, container and seal numbers, cargo, and every charge with the total due.
</QuickAnswer>

**The EDI 310 is the ocean bill of lading and the freight bill in one electronic document.** Once an ocean carrier has your cargo on its books, it sends a 310 with what it will print on the bill of lading and what it intends to charge. Importers, NVOCCs and forwarders use it to check the B/L before it is released, to match containers to purchase orders, and to audit ocean freight before paying.

This guide covers what the 310 carries, where it sits next to the 300, 301, 304 and 315, every segment you will map, a live sample with two 40-foot containers, how it differs from the motor-carrier 210, and the errors that cause B/L amendments and disputed invoices.

<EDIGuideCTA
  transactionType="310"
  headline="Get the purchase order right before it ever reaches a vessel"
  body="OrderSync reads inbound purchase orders in any format, from EDI 850s to PDFs, emails and spreadsheets, matches customers, items and units to your catalog, and sends clean data to your ERP. The PO numbers on your bills of lading start there."
/>

## What Is an EDI 310?

**An EDI 310 is the Freight Receipt and Invoice (Ocean) transaction set defined by [ASC X12](https://x12.org/products/transaction-sets), used by an ocean carrier to send bill of lading information and freight charges for a shipment.** The X12 description of the set lists several uses for the same data: a receipt for the shipment, a substitute for the paper bill of lading, a copy for verification or information, a manifest, and a freight invoice. Which of those a given carrier means by its 310 is set out in its implementation guide. The 310 travels in functional group `IO` (the `GS01` value).

Authoritative references for 310 work:

- The [X12 transaction set catalog](https://x12.org/products/transaction-sets) defines the 310 structure, segment order and loops
- [Stedi's X12 004010 reference for the 310](https://www.stedi.com/edi/x12-004010/310) lists the segments, elements and code values for release 004010
- The UN/LOCODE list maintained by UNECE supplies the five-character location codes (such as `CNSHA` for Shanghai and `USLAX` for Los Angeles) most carriers send in the `R4` port segments
- The [BIC container prefix register](https://www.bic-code.org/) governs the four-letter owner codes used in container numbers under ISO 6346, which appear in the `N7` segment
- Each ocean carrier publishes its own 310 implementation guide, which sets the reference numbers it sends, its charge codes and whether the 310 is a draft, a final B/L or an invoice

**Who sends it?** The ocean carrier, or an NVOCC acting as carrier to its own customers.

**Who receives it?** The party that booked the cargo or pays the freight: a shipper on prepaid exports, a consignee or importer on collect shipments, or the forwarder or NVOCC managing the move for them.

**When is it sent?** After the shipping instructions are received and the carrier has issued or drafted the bill of lading. Carriers often send a new 310 when the B/L is amended or when charges change.

**Why does it matter?** The bill of lading is the document that controls release of the cargo at destination. A wrong consignee, container number or port on the 310 means a B/L amendment. A wrong charge means an invoice dispute. Both are cheaper to catch on the 310 than after the vessel arrives.

## The Ocean Document Flow: 300, 301, 304, 310 and 315

Ocean EDI has its own family of transaction sets, separate from the motor-carrier sets most shippers know. The ones you will meet on a typical full-container-load move:

| Set | X12 name | Usually sent by | What it does |
|---|---|---|---|
| **300** | Reservation (Booking Request) (Ocean) | Shipper, forwarder or NVOCC | Asks the carrier for space: ports, dates, container count and type, commodity |
| **301** | Confirmation (Ocean) | Ocean carrier | Confirms or changes the booking and returns the booking number |
| **303** | Booking Cancellation (Ocean) | Shipper, forwarder or NVOCC | Cancels a booking |
| **304** | Shipping Instructions | Shipper, forwarder or NVOCC | Gives the carrier the details for the bill of lading: parties, containers, seals, cargo description |
| **310** | Freight Receipt and Invoice (Ocean) | Ocean carrier | Returns the bill of lading data and the freight charges |
| **315** | Status Details (Ocean) | Ocean carrier | Reports container events from empty pickup to empty return. See the [EDI 315 guide](/guides/edi/315-status-details-ocean) |
| **312** | Arrival Notice (Ocean) | Ocean carrier | Tells the consignee or notify party the cargo is arriving |

A typical sequence runs: 300 booking request, 301 confirmation with the booking number, empty container pickup and gate-in (reported on 315s), 304 shipping instructions before the documentation cutoff, 310 with the bill of lading and charges, then 315 events for loading, departure, arrival, discharge and release. Carriers differ in which sets they support and whether they send them directly or through a carrier portal or network, so treat the sequence as typical rather than fixed.

The booking number from the 301 and the bill of lading number from the 310 are the two references that tie everything together. Store both against your purchase orders.

## Interactive Example: 310 for Two 40-Foot Containers, Freight Collect

An ocean carrier (SCAC `BLUQ`) bills a US importer for two 40-foot high cube containers of wooden furniture parts moving from Shanghai to Los Angeles, with final delivery to the importer's warehouse in Ontario, California. The freight is collect, so the consignee pays. The `N9` segments carry the bill of lading, booking and purchase order numbers. `V1` names the vessel and voyage. The `R4` loops give the place of receipt, port of loading (with the actual departure date), port of discharge (with the estimated arrival) and place of delivery. Each container has an `N7` with its seal in `M7`, the cargo is described once in `L0` and `L5`, and the `L1` lines bill ocean freight and bunker per container plus a documentation charge. `L3` closes with the total. All names, numbers and codes for the parties, carrier, vessel and containers are fictional.

Use the **Plain English** tab for a readable summary, or click any segment to break it down element by element.

<EDISample id="310-ocean-freight-invoice-collect" />

## 310 Structure at a Glance

The table follows X12 release 004010 and lists the segments most carriers use. The standard has more (letters of credit, insurance, hazardous materials, export licences), which carriers include only when the shipment needs them.

| Area | Segment | Name | Usage in the standard | Notes |
|---|---|---|---|---|
| Heading | **ST** | Transaction Set Header | Mandatory | `ST01` = `310` |
| Heading | **B3** | Beginning Segment for Carrier's Invoice | Mandatory | Invoice number, payment terms, date, net amount due, SCAC |
| Heading | **B2A** | Set Purpose | Optional | Used by some carriers to flag an original, change or cancellation |
| Heading | **N9** | Reference Identification | Optional, up to 15 | B/L, booking, PO and other references |
| Heading | **V1** | Vessel Identification | Mandatory | Vessel code and name, flag, voyage, carrier |
| Heading | **C3** | Currency | Optional | Currency of the charges |
| Heading loop | **N1 / N2 / N3 / N4** | Name and address | Mandatory, up to 10 | Shipper, consignee, notify party and others |
| Heading loop | **R4 / DTM** | Port or Terminal, Date/Time | Mandatory, up to 20 | Receipt, loading, discharge and delivery points, with dates |
| Heading | **K1** | Remarks | Optional | Free-text clauses and remarks |
| Detail loop | **LX** | Assigned Number | Mandatory, repeats | One loop per group of containers and cargo |
| Detail loop | **N7** | Equipment Details | Optional loop | One per container |
| Detail loop | **M7** | Seal Numbers | Optional | Up to four seals per segment |
| Detail loop | **L0** | Line Item: Quantity and Weight | Optional loop | Piece count, weight and volume |
| Detail loop | **L5** | Description, Marks and Numbers | Optional | Cargo description and commodity codes |
| Detail loop | **L1** | Rate and Charges | Optional loop | One per charge |
| Summary | **L3** | Total Weight and Charges | Mandatory | Totals for the shipment |
| Summary | **SE** | Transaction Set Trailer | Mandatory | Segment count and control number |

"Optional" in the standard is often "required" in a carrier's guide. Most carriers send `N9` with the B/L number on every 310.

## Key Segments Explained

### B3: Beginning Segment for Carrier's Invoice

```
B3**FI-26110455**CC*K*20261105*576500****BLUQ~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **B302** | Invoice Number | `FI-26110455` | The carrier's invoice or freight bill number |
| **B303** | Shipment Identification Number | | A shipper-assigned shipment ID, when sent |
| **B304** | Shipment Method of Payment | `CC` | `CC` collect, `PP` prepaid (by seller), `TP` third party pay, `MX` mixed |
| **B305** | Weight Unit Code | `K` | `K` kilograms, `L` pounds |
| **B306** | Date | `20261105` | Billing date |
| **B307** | Net Amount Due | `576500` | Total due, with two implied decimals: 5,765.00 |
| **B311** | Standard Carrier Alpha Code | `BLUQ` | The billing carrier's SCAC |

Some carriers put the bill of lading number in `B302` and send no separate invoice number. Others keep the two apart and send the B/L in `N9`. The guide says which, and your match logic needs to know before go-live.

### N9: Reference Identification

```
N9*BM*BLUQSHA2611045~
N9*BN*BK7730412~
N9*PO*4500918832~
```

| Qualifier | Meaning | Why you need it |
|---|---|---|
| `BM` | Bill of lading number | The key for release, customs entry and the 315 status feed |
| `BN` | Booking number | Ties the 310 to the 301 booking confirmation |
| `PO` | Purchase order number | Ties the containers to your own orders |
| `MB` | Master bill of lading | Sent when the B/L is a house bill under a master, common with NVOCCs |
| `SI` | Shipper's identifying number for shipment | The shipper's own shipment reference |

### V1: Vessel Identification

```
V1*9700017*MERIDIAN HARBOR*LR*118E*BLUQ***L~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **V101** | Vessel Code | `9700017` | The vessel's identifying code, here a Lloyd's (IMO) number |
| **V102** | Vessel Name | `MERIDIAN HARBOR` | Vessel name |
| **V103** | Country Code | `LR` | Country of registry (flag) |
| **V104** | Flight/Voyage Number | `118E` | Voyage number |
| **V105** | Standard Carrier Alpha Code | `BLUQ` | The ocean carrier |
| **V108** | Vessel Code Qualifier | `L` | Source of `V101`: `L` Lloyd's Register of Shipping, `C` ship's radio call sign |

The standard needs at least one of `V101` or `V102`. Vessel names repeat across fleets, so match on the code when the carrier sends one.

### N1 Loop: Shipper, Consignee and Notify Party

```
N1*SH*LINHAI WOODCRAFT CO LTD~
N1*CN*CASCADE HOME IMPORTS LLC~
N1*N1*PACIFIC GATEWAY CUSTOMS BROKERS~
```

`N101` gives the role: `SH` shipper, `CN` consignee, `N1` notify party, with `N2` for a second notify party and `FW` for a forwarder when the carrier sends them. These are the names the carrier will print on the bill of lading. Check the consignee and notify party against your 304 shipping instructions on every 310: a consignee error on a B/L is the classic reason cargo cannot be released at destination.

### R4 Loop: Port or Terminal

```
R4*R*UN*CNSHA*SHANGHAI*CN~
R4*L*UN*CNSHA*SHANGHAI*CN~
DTM*370*20261104~
R4*D*UN*USLAX*LOS ANGELES*US~
DTM*371*20261119~
R4*E*UN*USONT*ONTARIO*US~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **R401** | Port or Terminal Function Code | `L` | The role of this location (see below) |
| **R402** | Location Qualifier | `UN` | `UN` means `R403` is a UN/LOCODE |
| **R403** | Location Identifier | `CNSHA` | The location code |
| **R404** | Port Name | `SHANGHAI` | Name |
| **R405** | Country Code | `CN` | Country |
| **R406** | Terminal Name | | Terminal, when sent |

Common `R401` values: `R` place of receipt, `L` port of loading, `D` port of discharge, `E` place of delivery, `T` transshipment port. The `DTM` after an `R4` dates the event at that location: `370` actual departure date and `371` estimated arrival date in this sample. Other qualifiers you will see include `369` estimated departure and `372` actual arrival, and some carriers use the generic `139` estimated and `140` actual.

### N7 and M7: Equipment Details and Seal Numbers

```
N7*QXZU*412873*9210*G*******CN******K*2****45G1~
M7*CN4417203~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **N701** | Equipment Initial | `QXZU` | The four-letter owner prefix of the container number |
| **N702** | Equipment Number | `412873` | The six-digit serial number |
| **N703** | Weight | `9210` | Weight of the container's contents |
| **N704** | Weight Qualifier | `G` | `G` gross weight |
| **N711** | Equipment Description Code | `CN` | `CN` container |
| **N717** | Weight Unit Code | `K` | Kilograms |
| **N718** | Equipment Number Check Digit | `2` | The ISO 6346 check digit |
| **N722** | Equipment Type | `45G1` | A four-character equipment type code; `45G1` is the ISO 6346 size-type code for a 40-foot high cube general-purpose container |
| **M701** | Seal Number | `CN4417203` | The seal on that container |

Put the prefix, serial and check digit together and you get the container number as it is painted on the box: `QXZU4128732`. Some carriers send the check digit inside `N702` instead of `N718`. Which equipment type codes a carrier sends in `N722` (ISO size-type codes or older four-digit codes) is set by its guide. Seal numbers matter because a seal mismatch at the terminal or at customs examination is a hold.

### L0 and L5: Quantity, Weight and Description

```
L0*1***18420*G*58.4*X*1240*CTN**K~
L5*1*WOODEN FURNITURE PARTS~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **L001** | Lading Line Item Number | `1` | Line number, shared with `L5` and `L1` |
| **L004 / L005** | Weight, Weight Qualifier | `18420` / `G` | Gross weight |
| **L006 / L007** | Volume, Volume Unit Qualifier | `58.4` / `X` | `X` cubic meters, `E` cubic feet |
| **L008 / L009** | Lading Quantity, Packaging Form Code | `1240` / `CTN` | 1,240 cartons |
| **L011** | Weight Unit Code | `K` | Kilograms |
| **L502** | Lading Description | `WOODEN FURNITURE PARTS` | The cargo description that will appear on the B/L |

`L5` can also carry a commodity code with its qualifier, such as a Harmonized Tariff Schedule number (`L504` = `A`) or a Schedule B number (`J`), and marks and numbers in `L506`.

### L1: Rate and Charges

```
L1*1*2450*PA*490000****COF~
L1*2*395*PA*79000****BUA~
L1*3*75*LS*7500****DOC~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **L101** | Lading Line Item Number | `1` | Charge line number |
| **L102** | Freight Rate | `2450` | The rate |
| **L103** | Rate/Value Qualifier | `PA` | How the rate applies: `PA` per container, `PE` per TEU, `LS` lump sum |
| **L104** | Charge | `490000` | The charge, two implied decimals: 4,900.00 |
| **L108** | Special Charge or Allowance Code | `COF` | What the charge is |
| **L112** | Special Charge Description | | Free-text name, used when no code fits |

The X12 code list for `L108` includes `COF` ocean freight, `BUA` bunker adjustment (with `BU2` and `BU4` for 20- and 40-foot containers), `BSC` bunker surcharge, `DOC` documentation charge, `TER` terminal charge and `DTC` destination charge. Carriers do not all use the same codes for the same surcharge, and many send their own charge names in `L112`. Map each carrier's charge codes to your own freight cost categories once, from its guide, rather than trusting the description text.

### L3: Total Weight and Charges

```
L3*18420*G***576500****58.4*X*1240*K~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **L301 / L302** | Weight, Weight Qualifier | `18420` / `G` | Total gross weight |
| **L305** | Charge | `576500` | Total charges: 5,765.00 |
| **L309 / L310** | Volume, Volume Unit Qualifier | `58.4` / `X` | Total volume |
| **L311** | Lading Quantity | `1240` | Total pieces |
| **L312** | Weight Unit Code | `K` | Kilograms |

Check that the `L1` charges add up to `L305` and to `B307`. In the sample: 4,900.00 + 790.00 + 75.00 = 5,765.00.

## EDI 310 vs 210, 211, 315 and 810

| Document | Mode | Sent by | Purpose |
|---|---|---|---|
| **310 Freight Receipt and Invoice (Ocean)** | Ocean | Ocean carrier | Bill of lading data and ocean freight charges |
| **[210 Motor Carrier Freight Details and Invoice](/guides/edi/210-motor-carrier-freight-invoice)** | Truck | Motor carrier | Freight invoice for a truck move |
| **[211 Motor Carrier Bill of Lading](/guides/edi/211-motor-carrier-bill-of-lading)** | Truck | Shipper | Bill of lading details sent to a motor carrier |
| **[315 Status Details (Ocean)](/guides/edi/315-status-details-ocean)** | Ocean | Ocean carrier | Container status events |
| **[214 Shipment Status Message](/guides/edi/214-transportation-carrier-shipment-status)** | Truck and other modes | Carrier | Shipment status events |
| **[810 Invoice](/guides/edi/810-invoice)** | n/a | Seller | Bills the buyer for goods, not transport |

The 210 and 310 share segment names (`B3`, `L0`, `L1`, `L3`, `L5`), so the mapping work looks familiar if you already audit truck freight. The differences are the ocean-specific pieces: the vessel (`V1`), the port and place roles (`R4`), the container and seal detail (`N7`, `M7`), and the fact that on ocean freight the same document doubles as the bill of lading. An importer bringing in a container usually sees both: a 310 from the ocean carrier for the port-to-port leg, and a [210](/guides/edi/210-motor-carrier-freight-invoice) from the drayage or trucking company for the move from the port. Moves inland under the ocean carrier's own bill (as in this sample, with a place of delivery in Ontario, California) can appear on the 310 instead.

## Common 310 Errors and How to Prevent Them

| Error | What happens | Prevention |
|---|---|---|
| **310 not matched to the booking** | Charges sit unapproved; B/L draft goes unchecked | Match on the booking number (`N9*BN`) and B/L number (`N9*BM`), and alert when a booking has no 310 after the documentation cutoff |
| **Consignee or notify party differs from the 304** | B/L amendment, or cargo cannot be released at destination | Compare every `N1` on the 310 with your shipping instructions before the B/L is final |
| **Container or seal mismatch** | Holds at the terminal, customs questions, wrong containers tracked | Validate container numbers with the ISO 6346 check digit and compare `N7`/`M7` with your packing and loading records |
| **Charges do not add up** | Invoice disputes and short payments | Sum the `L1` charges and compare with `L3` and `B307` on receipt |
| **Unknown charge codes** | Costs land in the wrong ledger account | Keep a per-carrier table of `L108` codes and flag any code that is not in it |
| **Revised 310 overwrites an approved one** | Paid invoice changes without review | Version 310s by B/L number and route changed charges back for approval |
| **Prepaid and collect confused** | Both shipper and consignee think the other is paying | Read `B304` and check it against the Incoterms on the purchase order |
| **Units misread** | Weights off by a factor of 2.2, volumes by 35 | Always read the weight and volume unit codes; do not assume kilograms or cubic meters |

## 310 Implementation Checklist

Before your first live 310 from an ocean carrier or NVOCC:

- Get the carrier's 310 implementation guide and confirm the X12 version in `GS08` (004010 is common)
- Confirm whether the 310 is a draft B/L, a final B/L, a freight invoice, or all three, and how a revision is flagged
- Agree where the B/L number, booking number and invoice number appear
- List the `N9` qualifiers it sends, and make sure your purchase order numbers come through
- Load its charge codes (`L108`) and map them to your cost categories
- Store container numbers with check digits and seals against the purchase orders they carry
- Decide how 310 data updates your landed cost and how disputes go back to the carrier
- Link the B/L number to your [EDI 315 status feed](/guides/edi/315-status-details-ocean) so the same shipment shows booking, B/L, charges and events together
- Confirm the 997 you will send back for each 310
- Test an original, a revision, a prepaid shipment, a collect shipment and a multi-container B/L

If you are building out ocean EDI next to your retail documents, our [EDI document types reference](/edi-document-types) shows how transportation sets sit beside the [850 purchase order](/guides/edi/850-purchase-order), the [856 ASN](/guides/edi/856-ship-notice) and the [810 invoice](/guides/edi/810-invoice). For background on the paper document, see our [bill of lading glossary entry](/glossary/bill-of-lading).

## Where OrderSync Fits

Every container on a 310 started as a purchase order. The PO number in `N9`, the cargo in `L5` and the quantities the importer expects to receive all depend on that order being captured correctly in the first place, whether it arrived as an EDI 850, a PDF, an email or a spreadsheet.

OrderSync reads inbound orders in any format, matches customers, items and units to your catalog, and outputs clean ERP data or valid X12. Paste any 310 into the [free EDI inspector](/edi-inspector) to see it parsed segment by segment with a plain-English summary and any structural errors explained, or [book a 15-minute walkthrough](/book-call) to see your own orders processed.

## Frequently Asked Questions

<div className="not-prose">

### What is an EDI 310?

The EDI 310 Freight Receipt and Invoice (Ocean) is the X12 transaction an ocean carrier uses to send bill of lading information and freight charges for a shipment. It carries the B/L and booking numbers, vessel and voyage, parties, ports, containers, seals, cargo description and the charges with the total due.

### Is the EDI 310 a bill of lading or an invoice?

It can be either or both. The X12 standard allows the 310 to serve as a shipment receipt, a substitute for the paper bill of lading, an information copy, a manifest or a freight invoice. Each carrier's implementation guide says how it uses the 310 and how it marks drafts and revisions.

### What is the difference between EDI 310 and EDI 210?

The 210 is the motor carrier freight invoice for truck moves. The 310 is the ocean equivalent and also carries bill of lading data: vessel and voyage, ports, container numbers and seals. Both use the B3, L0, L1 and L3 segments for references, quantities and charges.

### Who sends and receives the EDI 310?

The ocean carrier, or an NVOCC acting as carrier, sends it. The shipper receives it on prepaid freight, the consignee or importer on collect freight, and forwarders and NVOCCs receive it for the shipments they manage.

### How does the 310 relate to the 300, 301 and 304?

The 300 requests a booking and the 301 confirms it with a booking number. The 304 sends the shipping instructions for the bill of lading. The 310 comes back from the carrier with the B/L data and the charges, usually referencing the booking number so you can match it.

### Where is the container number in a 310?

In the N7 segment inside the LX loop. N701 is the four-letter owner prefix, N702 is the serial number and N718, when sent, is the check digit. Seal numbers follow in M7.

### What functional group and version does the 310 use?

The 310 travels in functional group IO, the value in GS01. Many carrier guides use X12 release 004010, and the version for a given carrier is named in GS08.

### How do I check the charges on a 310?

Add the L1 charge amounts and compare the sum with L305 in the L3 segment and with B307, the net amount due. Then check each charge code in L108 against the rate you agreed with the carrier.

</div>
