EDI for Ocean Carriers: EDIFACT vs ANSI X12


By GDZ Computer Services · Updated 2026-10-21 · 6 min read · Blog › Shipping operations and software

Ocean carriers exchange bookings, status updates, stow plans and Customs filings electronically using two main families of standards: ANSI X12, developed in the United States, and UN/EDIFACT, developed under the United Nations. Most carriers serving U.S. ports end up dealing with both. This guide explains how they differ, which messages matter in ocean shipping and how to plan a new EDI connection.

Key takeaways
  • ANSI X12 is maintained by X12, chartered by the American National Standards Institute, and has dedicated ocean and U.S. Customs transaction sets.
  • UN/EDIFACT is the United Nations set of EDI rules and directories; container and vessel messages such as BAPLIE and CODECO are guided by the SMDG user group.
  • CBP publishes ACE ocean specifications in ANSI X12 and its own CAMIR format, and its container status rule accepts event codes from X12 or EDIFACT.
  • The standard matters less than the partner’s implementation guide, testing and acknowledgments.

What EDI does for an ocean carrier

Electronic Data Interchange replaces documents and emails with structured messages that one company’s system sends and another’s reads without retyping. For an ocean carrier the usual partners are shippers and NVOCCs sending bookings and shipping instructions, terminals reporting gate and vessel moves, other carriers sharing space, and government agencies receiving manifests.

Each message type is defined by a standard so both sides agree on what goes in which field. The two standards you will meet most are ANSI X12 and UN/EDIFACT. They solve the same problem with different syntax, different governing bodies and different message names.

ANSI X12 in ocean shipping

X12 describes itself as chartered by the American National Standards Institute for more than 40 years, developing and maintaining EDI standards and XML schemas, with each transaction set maintained by a subcommittee within its Accredited Standards Committee (X12: about). Transaction sets are identified by three-digit numbers. Those most relevant to ocean carriers, as listed by X12 (X12 transaction sets), include:

SetX12 nameTypical use
300Reservation (Booking Request) (Ocean)Shipper or NVOCC requests space
301Confirmation (Ocean)Carrier confirms the booking
304Shipping InstructionsDetails for the bill of lading
310Freight Receipt and Invoice (Ocean)Bill of lading and freight data
315Status Details (Ocean)Container milestones
322Terminal Operations and Intermodal Ramp ActivityTerminal and gate moves
323Vessel Schedule and Itinerary (Ocean)Sailing schedules
324Vessel Stow Plan (Ocean)Stowage positions
309Customs ManifestManifest data to Customs
350Customs Status InformationStatus returned by Customs
997Functional AcknowledgmentConfirms a message was received and parsed
Names from X12’s transaction set list. Use depends on each trading partner’s guide.

UN/EDIFACT in ocean shipping

UN/EDIFACT, the United Nations rules for Electronic Data Interchange for Administration, Commerce and Transport, is described by UN ESCAP as a set of internationally agreed standards, directories and guidelines for the electronic interchange of structured data between independent computerized systems, maintained and published in the United Nations Trade Data Interchange Directory (UN ESCAP: UN/EDIFACT). Its syntax is published as ISO 9735 (ISO 9735-1). EDIFACT messages carry six-letter names rather than numbers.

In the container trade, the SMDG, a user group for EDI in the maritime container business, publishes implementation guides for the messages that carriers and terminals exchange (SMDG). The group takes its name from the design of the BAPLIE message, used for vessel bay plans. Its container message guides cover COPRAR and COARRI for vessel discharge and loading orders and confirmations, COPARN for full-in booking orders and empty-out releases, and CODECO for gate-in and gate-out confirmation (SMDG container messages).

Side by side: how the two standards differ

ANSI X12UN/EDIFACT
Maintained byX12, chartered by ANSIUnited Nations, published in the UNTDID
Message namesThree-digit numbers (300, 315, 322)Six-letter names (BAPLIE, CODECO)
Syntax standardX12 standardsISO 9735
Where you meet itU.S. trading partners and U.S. Customs ACEInternational carriers and terminals; SMDG guides
Stow plans324 Vessel Stow PlanBAPLIE
Gate moves322 Terminal OperationsCODECO

Neither standard is better in the abstract. A carrier in the Florida and Caribbean trades often receives X12 from U.S. customers and EDIFACT from terminals or partner lines abroad, and needs its system to map both to the same shipment record.

Where U.S. Customs fits

CBP’s technical documentation library publishes the message specifications for ACE, including ocean manifest documents in ANSI X12, such as the 353 Events Advisory Details and 357 In-Bond Information transaction sets, and CBP’s own Cargo Automated Manifest Interface Requirements (CAMIR) record formats (CBP technical documentation). The container status message rule in 19 CFR 4.7d requires each report to include an event code as defined in the ANSI X12 or UN EDIFACT standards, along with the container number, date and time, empty or full status, location and vessel.

For the filing side, see ocean eManifest and EDI with CBP.

Common EDI pitfalls for small carriers

Most EDI projects that go wrong do not fail on the standard. They fail on details that both sides assumed were obvious. The usual suspects:

  • Version mismatch. Both partners say “X12” or “EDIFACT” but use different versions or directories, so segments the sender considers required are unknown to the receiver.
  • Code lists. Port, package, container type and event codes differ between partners. SMDG recommends using the most recent version of its code lists independent of the EDIFACT directory version of the message, which is one more reason to agree on code sources up front.
  • Silent failures. A message that is never acknowledged is a message nobody checked. Treat a missing acknowledgment as an error, not as success.
  • Master data. EDI moves your data faster, including the mistakes. Clean customer, port and container records before the first live message.
  • Ownership. Someone on the operations side, not only IT, should read the rejection report every day.

Planning a new EDI connection

  1. Ask the partner for its implementation guide: standard, version, message types, required segments and code lists.
  2. Map each field to your own data and note anything you do not capture today.
  3. Agree on the transport method and identifiers for each side.
  4. Exchange test files and check the acknowledgments, such as an X12 997, for every message.
  5. Run real shipments in parallel with the old method before going live.
  6. Monitor rejections daily after go-live; most problems are code values, not syntax.

Your shipping system matters here because EDI is only as good as the data behind it. GDZ-ISIS exchanges data with customers, partners and government entities in formats including ANSI X12, XML, CSV, ASYCUDA, Excel and positional text, with custom formats on request, and its U.S. Customs menu includes Baplie submission. To discuss a specific partner format, contact our team.

Frequently asked questions

What is the difference between EDIFACT and X12?

Both are EDI standards. ANSI X12 is maintained by X12, chartered by ANSI, and names messages with numbers such as 315. UN/EDIFACT is the United Nations standard published in the UNTDID, with six-letter message names such as CODECO.

Which EDI standard does U.S. Customs use for ocean?

CBP publishes ACE ocean manifest specifications in ANSI X12 transaction sets and in its CAMIR record format. Check CBP’s technical documentation library for the current versions before you build.

What is a BAPLIE message?

BAPLIE is the EDIFACT message used for vessel bay plans, showing where containers are stowed. The SMDG user group, which publishes its implementation guides, takes its name from the original BAPLIE design work.

What is an X12 315?

X12 lists transaction set 315 as Status Details (Ocean). Carriers commonly use it to send container milestone updates to customers.

Do small carriers really need EDI?

If partners, terminals or Customs require electronic messages, yes. Even without a mandate, EDI with large customers removes retyping of bookings and status updates.

Sources

Schedule a GDZ-ISIS demo

See how GDZ-ISIS handles bookings, bills of lading, ACE manifest filing and accounting in one system.
Schedule a GDZ-ISIS demo

Related articles