CUSDEC — EDIFACT Customs Declaration Message (D.08A)
The CUSDEC message is the customs declaration sent by a declarant to a customs administration for import or export: detailed declaration of goods, value, origin, customs regime and associated duties. It is one of the largest EDIFACT messages. This page summarises the segment structure as published by UN/CEFACT for directory D.08A.
Purpose
The CUSDEC message is the customs declaration sent by a declarant to a customs administration for import or export: detailed declaration of goods, value, origin, customs regime and associated duties. It is one of the largest EDIFACT messages.
This page focuses on the structure published by UN/CEFACT for directory D.08A. The segments listed, their status (M / C), position and repetition factor are extracted from the official file cusdec_c.htm hosted on service.unece.org.
Segment structure
The CUSDEC D.08A message has 207 header entries, 0 detail entries and 10 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. |
|---|---|---|---|---|
0010 | UNH | Message header | M | 1 |
0020 | BGM | Beginning of message | M | 1 |
0030 | CST | Customs status of goods | C | 1 |
0040 | LOC | Place/location identification | C | ×99 |
0050 | DTM | Date/time/period | C | ×15 |
0060 | GEI | Processing information | C | ×25 |
0070 | FII | Financial institution information | C | 1 |
0080 | MEA | Measurements | C | ×5 |
0090 | EQD | Equipment details | C | ×999 |
0100 | SEL | Seal number | C | ×999 |
0110 | FTX | Free text | C | ×99 |
0120 | SG1 | Group (×99) | C | ×99 |
0130 | RFF | Reference | M | 1 |
0140 | DTM | Date/time/period | C | 1 |
0150 | SG2 | Group (×10) | C | ×10 |
0160 | PAC | Package | M | 1 |
0170 | SG3 | Group (×999) | C | ×999 |
0180 | PCI | Package identification | M | 1 |
0190 | FTX | Free text | C | 1 |
0200 | SG4 | Group (×5) | C | ×5 |
0210 | TDT | Transport information | M | 1 |
0220 | TPL | Transport placement | C | 1 |
0230 | SG5 | Group (×99) | C | ×99 |
0240 | DOC | Document/message details | M | 1 |
0250 | DTM | Date/time/period | C | ×2 |
0260 | LOC | Place/location identification | C | 1 |
0270 | SG6 | Group (×99) | C | ×99 |
0280 | NAD | Name and address | M | 1 |
0290 | RFF | Reference | C | ×10 |
0300 | CTA | Contact information | C | 1 |
0310 | COM | Communication contact | C | ×5 |
0320 | SG7 | Group (×1) | C | 1 |
0330 | TOD | Terms of delivery or transport | M | 1 |
0340 | LOC | Place/location identification | C | ×2 |
0350 | FTX | Free text | C | 1 |
0360 | SG8 | Group (×25) | C | ×25 |
0370 | MOA | Monetary amount | M | 1 |
0380 | SG9 | Group (×1) | C | 1 |
0390 | CUX | Currencies | M | 1 |
0400 | DTM | Date/time/period | C | 1 |
0410 | SG10 | Group (×99) | C | ×99 |
0420 | EFI | External file link identification | M | 1 |
0430 | CED | Computer environment details | C | ×99 |
0440 | COM | Communication contact | C | ×9 |
0450 | RFF | Reference | C | ×9 |
0460 | DTM | Date/time/period | C | ×9 |
0470 | QTY | Quantity | C | ×9 |
0480 | UNS | Section control | M | 1 |
0490 | SG11 | Group (×999) | C | ×999 |
0500 | DMS | Document/message summary | M | 1 |
0510 | DTM | Date/time/period | C | 1 |
0520 | MEA | Measurements | C | ×5 |
0530 | SG12 | Group (×25) | C | ×25 |
0540 | MOA | Monetary amount | M | 1 |
0550 | SG13 | Group (×1) | C | 1 |
0560 | CUX | Currencies | M | 1 |
0570 | DTM | Date/time/period | C | 1 |
0580 | SG14 | Group (×1) | C | 1 |
0590 | TOD | Terms of delivery or transport | M | 1 |
0600 | LOC | Place/location identification | C | ×2 |
0610 | FTX | Free text | C | 1 |
0620 | SG15 | Group (×10) | C | ×10 |
0630 | NAD | Name and address | M | 1 |
0640 | SG16 | Group (×10) | C | ×10 |
0650 | DOC | Document/message details | M | 1 |
0660 | DTM | Date/time/period | C | ×2 |
0670 | LOC | Place/location identification | C | 1 |
0680 | SG17 | Group (×10) | C | ×10 |
0690 | PAC | Package | M | 1 |
0700 | SG18 | Group (×999) | C | ×999 |
0710 | PCI | Package identification | M | 1 |
0720 | FTX | Free text | C | 1 |
0730 | RFF | Reference | C | 1 |
0740 | SG19 | Group (×5) | C | ×5 |
0750 | PYT | Payment terms | M | 1 |
0760 | MOA | Monetary amount | C | 1 |
0770 | PCD | Percentage details | C | 1 |
0780 | FTX | Free text | C | 1 |
0790 | SG20 | Group (×10) | C | ×10 |
0800 | ALC | Allowance or charge | M | 1 |
0810 | RTE | Rate details | C | 1 |
0820 | MOA | Monetary amount | C | 1 |
0830 | PCD | Percentage details | C | 1 |
0840 | QTY | Quantity | C | 1 |
0850 | SG21 | Group (×1) | C | 1 |
0860 | CUX | Currencies | M | 1 |
0870 | DTM | Date/time/period | C | 1 |
0880 | SG22 | Group (×9999) | C | ×9999 |
0890 | LIN | Line item | M | 1 |
0900 | PIA | Additional product id | C | 1 |
0910 | QTY | Quantity | C | 1 |
0920 | PRI | Price details | C | ×2 |
0930 | PCD | Percentage details | C | 1 |
0940 | MEA | Measurements | C | ×15 |
0950 | QVR | Quantity variances | C | ×5 |
0960 | MOA | Monetary amount | C | ×15 |
0970 | NAD | Name and address | C | ×10 |
0980 | GIR | Related identification numbers | C | ×9999 |
0990 | GEI | Processing information | C | ×99 |
1000 | LOC | Place/location identification | C | 1 |
1010 | SG23 | Group (×10) | C | ×10 |
1020 | DOC | Document/message details | M | 1 |
1030 | DTM | Date/time/period | C | ×2 |
1040 | SG24 | Group (×10) | C | ×10 |
1050 | ALC | Allowance or charge | M | 1 |
1060 | RTE | Rate details | C | 1 |
1070 | MOA | Monetary amount | C | 1 |
1080 | PCD | Percentage details | C | 1 |
1090 | QTY | Quantity | C | 1 |
1100 | SG25 | Group (×1) | C | 1 |
1110 | CUX | Currencies | M | 1 |
1120 | DTM | Date/time/period | C | 1 |
1130 | SG26 | Group (×1) | C | 1 |
1140 | TOD | Terms of delivery or transport | M | 1 |
1150 | LOC | Place/location identification | C | ×2 |
1160 | SG27 | Group (×5) | C | ×5 |
1170 | PYT | Payment terms | M | 1 |
1180 | MOA | Monetary amount | C | 1 |
1190 | PCD | Percentage details | C | 1 |
1200 | FTX | Free text | C | 1 |
1210 | SG28 | Group (×5) | C | ×5 |
1220 | IMD | Item description | M | 1 |
1230 | FTX | Free text | C | 1 |
1240 | SG29 | Group (×10) | C | ×10 |
1250 | PAC | Package | M | 1 |
1260 | SG30 | Group (×999) | C | ×999 |
1270 | PCI | Package identification | M | 1 |
1280 | FTX | Free text | C | 1 |
1290 | RFF | Reference | C | 1 |
1300 | SG31 | Group (×99999) | C | ×99999 |
1310 | EFI | External file link identification | M | 1 |
1320 | CED | Computer environment details | C | ×99 |
1330 | COM | Communication contact | C | ×9 |
1340 | RFF | Reference | C | ×9 |
1350 | DTM | Date/time/period | C | ×9 |
1360 | QTY | Quantity | C | ×9 |
1370 | SG32 | Group (×99999) | C | ×99999 |
1380 | CST | Customs status of goods | M | 1 |
1390 | FTX | Free text | C | ×9 |
1400 | LOC | Place/location identification | C | ×25 |
1410 | DTM | Date/time/period | C | ×5 |
1420 | MEA | Measurements | C | ×20 |
1430 | NAD | Name and address | C | ×5 |
1440 | TDT | Transport information | C | ×9 |
1450 | SG33 | Group (×10) | C | ×10 |
1460 | PAC | Package | M | 1 |
1470 | SG34 | Group (×999) | C | ×999 |
1480 | PCI | Package identification | M | 1 |
1490 | FTX | Free text | C | 1 |
1500 | SG35 | Group (×25) | C | ×25 |
1510 | MOA | Monetary amount | M | 1 |
1520 | SG36 | Group (×1) | C | 1 |
1530 | CUX | Currencies | M | 1 |
1540 | DTM | Date/time/period | C | 1 |
1550 | SG37 | Group (×999) | C | ×999 |
1560 | RFF | Reference | M | 1 |
1570 | DTM | Date/time/period | C | 1 |
1580 | GIN | Goods identity number | C | ×99 |
1590 | MOA | Monetary amount | C | 1 |
1600 | SG38 | Group (×1) | C | 1 |
1610 | IMD | Item description | M | 1 |
1620 | FTX | Free text | C | ×5 |
1630 | SG39 | Group (×25) | C | ×25 |
1640 | DOC | Document/message details | M | 1 |
1650 | DTM | Date/time/period | C | ×2 |
1660 | LOC | Place/location identification | C | 1 |
1670 | NAD | Name and address | C | ×5 |
1680 | SG40 | Group (×1) | C | 1 |
1690 | TOD | Terms of delivery or transport | M | 1 |
1700 | LOC | Place/location identification | C | ×2 |
1710 | FTX | Free text | C | 1 |
1720 | SG41 | Group (×1) | C | 1 |
1730 | GDS | Nature of cargo | M | 1 |
1740 | FTX | Free text | C | 1 |
1750 | SG42 | Group (×25) | C | ×25 |
1760 | GEI | Processing information | M | 1 |
1770 | PCD | Percentage details | C | 1 |
1780 | DTM | Date/time/period | C | 1 |
1790 | RFF | Reference | C | 1 |
1800 | SG43 | Group (×10) | C | ×10 |
1810 | TAX | Duty/tax/fee details | M | 1 |
1820 | MOA | Monetary amount | C | ×2 |
1830 | GEI | Processing information | C | 1 |
1840 | SG44 | Group (×1) | C | 1 |
1850 | QVR | Quantity variances | M | 1 |
1860 | QTY | Quantity | C | 1 |
1870 | SG45 | Group (×1) | C | 1 |
1880 | RFF | Reference | M | 1 |
1890 | DTM | Date/time/period | C | 1 |
1900 | SG46 | Group (×50) | C | ×50 |
1910 | GIR | Related identification numbers | M | 1 |
1920 | GEI | Processing information | C | ×10 |
1930 | NAD | Name and address | C | 1 |
1940 | MEA | Measurements | C | ×5 |
1950 | SG47 | Group (×10) | C | ×10 |
1960 | MOA | Monetary amount | M | 1 |
1970 | SG48 | Group (×1) | C | 1 |
1980 | CUX | Currencies | M | 1 |
1990 | DTM | Date/time/period | C | 1 |
2000 | SG49 | Group (×10) | C | ×10 |
2010 | TAX | Duty/tax/fee details | M | 1 |
2020 | MOA | Monetary amount | C | ×2 |
2030 | GEI | Processing information | C | 1 |
2040 | SG50 | Group (×5) | C | ×5 |
2050 | DOC | Document/message details | M | 1 |
2060 | DTM | Date/time/period | C | ×2 |
2070 | LOC | Place/location identification | C | 1 |
Detail
No segment in this section.
Summary
| Pos. | Tag | Name | S | Rep. |
|---|---|---|---|---|
2080 | UNS | Section control | M | 1 |
2090 | CNT | Control total | C | ×5 |
2100 | SG51 | Group (×50) | C | ×50 |
2110 | TAX | Duty/tax/fee details | M | 1 |
2120 | MOA | Monetary amount | C | ×2 |
2130 | GEI | Processing information | C | 1 |
2140 | SG52 | Group (×1) | C | 1 |
2150 | AUT | Authentication result | M | 1 |
2160 | DTM | Date/time/period | C | 1 |
2170 | UNT | Message trailer | M | 1 |
Changes vs D.96A
Top-level differences between D.96A and D.08A for the CUSDEC 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
GEIin the header section (status C, repeat ×25) — not present at the top of the corresponding D.96A section.EFIin the header section (status M, repeat ×1) — not present at the top of the corresponding D.96A section.CEDin the header section (status C, repeat ×99) — not present at the top of the corresponding D.96A section.QTYin the header section (status C, repeat ×9) — not present at the top of the corresponding D.96A section.UNSin the header section (status M, repeat ×1) — not present at the top of the corresponding D.96A section.DMSin the header section (status M, repeat ×1) — not present at the top of the corresponding D.96A section.PYTin the header section (status M, repeat ×1) — not present at the top of the corresponding D.96A section.PCDin the header section (status C, repeat ×1) — not present at the top of the corresponding D.96A section.ALCin the header section (status M, repeat ×1) — not present at the top of the corresponding D.96A section.RTEin the header section (status C, repeat ×1) — not present at the top of the corresponding D.96A section.LINin the header section (status M, repeat ×1) — not present at the top of the corresponding D.96A section.PIAin the header section (status C, repeat ×1) — not present at the top of the corresponding D.96A section.PRIin the header section (status C, repeat ×2) — not present at the top of the corresponding D.96A section.QVRin the header section (status C, repeat ×5) — not present at the top of the corresponding D.96A section.GIRin the header section (status C, repeat ×9999) — not present at the top of the corresponding D.96A section.IMDin the header section (status M, repeat ×1) — not present at the top of the corresponding D.96A section.GINin the header section (status C, repeat ×99) — not present at the top of the corresponding D.96A section.GDSin the header section (status M, repeat ×1) — not present at the top of the corresponding D.96A section.TAXin the header section (status M, repeat ×1) — not present at the top of the corresponding D.96A section.GEIin the summary section (status C, repeat ×1) — not present at the top of the corresponding D.96A section.
Segments removed vs D.96A
GISin the header section — present in D.96A but missing in D.08A at the same level.UNSin the detail section — present in D.96A but missing in D.08A at the same level.DMSin the detail section — present in D.96A but missing in D.08A at the same level.DTMin the detail section — present in D.96A but missing in D.08A at the same level.MEAin the detail section — present in D.96A but missing in D.08A at the same level.MOAin the detail section — present in D.96A but missing in D.08A at the same level.CUXin the detail section — present in D.96A but missing in D.08A at the same level.TODin the detail section — present in D.96A but missing in D.08A at the same level.LOCin the detail section — present in D.96A but missing in D.08A at the same level.FTXin the detail section — present in D.96A but missing in D.08A at the same level.NADin the detail section — present in D.96A but missing in D.08A at the same level.DOCin the detail section — present in D.96A but missing in D.08A at the same level.PACin the detail section — present in D.96A but missing in D.08A at the same level.PCIin the detail section — present in D.96A but missing in D.08A at the same level.RFFin the detail section — present in D.96A but missing in D.08A at the same level.PATin the detail section — present in D.96A but missing in D.08A at the same level.PCDin the detail section — present in D.96A but missing in D.08A at the same level.ALCin the detail section — present in D.96A but missing in D.08A at the same level.RTEin the detail section — present in D.96A but missing in D.08A at the same level.QTYin the detail section — present in D.96A but missing in D.08A at the same level.LINin the detail section — present in D.96A but missing in D.08A at the same level.PIAin the detail section — present in D.96A but missing in D.08A at the same level.PRIin the detail section — present in D.96A but missing in D.08A at the same level.QVRin the detail section — present in D.96A but missing in D.08A at the same level.GIRin the detail section — present in D.96A but missing in D.08A at the same level.IMDin the detail section — present in D.96A but missing in D.08A at the same level.CSTin the detail section — present in D.96A but missing in D.08A at the same level.TDTin the detail section — present in D.96A but missing in D.08A at the same level.GINin the detail section — present in D.96A but missing in D.08A at the same level.GDSin the detail section — present in D.96A but missing in D.08A at the same level.GISin the detail section — present in D.96A but missing in D.08A at the same level.TAXin the detail section — present in D.96A but missing in D.08A at the same level.GISin the summary section — present in D.96A but missing in D.08A at the same level.
Max-repeat changes
FTX(header): repeat ×1 in D.96A → ×99 in D.08A.
Structural example
Minimal example of an CUSDEC D.08A message with mandatory segments only. The goal is to show the exact version declared in UNH (CUSDEC:D:08A:UN) — not to replicate a full business case (see the CUSDEC D.96A page for an annotated example).
UNB+UNOC:3+5410000000123:14+5410000000456:14+260514:1430+CTRL008001'
UNH+1+CUSDEC:D:08A:UN'
BGM+929+CUSDEC-2026-7811+9'
DTM+137:20260514:102'
NAD+CZ+5410000000123::9'
NAD+EX+5410000000456::9'
CST+1+850430:NCM:FR'
MOA+38:42500.00:EUR'
LOC+27+FR::ISO'
LOC+28+CN::ISO'
UNT+9+1'
UNZ+1+CTRL008001' Common errors
- Misaligned UNH tokens — The
UNH+...+CUSDEC:D:08A: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.08A, 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: CUSDEC D.96A, CUSDEC D.01B, CUSDEC D.10A, CUSDEC D.16B, CUSDEC D.21B, CUSDEC D.24A, CUSDEC D.97A, CUSDEC D.99B, CUSDEC D.00B, CUSDEC D.02B, CUSDEC D.05A, CUSDEC D.13B, CUSDEC D.18B, CUSDEC D.20B.
X12 functional equivalent: X12 309.