ediverse Explore the platform

Spotlight PEPPOL BIS Billing 3.0 The EU e-invoicing mandate is here — France Sept 2026, Belgium Jan 2026, Germany 2025.

X12 313 — Shipment Status Inquiry (Ocean)

The 313 queries the status of an in-transit ocean shipment — container position, ETA milestone, port events — from an ocean carrier or terminal operator.

Purpose

The 313 documents a structured query on the status of a container or BL: where is it, when does it arrive, what events have been recorded. It is typically emitted by a freight forwarder or consignee querying the ocean carrier.

It triggers a 315 (Status Details Ocean) in reply. Acknowledged by 997. Largely replaced by modern REST APIs (Maersk, MSC, Hapag-Lloyd), but persists in legacy contracts.

Envelope structure

The 313 travels within the three X12 envelope levels (ISA/IEA, GS/GE with functional group IS, and ST/SE). Didactic example in release 004010:

x12 example-313.x12
ISA*00*          *00*          *ZZ*FORWARDER     *ZZ*OCEANCARRIER  *260515*1130*U*00401*000000313*0*P*>~
GS*IS*FORWARDER*OCEANCARRIER*20260515*1130*1*X*004010~
ST*313*0001~
B4*04*Q*20260515~
N9*BM*BL-2026-7788~
N9*EQ*MSCU1234567~
Q5*XB*20260515~
SE*7*0001~
GE*1*1~
IEA*1*000000313~

Common segments

  • HeaderST, B4 (Beginning Segment for Inquiry or Reply).
  • BL referenceN9*BM.
  • Equipment referenceN9*EQ (Container number).
  • Status typeQ5*XB (Status reason — Bypass / Update).
  • SummarySE.

Common pitfalls

  • EDI vs API parity: a 313 must return the SAME milestones as the carrier API; a divergent timeline makes the carrier non-auditable.
  • Container vs BL key: querying by container number without BL is not always resolvable on the carrier side; always carry both keys.
  • Stale data: a 315 reply older than 6 h is considered stale by enterprise shippers; document the timestamp of the last event.

Documentation

The code 313 and the name Shipment Status Inquiry (Ocean) are public and listed on x12.org/products/transaction-sets. The complete structure of loops, qualifiers and code lists is distributed by DISA via the proprietary Implementation Guides (TR3). ediverse.io covers only public concepts, the envelope and didactic examples.