COSTOR — EDIFACT Container Stuffing / Stripping Order Message (D.21B)
The COSTOR message is the order sent by a forwarder or shipper to a container depot or consolidator to stuff (load) or strip (unload) goods into/from an LCL container: it specifies the goods, target container, booking and B/L references, and the handling constraints. Confirmation is returned via COSTCO. This page summarises the segment structure as published by UN/CEFACT for directory D.21B.
Purpose
The COSTOR message is the order sent by a forwarder or shipper to a container depot or consolidator to stuff (load) or strip (unload) goods into/from an LCL container: it specifies the goods, target container, booking and B/L references, and the handling constraints. Confirmation is returned via COSTCO.
This page focuses on the structure published by UN/CEFACT for directory D.21B. The segments listed, their status (M / C), position and repetition factor are extracted from the official file costor_c.htm hosted on service.unece.org.
Segment structure
The COSTOR D.21B message has 77 header entries, 0 detail entries and 0 summary entries (segments and groups combined). Groups are shown in bold and their members are indented by actual nesting depth.
Header
| Pos. | Tag | Name | S | Rep. |
|---|---|---|---|---|
00010 | UNH | Message header | M | 1 |
00020 | BGM | Beginning of message | M | 1 |
00030 | DTM | Date/time/period | C | ×9 |
00040 | FTX | Free text | C | ×9 |
00050 | SG1 | Group (×9) | C | ×9 |
00060 | RFF | Reference | M | 1 |
00070 | DTM | Date/time/period | C | ×9 |
00080 | SG2 | Group (×1) | M | 1 |
00090 | TDT | Transport information | M | 1 |
00100 | DTM | Date/time/period | C | ×9 |
00110 | RFF | Reference | C | ×9 |
00120 | SG3 | Group (×9) | C | ×9 |
00130 | LOC | Place/location identification | M | 1 |
00140 | DTM | Date/time/period | C | ×9 |
00150 | SG4 | Group (×9) | M | ×9 |
00160 | NAD | Name and address | M | 1 |
00170 | SG5 | Group (×9) | C | ×9 |
00180 | CTA | Contact information | M | 1 |
00190 | COM | Communication contact | C | ×9 |
00200 | SG6 | Group (×99999) | M | ×99999 |
00210 | EQD | Equipment details | M | 1 |
00220 | RFF | Reference | C | ×9 |
00230 | EQN | Number of units | C | 1 |
00240 | DTM | Date/time/period | C | ×9 |
00250 | TSR | Transport service requirements | C | ×9 |
00260 | LOC | Place/location identification | C | ×9 |
00270 | DIM | Dimensions | C | ×9 |
00280 | HAN | Handling instructions | C | ×99 |
00290 | ATT | Attribute | C | ×99 |
00300 | SG7 | Group (×9) | C | ×9 |
00310 | NAD | Name and address | M | 1 |
00320 | DTM | Date/time/period | C | ×9 |
00330 | SG8 | Group (×999) | C | ×999 |
00340 | DGS | Dangerous goods | M | 1 |
00350 | ATT | Attribute | C | ×9 |
00360 | FTX | Free text | C | ×9 |
00370 | MEA | Measurements | C | ×9 |
00380 | SG9 | Group (×9) | C | ×9 |
00390 | CTA | Contact information | M | 1 |
00400 | COM | Communication contact | C | ×9 |
00410 | SG10 | Group (×9) | C | ×9 |
00420 | TMP | Temperature | M | 1 |
00430 | RNG | Range details | C | 1 |
00440 | SG11 | Group (×99999) | M | ×99999 |
00450 | CNI | Consignment information | M | 1 |
00460 | RFF | Reference | C | ×9 |
00470 | NAD | Name and address | C | ×9 |
00480 | SG12 | Group (×99999) | C | ×99999 |
00490 | GID | Goods item details | M | 1 |
00500 | HAN | Handling instructions | C | ×9 |
00510 | SG13 | Group (×9) | C | ×9 |
00520 | TMP | Temperature | M | 1 |
00530 | RNG | Range details | C | 1 |
00540 | FTX | Free text | C | ×9 |
00550 | DTM | Date/time/period | C | ×9 |
00560 | SG14 | Group (×9) | C | ×9 |
00570 | NAD | Name and address | M | 1 |
00580 | DTM | Date/time/period | C | ×9 |
00590 | MEA | Measurements | C | ×9 |
00600 | PCI | Package identification | C | ×9 |
00610 | DOC | Document/message details | C | ×9 |
00620 | SG15 | Group (×999) | C | ×999 |
00630 | SGP | Split goods placement | M | 1 |
00640 | MEA | Measurements | C | ×9 |
00650 | SG16 | Group (×999) | C | ×999 |
00660 | DGS | Dangerous goods | M | 1 |
00670 | ATT | Attribute | C | ×9 |
00680 | FTX | Free text | C | ×9 |
00690 | MEA | Measurements | C | ×9 |
00700 | SG17 | Group (×9) | C | ×9 |
00710 | CTA | Contact information | M | 1 |
00720 | COM | Communication contact | C | ×9 |
00730 | SG18 | Group (×999) | C | ×999 |
00740 | SGP | Split goods placement | M | 1 |
00750 | MEA | Measurements | C | ×9 |
00760 | CNT | Control total | C | 1 |
00770 | UNT | Message trailer | M | 1 |
Detail
No segment in this section.
Summary
No segment in this section.
Changes vs D.96A
Top-level differences between D.96A and D.21B for the COSTOR message (segments directly inside header / detail / summary, ignoring nested groups). The comparison is indicative: a given tag may have evolved inside nested groups without showing up in this synthesis.
Segments added vs D.96A
COMin the header section (status C, repeat ×9) — not present at the top of the corresponding D.96A section.ATTin the header section (status C, repeat ×99) — not present at the top of the corresponding D.96A section.
Status changes (M ↔ C)
RFF(header): status C in D.96A → M in D.21B.LOC(header): status C in D.96A → M in D.21B.CTA(header): status C in D.96A → M in D.21B.TMP(header): status C in D.96A → M in D.21B.CNT(header): status M in D.96A → C in D.21B.
Max-repeat changes
RFF(header): repeat ×9 in D.96A → ×1 in D.21B.LOC(header): repeat ×9 in D.96A → ×1 in D.21B.CTA(header): repeat ×9 in D.96A → ×1 in D.21B.HAN(header): repeat ×9 in D.96A → ×99 in D.21B.TMP(header): repeat ×9 in D.96A → ×1 in D.21B.RNG(header): repeat ×9 in D.96A → ×1 in D.21B.
Structural example
Minimal example of an COSTOR D.21B message with mandatory segments only. The goal is to show the exact version declared in UNH (COSTOR:D:21B:UN) — not to replicate a full business case (see the COSTOR D.96A page for an annotated example).
UNB+UNOC:3+5410000000123:14+5410000000456:14+260514:1430+CTRL021001'
UNH+1+COSTOR:D:21B:UN'
BGM+266+COSTOR-2026-STUFF-0007+9'
DTM+137:20260514:102'
DTM+200:20260518:102'
TDT+20+TRUCK-FR1234+3'
LOC+11+FRLEH::6'
NAD+CA+5410000000123::9'
NAD+CN+5410000000456::9'
EQD+CN+MSCU1234567+45G1+++5'
GID+1+18:CT'
UNT+10+1'
UNZ+1+CTRL021001' Common errors
- Misaligned UNH tokens — The
UNH+...+COSTOR:D:21B:UNtoken must reflect exactly the directory in use — a mismatch between the UNH release and the release agreed with the partner is rejected by every strict validator. - Wrong UNT segment count — The value after
UNT+must include UNH and UNT themselves. By far the most common sender-side error, regardless of the directory in use. - Stale code lists — Between D.96A and D.21B, several code lists received new qualifiers (DTM status, RFF qualifier, NAD codes…). Reusing an older directory’s code tables triggers warnings or even rejections depending on the partner’s strict-conformance mode.
Related messages
Other versions of this message available on ediverse.io: COSTOR D.96A, COSTOR D.10A, COSTOR D.16B, COSTOR D.24A.