EDIFACT COPARN, CODECO and COARRI for Container Terminals
For edi and integration analysts, it leads at shippers, 3pls and carriers · Understand the problem

EDIFACT COPARN, CODECO and COARRI for Container Terminals: Illustrative TMS–ERP order and invoice handoff review beside a warehouse floor; not a client facility.
Quick answer: edifact coparn codeco coarri
COPARN, CODECO and COARRI are UN/EDIFACT container messages. COPARN orders a terminal or depot to release or accept containers; CODECO reports actual gate-in (code 109) and gate-out (111); COARRI reports discharge (119) or loading (122). SMDG's D.00B user manuals, version 2.1.3, define the segments, and the timestamps drive demurrage, detention and storage checks.
TL;DR — what you’ll learn
- Map from the partner's stated version: SMDG 2.1.3 on D.00B uses CODECO codes 109 and 111, and older D.95B guides differ.
- CODECO DTM qualifier 7 and COARRI DTM qualifier 403 give minute-level gate-out and discharge times for recomputing storage days.
- 46 CFR 541.7 voids US demurrage and detention invoices issued over 30 days after the charge last accrued; CGST Rule 47 sets a 30-day invoice window in India.
- PCS1x carries COPRAR, COARRI, CODECO, COPARN and COEDOR at Indian major ports; confirm current versions with the Indian Ports Association.
Topics: edifact coparn codeco coarri · release orders · gate moves · load/discharge reports · SMDG container messages
All quantities, amounts, product codes and events are illustrative teaching examples.
A new terminal partner goes live on a Monday. By Thursday the importer's transport system still shows forty containers sitting in the yard, although trucks collected most of them days earlier. The terminal's gate-out messages carry document code 111, the translator map was copied from an older guide that expected a different code list, and every message has been parked in an error queue. The demurrage invoice arrives a month later, and nobody can prove the gate-out times.
Three UN/EDIFACT messages carry most of the container events that start and stop time charges: COPARN orders a release or acceptance, CODECO confirms the gate move, and COARRI confirms loading or discharge. Mapped to the right business events, with version and code list agreed in writing, they give freight audit an independent timestamp for every demurrage, detention and storage line. This guide walks through each message, the fields that matter, Indian port practice on PCS1x, and an onboarding checklist.
- Message coverage: the purpose, document codes and key segments of COPARN, CODECO and COARRI under the SMDG D.00B user manuals, version 2.1.3.
- Downstream effects: how each timestamp moves free time, invoice deadlines under 46 CFR Part 541 and the GST invoice clock in India.
- Working material: a sample gate-out message, a worked charge check in dollars and rupees, and a test plan for a new partner.
Where COPARN, CODECO and COARRI sit in a container's port call
Think of the three messages as order, gate proof and ship proof. COPARN tells a terminal or depot what it may release or accept, CODECO reports what actually crossed the gate, and COARRI reports what actually went on or came off the vessel.
The messages belong to the UN/EDIFACT container set maintained in practice through user manuals from SMDG, the user group for shipping lines and container terminals that works under UN/CEFACT. SMDG currently lists version 2.1.3 of COPARN, CODECO and COARRI as stable, built on directory D.00B and upgraded in 2016 to carry verified gross mass. Older 1.6.2 guides built on D.95B are still published, which is why the version line in UNH matters.
UN/EDIFACT container messaging under the SMDG 2.1.3 user manuals on directory D.00B splits one port call into three records: COPARN for the release or acceptance order, CODECO for each gate move and COARRI for discharge or loading, all timed to the minute in date format 203.
SMDG's formal definitions are short. COPARN carries an order to release, make available, accept or call down containers, or announces their impending arrival. CODECO is the message by which a terminal or depot confirms that containers were delivered or picked up by the inland carrier by road, rail or barge. COARRI is the terminal's report that containers were discharged from or loaded onto a seagoing vessel.
Scroll horizontally to see all columns.
| Message | Usual sender and receiver | Event it records | Who corrects a wrong message |
|---|---|---|---|
| COPARN | Shipping line or its agent to terminal or empty depot | Future release of an empty, acceptance of a full export, call-down or arrival advice | Line's equipment or documentation desk, by replace or cancel message |
| CODECO | Terminal, depot or CFS to shipping line, sometimes copied to the haulier's platform | Actual gate-in or gate-out by road, rail or barge, plus internal moves | Terminal gate supervisor, with the line confirming the corrected time |
| COARRI | Terminal operator to shipping line or its agent | Actual discharge, loading or restow of each container on a named vessel call | Terminal vessel planning, after checking against the final stowage |
| Downstream copy to shipper or importer | Line or platform to customer's transport or audit system | Status updates used for free time and invoice checks | Customer's EDI analyst flags; the line reissues |
In US practice, many terminals and railroads report the same gate and ramp events in ANSI X12 instead. Our guide to the EDI 322 terminal operations message covers that format; this page stays with the EDIFACT trio, which most ocean carriers and terminals use worldwide.
COPARN release and acceptance orders: the codes that open a gate
COPARN is an instruction about a future move, and a terminal will only release or accept what a valid COPARN allows. Most "unit not released" problems at a gate trace back to a missing, expired or superseded COPARN rather than to the truck or the paperwork the driver carries.
The kind of order sits in BGM data element 1001. The SMDG 2.1.3 manual lists, among others, 126 for a transport equipment acceptance order (typically a full export booking), 108 for an empty release instruction, 104 for an impending arrival advice, 144 for an empty container disposition order and 170 for a cargo acceptance order. Message function code 9 marks an original, 5 a replacement and 1 a cancellation; a replacement or cancellation must quote the earlier message in a header RFF with qualifier ACW.
- Order references: RFF qualifiers ATX for an acceptance order reference, ATY for a release order reference, RE for a release number and BN for a booking reference.
- Validity date: DTM qualifier 36 carries the expiry date of the order; a driver arriving after it is turned away even with a correct release number.
- Equipment request: EQD with ISO 6346 size-type code and, for a booking without assigned numbers, EQN giving the quantity of units.
- Vessel link: TDT with stage 20 (main carriage), the voyage number and vessel identity, so the terminal ties the export to the right call.
CODECO gate reports: proving when a box entered or left
CODECO is the timestamp that matters most for money. The gate-out of an import full and the gate-in of the returned empty bracket detention; the gate-in of an export full is often the event that stops export detention and starts the terminal's own clock.
In the SMDG 2.1.3 CODECO manual, BGM element 1001 uses 109 for a transport movement gate-in report and 111 for a gate-out report, with further codes for on-hire, off-hire, direct interchange and shift reports. Partners still running the D.95B-based 1.6.2 guide may use a different code list, so a translator map must be built from the version stated in the partner's UNH segment, not from an old map.
- Equipment detail: EQD with qualifier CN, the container number as marked, the ISO size-type code, supplier code (1 shipper, 2 carrier, 5 third party), status (2 export, 3 import, 6 transhipment) and full or empty indicator (4 empty, 5 full).
- Gate time: DTM with qualifier 7, effective date and time, at minute precision in format 203 (CCYYMMDDHHMM).
- Inland carrier: TDT in segment group 12 with stage 1, 10 or 30 and mode 3 for road, 2 for rail or 8 for inland water, plus the haulier and vehicle identity.
- Condition and seals: SEL for seal numbers, MEA for verified gross mass, and DAM, whose damage-type codes follow ISO 9897 Annex D.
The DAM segment is the electronic twin of the paper receipt. How a gate records condition, and how repair invoices are tested against it, is covered in our article on the equipment interchange receipt. The sample below shows an illustrative import gate-out; the qualifiers come from the SMDG manual, but each partner's own guide decides which segments it sends.
UNH+0001+CODECO:D:00B:UN:SMDG21'
BGM+111+GO2606110457+9'
DTM+137:202606111432:203'
NAD+MS+TRM01:160:ZZZ'
NAD+CF+LIN:172:20'
EQD+CN+ABCU1234560+45G1:102:5+2+3+5'
RFF+BM:BL0098812'
RFF+RE:RL554120'
DTM+7:202606111426:203'
SEL+IN4471209+SH+1'
TDT+30++3+95+:::ROADHAUL+++TRUCK123'
CNT+16:1'
UNT+13+0001'
Chargeable storage days derived from the pair of messages:
t_dis = COARRI DTM+403 (discharge, actual)
t_out = CODECO DTM+7 where BGM 1001 = 111 (gate-out)
days = calendar days from (date(t_dis) + 1) to date(t_out), inclusive
charge = max(0, days - free_days) x daily_rate
Tolerance: reject an invoice whose day count exceeds the computed value by 1 or more.
CODECO gate-out reports under the SMDG 2.1.3 user manual on UN/EDIFACT D.00B carry document code 111 in BGM and the gate time in DTM qualifier 7, so an importer's audit system can recompute terminal storage days to the calendar day and reject any invoice that adds one or more days.
COARRI load and discharge reports and the stowage cell
COARRI confirms what happened at the ship's side, container by container. Its discharge time is the earliest hard evidence that an import box reached the terminal, and its loading report is the proof that an export made the vessel it was booked on.
The SMDG 2.1.3 COARRI manual uses BGM code 119 for a transport discharge report, 122 for a loading report and 24 for a restow, where only the new stowage position is reported. Within the equipment group, DTM qualifier 403 carries the actual discharge date and time, 404 the actual loading date and time, and LOC with qualifier 147 the stowage cell in ISO bay-row-tier format, which is required in a loading report.
- Vessel call identity: TDT stage 20 with voyage number, carrier code and the vessel's IMO-based identifier, plus RFF qualifier AAY for the carrier's agent reference.
- Call times: DTM 178 for actual arrival and 186 for actual departure at the call level, useful when a discharge time looks wrong.
- Weights: MEA with VGM, tare and, for reefers, settings such as temperature in TMP.
- Onward move: a TDT in the equipment group can name the barge, rail or road carrier taking the box away.
Overlanded and shortlanded units are part of the discharge report too. A shortlanded box has no discharge time, so a free-time clock that starts from COARRI never opens for it; audit rules should flag any storage charge on a container with no 403 time at the billing terminal.
Timestamps that start demurrage, detention and invoice clocks
The messages do not set free time; tariffs and contracts do. What the messages supply is the event time each tariff refers to, and the regulators in both markets now expect a billing party to show those times on the invoice or issue it promptly.
In the United States, the Federal Maritime Commission's rule at 46 CFR 541.6 requires a demurrage or detention invoice from an ocean carrier or marine terminal operator to show container numbers, the free time allowed, its start and end dates, the container availability date for imports, and the dates on which charges accrued. Section 541.7 requires the invoice within 30 calendar days of the date the charge was last incurred, or the billed party need not pay.
Under 46 CFR 541.6, a US demurrage or detention invoice must state free-time start and end dates and the charged dates, and 541.7 voids invoices issued more than 30 days after the charge last accrued, so CODECO and COARRI timestamps let a shipper test both conditions container by container.
India has no equivalent invoice-content rule for terminal charges. The GST consequence is timing: under Rule 47 of the CGST Rules, a tax invoice for a taxable supply of services must be issued within 30 days of the date of supply. For storage that ends at gate-out, the CODECO time therefore marks when the supply ended and when the terminal's invoice clock starts.
The prevention side of these clocks, from milestone alerts to dispute evidence, is covered in our article on demurrage and detention milestone clocks under OSRA. The difference here is narrower: which message segment holds each milestone, and what a translator must keep so an auditor can recompute the charge.
Indian terminals: PCS1x message flows between lines, CFS and ports
At India's major ports, the three messages travel mainly through PCS1x, the cloud port community system run by the Indian Ports Association. Lines, terminals, CFS operators and the container rail operator exchange data there instead of building one link per partner.
A Visakhapatnam Port Authority annexure on PCS1x modules, with status recorded as of 14 October 2020, lists the message names in use. It shows COPRAR for a vessel agent's advance container list to the port, COARRI for the container loading list, CODECO for gate-in and gate-out reports of containers and cargo, COPARN for a vessel agent's upload of an empty container release order, an Equipment Interchange Report message, and COEDOR for container stock at the port, CFS and empty yard.
Scroll horizontally to see all columns.
| PCS1x message | Function described | Typical originator | What a transporter or importer can check |
|---|---|---|---|
| COPRAR | Advance export and import container list submitted to the port | Shipping agent | Whether the box is on the planned discharge or load list |
| COARRI | Container loading and discharge list | Terminal, viewed by the agent | Actual discharge time that opens the port's free period |
| CODECO | Gate-in and gate-out report for containers and cargo, by time | Port, CFS or rail terminal operator | Gate-out time used to test storage and line detention |
| COPARN | Empty container release order upload | Vessel agent | Whether an empty was released before the truck was sent |
| COEDOR | Container stock report at port, CFS and empty yard | Port and CFS | Where an empty sits before pickup or after return |
Treat that list as a 2020 snapshot and confirm current message names and versions with the Indian Ports Association before building maps. Whether a box should go to a CFS or an ICD, and how each custodian records its own gate, is explained in our ICD versus CFS guide.
An unmapped gate-out code and the storage bill it hid
The trace below follows one illustrative import container through a translator failure. The terminal's data was right throughout; the importer simply could not see it until the error queue was cleared.
- 03 Jun 2026, 21:40, terminal vessel ops: COARRI discharge report, BGM 119, sends DTM+403 for container ABCU1234560; the importer's system logs the discharge.
- 11 Jun 2026, 14:32, terminal gate system: CODECO with BGM 111 and DTM+7 at 14:26 is sent; the translator map recognises only the older code list and parks the message as "unknown document type".
- 08 Jul 2026, 10:15, accounts payable: terminal storage invoice ST-26-7713 bills 6 days at $150 through 13 June; with no gate-out on file, the clerk approves $900.
- 20 Jul 2026, 16:05, EDI analyst: map updated for code 111, error queue replayed, gate-out appears as 11 June; audit recomputes 4 chargeable days.
- 21 Jul 2026, 09:30, freight audit: refund request for $300 filed with both message copies, inside the 30 days 46 CFR 541.8 requires the billing party to allow.
Scroll horizontally to see all columns.
| Step | US import (USD) | India import (INR) | Message field used |
|---|---|---|---|
| Discharge time | 03 Jun 2026 21:40 | 02 Jul 2026 06:10 | COARRI DTM+403 |
| Free period in tariff (illustrative) | 4 days from the day after discharge | 3 days from the day after discharge | Tariff, not the message |
| Gate-out time | 11 Jun 2026 14:26 | 08 Jul 2026 11:05 | CODECO BGM 111, DTM+7 |
| Chargeable days computed | 8 days less 4 free = 4 | 6 days less 3 free = 3 | Formula in the code block |
| Rate (illustrative) | $150 per day | ₹1,800 per day for a 40-foot box | Tariff |
| Amount billed | 6 days = $900 | 5 days = ₹9,000 plus GST | Invoice |
| Amount supported | 4 days = $600 | 3 days = ₹5,400 plus GST | Recomputed from messages |
| Difference to recover | $300 | ₹3,600 plus GST on that amount | Credit note or refund |
In the Indian case the terminal had counted to the date the delivery order was surrendered rather than the CODECO gate-out. The credit note must reverse GST on the ₹3,600 as well, which is easiest when the terminal issues it against the original invoice number within the same return period.
Translator rules versus analyst review for each terminal message
Syntax, code lists and duplicate detection belong in the translator, where they run on every message without exception. People are needed only where two valid messages disagree about the physical world, such as a gate-out with no matching release.
Scroll horizontally to see all columns.
| Check on an incoming message | Rule enforced by the translator | Where software only helps an analyst |
|---|---|---|
| Recognising the document type | BGM 1001 must be in the code list for the UNH version agreed with that partner | None; unknown codes go to a monitored queue with an alert |
| Container number validity | ISO 6346 check digit must pass on EQD element 8260 | None |
| Handling a replacement COPARN | Function code 5 must quote the original in RFF+ACW, else reject | Analyst reviews two live originals for one booking |
| Reading a free-text FTX remark about a hold | Stored verbatim, never parsed into a status | Text model suggests a hold type; the analyst confirms before any status change |
| Gate-out without a release on file | Flag the event; do not stop the clock | Analyst checks with the line whether a COPARN or delivery order was missed |
| Discharge time later than gate-out | Reject the pair as inconsistent | Analyst asks the terminal which message to correct |
Onboarding a terminal or line for the three container messages
A new partner is ready when every message type has been tested against real events, including cancellations and replacements, and the error queue is watched every day. A sample file that merely passes syntax proves very little.
Scroll horizontally to see all columns.
| Test | COPARN | CODECO | COARRI |
|---|---|---|---|
| Version and code list agreed in writing | D.00B with SMDG 2.1.3, or the partner's stated variant | Same, with gate-in 109 and gate-out 111 confirmed | Same, with 119, 122 and 24 confirmed |
| Original, replacement and cancellation | Function codes 9, 5 and 1 with RFF+ACW | Corrected gate time sent as a replacement | Restow and shortlanded units reported |
| Timestamp precision and zone | DTM+36 expiry in local time | DTM+7 to the minute, zone agreed | DTM+403 and 404 to the minute |
| Duplicate and replay handling | Same booking reference held once | Same container and gate time ignored on resend | Same container and call ignored on resend |
| Error queue ownership | Named analyst, alert within 1 hour | Named analyst, alert within 1 hour | Named analyst, alert within 1 hour |
| Parallel run | Two weeks against portal data | Two weeks against gate receipts | Two vessel calls against the stowage plan |
If your team needs these maps built, tested and connected to freight audit, describe your terminals, lines and current message volumes through our request for proposal form. Related EDI, container and port guides sit on the Logistics and Supply Chain hub.
Discuss this workflow
Describe your current systems, the recurring exception and the outcome you need. Keep shipment, customer and financial records out of the initial message.
Common operational questions
Practical answers for operations, engineering, and finance teams working on edifact coparn codeco coarri in logistics & supply chain.
What is the difference between COPARN and CODECO?
Which COARRI field shows when a container came off the ship?
Why do some CODECO messages fail in a translator that worked before?
Do Indian ports exchange COPARN, CODECO and COARRI?
References
Sources checked 13 November 2026. US and India statutory authorities and vendor documentation support platform facts; the worked examples and diagrams are original.
- SMDG - CODECO User Manual (Container Gate-in/Gate-out Report), version 2.1.3, D.00BFormal definition, BGM 1001 codes 109 and 111, EQD, DTM, TDT, SEL and DAM segments checked. Accessed 13 November 2026.
- SMDG - COPARN User Manual (Container Announcement), version 2.1.3, D.00BBGM codes 104, 108, 126, 144 and 170, message function codes 1, 5 and 9, RFF qualifiers ATX, ATY, RE and ACW, and DTM 36 checked. Accessed 13 November 2026.
- SMDG - COARRI User Manual (Container Discharge/Loading Report), version 2.1.3, D.00BBGM codes 24, 119 and 122, DTM qualifiers 178, 186, 403 and 404, and LOC qualifier 147 checked. Accessed 13 November 2026.
- SMDG - Container messages: recommended and older user manual versionsLists version 2.1.3 (D.00B) as stable and 1.6.2 (D.95B) as older versions. Accessed 13 November 2026.
- Federal Maritime Commission - 46 CFR 541.6, 541.7 and 541.8, demurrage and detention billing requirementsThe eCFR page blocked automated access; section text checked on the Cornell LII mirror of the eCFR. Accessed 13 November 2026.
- CBIC - Central Goods and Services Tax Rules, 2017, Rule 47 (time limit for issuing tax invoice)Thirty days from the date of supply of service for most suppliers. Accessed 13 November 2026.
- Visakhapatnam Port Authority - Annexure: PCS 1x modules and message utilisation (status as on 14 October 2020)Lists COPRAR, COARRI, CODECO, COPARN, COEDOR and the equipment interchange report message on PCS1x; dated 2020. Accessed 13 November 2026.
- ASC X12 — EDI Supply Chain & Transportation Transaction Sets (204/210/214/856/940/945)US standard for electronic data interchange across shippers, 3PLs, and motor carriers.
- FMCSA — 49 CFR Part 395 Hours of Service & Electronic Logging Devices (ELD)US federal motor carrier dispatch and driver duty-status compliance mandate.
- ULIP & NIC GST E-Way Bill Portal — Unified Logistics & Rule 138 ComplianceIndian statutory goods-in-transit and multi-modal logistics verification framework.