CODECO and DESTIM: the EDIFACT messages for container gate moves and damage repair

CODECO and DESTIM: the EDIFACT messages for container gate moves and damage repair

CODECO reports container gate moves and DESTIM carries damage and repair estimates. How UNECE defines both EDIFACT messages, who sends them to whom, and where files usually fail.

By Founder of BudTech

Two container messages, two jobs

CODECO and DESTIM are two UN/EDIFACT messages from the container family. CODECO is the container gate-in/gate-out report: a terminal or depot tells the shipping line, or the line's agent, that containers came in or went out by truck, rail or barge. DESTIM is the equipment damage and repair estimate: a repair depot tells the container's owner or user what is damaged and what the repair will cost. Both are defined in the directories UNECE publishes, and SMDG, the user group for shipping lines and container terminals, publishes guides for using them.

When a line asks your agency, depot or terminal for "CODECO files" or "DESTIM files", it means these messages in the version and profile it has agreed with its partners. The rest of this guide covers how those versions work, what each message holds, and where files most often fail.

How UN/EDIFACT directories and versions work

UNECE describes UN/EDIFACT as a set of internationally agreed standards, directories and guidelines for exchanging structured data between independent computer systems, published in the UN Trade Data Interchange Directory (UNTDID).

The directories carry names like D.95B, D.00B and D.13B. In a message header, D is the version and 00B the release, which SMDG's CODECO guide spells out as "Release 2000 - B". UNECE's download page lists the directories year by year, with D-named releases from D.93A and most years having an A and a B release.

A message can change between releases, or be missing from an older one. The D.95B message index lists CODECO, COARRI, COPARN and BAPLIE but no DESTIM, while the D.00B index lists all five. So "send us a CODECO" is never the whole request: the partner also has to say which directory, and usually which guide.

On SMDG's container messages page, as read on 26 October 2026, the recommended CODECO, COARRI and COPARN guides are built on D.00B, with older D.95B versions still listed.

CODECO: the container gate-in/gate-out report

UNECE's CODECO page defines it as a message by which a terminal, depot or similar confirms that containers have been delivered or picked up by the inland carrier (road, rail or barge). It can also report moves inside a terminal, other than loading and discharging the vessel, and a change of a container's status without the box moving.

UNECE names the usual parties. Senders are container depots, inland terminals and container freight stations. Receivers are the shipping agent and logistics centres, with copies to shippers, forwarders and inland carriers. A few rules from the definition matter in practice:

  • One message may carry several containers.
  • Each container needs its date and time of pick-up or delivery.
  • One shipping line can be named for the whole message.
  • Seals, damage and inland transport details can be given per container.

SMDG's guide adds status changes after servicing or repair, and on-hire and off-hire reports for leased containers. In its document codes, 109 is a gate-in report and 111 a gate-out report, and the equipment segment marks a box empty (4) or full (5).

CODECO has neighbours. COPARN is the container announcement: an order to release, accept or call down containers, or notice that containers are about to arrive. COARRI reports containers discharged from or loaded onto a seagoing vessel. BAPLIE carries the bayplan: equipment and goods on board and where they sit. The line between CODECO and COARRI is the ship: SMDG's Recommendation 6 says CODECO is for moves by rail, truck and barge, and COARRI for moves to and from vessels.

DESTIM: the equipment damage and repair estimate

UNECE's DESTIM page describes a message for the container repair, shipping and leasing industry, which a repair depot uses to send an owner or user the damage found and an estimate of the repairs and costs. UNECE lists three uses:

  1. A depot to the owner or lessee, after a box comes back damaged, to say what needs repair and ask for authorization.
  2. An owner to a lessee, to pass on repair costs and ask the lessee to accept its share.
  3. An owner or lessee to the depot, to authorize the repair.

Each damage gets its own numbered line item, and UNECE says that number stays the same across versions of the estimate, so a revised estimate can be compared with the first. A line can carry the damage and component, the labour rate and hours, and the party charged, with amounts and tax.

SMDG lists a DESTIM guide under maintenance and repair, built on D.96B and marked TR: ready for trials, not yet stable. It refers its damage, component, material and repair codes to ISO 9897, so check what each partner expects on top of it.

Inside a message: UNH, BGM, segments, UNT

Both messages open with UNH, the message header, and close with UNT, the message trailer. In between come segments, each a three-letter tag with its data, some grouped and repeated.

  • UNH carries the sender's message reference and the message identifier. For a D.00B CODECO, UNECE requires that identifier to read CODECO, version D, release 00B, agency UN. SMDG adds a code naming its guide version.
  • BGM, the beginning of message, gives the document code, the message number and its function: original, replacement or cancellation.
  • In CODECO, header segments follow: dates (DTM), references (RFF), the sea transport (TDT) and the parties (NAD).
  • Then the detail. In CODECO, a group starting with EQD repeats per container, with its references, dates, locations, seals and damage (DAM). DESTIM has a section control segment (UNS), then a LIN group per damage line.
  • CNT gives control totals, such as the number of containers in a CODECO.
  • UNT closes with the segment count, UNH and UNT included, and the same reference as UNH.

UNECE marks each segment M (mandatory) or C (conditional), and SMDG's guide notes that conditional items are used by agreement between trading partners. That is where partner profiles come from.

Why lines ask for these files, and what goes wrong

Lines ask for CODECO because, as SMDG's guide puts it, the message provides operational reports used to update equipment tracking systems. DESTIM carries the estimate and the approval between depot, owner and lessee in one agreed format. SMDG adds that its list of recommended messages can be used as an EDI appendix to a contract between a terminal and a carrier.

What goes wrong is usually one of these:

  • The version: a D.95B file sent to a partner expecting D.00B, or the reverse, can fail with every value right.
  • The codes: document codes, equipment size and type codes (ISO 6346 in SMDG's CODECO guide) and damage codes each come from a named list, and SMDG notes its guides may use temporary codes or codes from a later directory.
  • The profile: conditional segments are used by agreement, so one line may require a segment another ignores.
  • The counts: UNT must match the real number of segments and repeat the UNH reference.

Read the partner's own guide before the first file goes out.

What AVISA does with CODECO and DESTIM

AVISA, the shipping agency software from BudTech, writes both messages from records it already holds, as its page DESTIM repair estimates and CODECO gate moves as EDIFACT files shows.

  • DESTIM: AVISA turns a container survey's damage lines into a DESTIM file. Each line carries the damage, the repair, the labour and the cost, and who is charged, where that is mapped.
  • CODECO: AVISA writes a CODECO file for a container's latest move, gate-in, gate-out or post-repair, worked out from its current status. It covers empty containers and those three events only.
  • Where AVISA does not hold a value, the file leaves it out rather than inventing one.

Each file is a download from the page where its record lives. AVISA does not send or receive EDI, and neither message has been certified against a real partner, so values may need adjusting before a partner accepts a file. Your team checks the file against the partner's specification and passes it to the line or depot that asked. The steps are on the DESTIM and CODECO EDI files page.

Frequently asked questions

What is the difference between CODECO and COARRI?

CODECO covers the land side of a terminal or depot and COARRI the ship side. UNECE's CODECO definition leaves out loading and discharging the vessel, and SMDG recommends CODECO for rail, truck and barge moves and COARRI for vessel moves.

Which EDIFACT version do lines use for container messages?

Each partner decides, so ask for their guide first. As read on 26 October 2026, SMDG's recommended CODECO, COARRI and COPARN guides are built on D.00B, and for BAPLIE it recommends version 3.1 on D.13B while still accepting 2.2 on D.95B.

Is DESTIM only a repair estimate, or also an approval?

Both. UNECE's definition lets a depot send the estimate, and lets an owner or lessee use the same message to authorize the repairs and accept the costs charged to its account.

Is CODECO only for empty containers?

No. The equipment segment carries a full or empty indicator, and SMDG's CODECO guide has codes for both, so the message can report laden and empty gate moves. Which moves a particular system can produce is a separate question worth asking.

Where do the damage codes in a DESTIM come from?

SMDG's DESTIM guide refers damage type, damage area, component, material and repair action codes to ISO 9897. It marks those code lists as mutually defined, so confirm with each partner which codes they expect.

Ask for a demo of AVISA

Amirh. Safavi

Founder of BudTech

Amirh. Safavi is the founder of BudTech LLC, the IT and software company in Muscat that makes AVISA.

More from Amirh. Safavi

Rate this Article

Click the stars to rate this article