EDIFACT message guide · Transport

CODECO Container gate

The UN/EDIFACT message a terminal or depot uses to confirm containers delivered or picked up by road, rail or barge, and other movements.

Sent by
Terminal, depot or container freight station
Received by
Shipping line or equipment owner
Standard
UN/EDIFACT · Batch message
X12 equivalent
322 Terminal Operations and Intermodal Ramp Activity

What is the EDIFACT CODECO message?

CODECO is the UN/EDIFACT container gate message. The directory defines it as a message by which a terminal, depot or similar facility confirms that specified containers have been delivered or picked up by an inland carrier (road, rail or barge). It can also report internal terminal movements, other than loading and discharging vessels, and changes in container status.

Gate-in and gate-out events tell shipping lines where their equipment is, start and stop free time and demurrage clocks and confirm that export containers have arrived for loading.

How the EDIFACT CODECO message worksDiagram of the UN/EDIFACT CODECO Container gate message. Terminal, depot or container freight station sends it to shipping line or equipment owner. It usually follows COPARN and COREOR. It is usually followed by IFTSTA. Inside the UNB and UNH envelopes, the directory D.21A requires, in the start of message: BGM (Beginning of message) and body and segment groups: the required SG4 loop with NAD (Name and address) and the required SG10 loop with EQD (Equipment details). 8 conditional segment groups are listed by their trigger segment.How the EDIFACT CODECO message worksContainer gate: who sends it, where it fits and what the directory marks mandatory1 WHERE IT FITSUSUALLY FOLLOWSCOPARNContainerannouncementCOREORContainer release orderCODECOSENDERTerminal, depot orcontainer freightstationRECEIVERShipping line orequipment ownerCONTRL syntax report back, if agreedUSUALLY FOLLOWED BYIFTSTAInternationalmultimodal statusreport2 WHAT DIRECTORY D.21A REQUIRESInterchange: sender and recipient IDsUNB … UNZMessage CODECOUNH … UNTSTART OF MESSAGEBGMBeginning of messageBODY AND SEGMENT GROUPSMandatory group SG4 · repeats up to 9NADName and addressMandatory group SG10 · repeats many timesEQDEquipment details+ 8 conditional groups, starting with:RFFTDTCTAGIDDAMDGSTMPBlue box: mandatory segment group. Conditional groups are listed by the trigger segment that starts them; a group is sent only when its data applies.Conditional segments outside groups are not drawn.Structure: mandatory segments and groups in the UN/EDIFACT directory D.21A listing for CODECO. Your trading partner's implementation guide adds itsown requirements.
How the EDIFACT CODECO message worksDiagram of the UN/EDIFACT CODECO Container gate message. Terminal, depot or container freight station sends it to shipping line or equipment owner. It usually follows COPARN and COREOR. It is usually followed by IFTSTA. Inside the UNB and UNH envelopes, the directory D.21A requires, in the start of message: BGM (Beginning of message) and body and segment groups: the required SG4 loop with NAD (Name and address) and the required SG10 loop with EQD (Equipment details). 8 conditional segment groups are listed by their trigger segment.How the EDIFACT CODECOmessage worksContainer gate: who sends it, where it fits andwhat the directory marks mandatory1 WHERE IT FITSUSUALLY FOLLOWSCOPARNContainer announcementCOREORContainer release orderCODECOSENDERTerminal, depotor containerfreight stationRECEIVERShipping line orequipmentownerCONTRL syntax report back, if agreedUSUALLY FOLLOWED BYIFTSTAInternational multimodal statusreport2 WHAT DIRECTORY D.21A REQUIRESInterchange: sender and recipient IDs(UNB … UNZ)Message CODECO (UNH … UNT)START OF MESSAGEBGMBeginning of messageBODY AND SEGMENT GROUPSMandatory group SG4 · repeats upto 9NADName and addressMandatory group SG10 · repeatsmany timesEQDEquipment details+ 8 conditional groups, starting with:RFFTDTCTAGIDDAMDGSTMPBlue box: mandatory segment group. Conditionalgroups are listed by the trigger segment thatstarts them; a group is sent only when its dataapplies. Conditional segments outside groups arenot drawn.Structure: mandatory segments and groups in theUN/EDIFACT directory D.21A listing for CODECO.Your trading partner's implementation guide adds itsown requirements.

How to read this diagram: the top row shows who sends CODECO, to whom, and which messages usually come before and after it. The lower part shows what the directory D.21A itself requires: the envelopes around CODECO and the segments and segment groups it marks mandatory. Conditional groups are listed by their trigger segment rather than drawn in full. This is the directory's minimum, not a trading partner's requirement: a message implementation guide, such as an industry subset or a partner’s own guide, usually makes some conditional groups mandatory, restricts the codes and may use an older directory.

Expand diagram Download SVG

When it is used

  • Reporting containers entering or leaving a terminal or depot
  • Reporting empty container returns
  • Reporting changes in container status, such as damage

Where it fits in the message flow

This message CODECO Container gate

Structure

Mandatory segments in CODECO (directory D.21A)

In UN/EDIFACT directory D.21A, the CODECO message has 60 segment positions arranged in 16 segment groups. These are the segments and segment groups marked mandatory at message level, in order; a mandatory group is shown with the segment that starts it. Segments inside conditional groups are needed only when the group is used. This is the directory’s requirement, not your trading partner’s: each partner’s message implementation guide names the directory it uses, often an older one such as D.96A or D.01B where the structure can differ, makes some conditional segments mandatory and restricts the codes.

  • UNH
  • BGM
  • SG4 (NAD)
  • SG10 (EQD)
  • UNT

Practical example

CODECO in practice

A trucker returns an empty container to an inland depot near Duisburg, and the depot's gate staff record it as damaged. The depot sends the shipping line a CODECO reporting the gate-in time, the container number and its damaged status. The line stops the detention clock and schedules a repair estimate.

Implementation

Implementation considerations for CODECO

  • Report gate events in near real time; they drive charges.
  • Include equipment condition where the owner needs it.
  • Match gate events to release orders and announcements.
  • Follow SMDG or port community guidelines where used.

Need help with CODECO?

ECOM maps, tests and monitors EDIFACT messages for your trading partners and integrates them with your ERP.