Export:
the DUA in the AES

Customs · export

The export DUA (Single Administrative Document) is the declaration that the exporter or its representative lodges in the AES, the export system of the Spanish Tax Agency (AEAT), before the goods leave the Union. The AEAT returns an MRN, grants release and records the actual exit, which proves the VAT exemption of article 21 of the Spanish VAT Act (Ley del IVA, LIVA).

AES is the Automated Export System (Sistema Automatizado de Exportación); MRN, the Movement Reference Number. Release (levante) authorises the goods to leave; actual exit (salida efectiva) confirms that they left. Only the second one counts to support the exemption.

The declaration

Who lodges
the export
declaration?

The exporter lodges it or, on its behalf, a customs representative under direct or indirect representation, signing with an electronic certificate. The declarant and the representative are identified by their EORI number (Economic Operators Registration and Identification), which is not the same as the Spanish tax ID (NIF).

The message is CC515C, from the AES web services guide. It is used to export outside the Union (type EX) and to send goods from mainland Spain to the Canary Islands (type CO). It declares where the goods are: a customs area or premises authorised for export (local autorizado para la exportación, LAME).

When the office of exit is not the office of export (indirect exit, for example through another port or another Member State), the arrival of the goods at the office of exit is notified with CC507C.

How to file

What do you need to file
the export declaration?

You need the exporter's EORI number and an electronic certificate or electronic ID card. The declaration is sent with a program connected to the AES web services, with the export form on the AEAT's e-office or through a customs representative.

Ways to file the export declaration in the AES: AES web services guide v1.25 and the AEAT's instructions for the export form.
HowWhat it involvesWho it suits
Customs software connected to the AEATBuilds the declaration (CC515C) and sends it to the AES web services with an electronic certificate.Customs representatives, freight forwarders and frequent exporters.
The e-office export formThe AEAT's e-office has an export form (“Alta DUA - Formulario de exportación - Sistema AES”) to file it by hand, with an electronic certificate or ID card, on your own behalf or proving the representation.One-off exports.
A customs representativeFiles the declaration for the exporter, under direct or indirect representation.Anyone who would rather not file it themselves.

General information; not customs advice.

Declaration types

What types of export
declaration are there?

The additional declaration type says whether it is a full declaration, a simplified one or a pre-lodged one. If none is chosen, it is type A. These are the definitions in the AEAT's AES web services guide v1.25.

Additional types of export declaration in the AES (AES guide v1.25, §5.4 and §8.4).
TypeWhat it isWhat follows
AStandard declaration, with all the dataRelease and, later, actual exit
BSimplified declaration for missing documentsOne, and only one, supplementary declaration X (CC515X) with the same MRN
CSimplified declaration for regular use (art. 166.2 UCC), with authorisation C512Summarised later in a type Y declaration
DPre-lodged type APresentation of the goods (CC511C), then it becomes A
EPre-lodged type BCC511C, it becomes B, then the supplementary X
FPre-lodged type CCC511C, then it becomes C
YSummary declaration for type CAnother CC515C with its own MRN; each item cites the MRN of the C it summarises (document 1220)
ZSupplementary declaration under art. 182 UCC (entry in the declarant's records)Full CC515C with authorisation C514

General information; not customs advice. Simplified types C, F, Y and Z require the authorisation shown.

Step by step

How is an export processed in the AES?
From the declaration to actual exit.

  1. Declare or pre-lodge

    You send CC515C. If the AEAT accepts it, it returns the MRN and the acceptance date. A pre-lodged declaration (D, E or F) stays at status PA, and the goods must be presented (CC511C) within 30 days.

  2. Control channel and release

    The AEAT assigns a control channel (circuito). On green, automatic release arrives with its CSV (secure verification code); on orange or red, the declaration stays under control until customs decides.

  3. Arrival at the office of exit

    With indirect exit, the goods travel to the office of exit and their arrival is notified with CC507C. If the AEAT consults a foreign customs office, the notice is repeated after 15 minutes.

  4. Actual exit

    The office of exit confirms that the goods have left the Union and the declaration moves to SA. It arrives through the AES inbox (ComunicaResulSalida) or the CCAESC query. Release does not replace it.

  5. Receipts by CSV

    Each response carries its CSV: declaration, release, T2L/T2LF and certificate of actual exit (CCCSEC). With the CSV, the document can be checked and downloaded on the AEAT e-office (Sede).

Scroll
The export number

What is the
export MRN?

The MRN (Movement Reference Number) is the 18-character number the AEAT assigns when it accepts the declaration. It identifies the export across the Union: it is cited by the transit that continues from it, by the exit summary declaration (EXS) and by the EAD (DAE in Spanish), the export accompanying document. The LRN, by contrast, is the declarant's own reference, up to 22 characters long.

The MRN in transit (NCTS)
Statuses

What does each export status
mean in the AES?

The AEAT publishes the statuses in its EXESTAES table. Two matter for the exemption: PS (awaiting exit) does not prove anything yet; SA (actual exit) does.

Statuses of an export declaration in the AES (AES guide v1.25 and the AEAT's EXESTAES table).
CodeStatus
PAPre-lodged
PLAwaiting release
DEReleased (indirect exit)
DSReleased (direct exit)
PSAwaiting exit
REReceived and awaiting release at the office of exit
RQRequested from the country of dispatch
AWAwaiting the control decision of the foreign office of presentation
ETAwaiting transit
GTHandled by transit
SAActual exit: the proof that the goods left
STStopped for discrepancies at exit
IVInvalidated
VAT

How do you prove that an export is exempt from VAT?

Article 21 of Ley 37/1992, the Spanish VAT Act, exempts supplies of goods that leave the Union. The invoice shows exemption reason E2 (“exempt under art. 21”), and the proof is the actual exit recorded by the AEAT with the MRN of that export.

  1. 01 Invoice E2 Issued without VAT, with the article 21 exemption reason and a reference to the export.
  2. 02 MRN The one of the declaration that covers that supply: it links the invoice to the exit.
  3. 03 Exit SA Actual exit status in the AES. Release only authorises the exit; it does not prove that it happened.
  4. 04 Receipt The certificate of actual exit (CCCSEC) or the receipt downloaded from the e-office with its CSV.
  5. Never Invalidated An invalidated declaration does not prove exit, even if it had been released.
If something goes wrong

What happens if the goods never leave?

It stays awaiting exit01

With release but no exit, the declaration stays at PS and the invoice has no proof of the exemption. Before treating the export as done, check the status with the MRN (CCAESC).

Discrepancies at exit02

The office of exit stops the declaration (status ST) when what arrives does not match what was declared: weights, packages, containers or seals. Until this is resolved, no exit is recorded.

Request invalidation03

If the operation will not go ahead, you request it with CC514C and a reason. Requesting it is not the same as invalidating: the declaration is only cancelled when the AEAT replies with status IV.

Declare again04

After release, the general way to correct is to invalidate and lodge a new declaration with document 1224 and the invalidated MRN (AES guide v1.25, §8.4 and §12).

Expired pre-lodged declaration05

If a pre-lodged declaration is not presented within 30 days, the AEAT invalidates it on its own initiative and reports it through the AES inbox (ComunicaInvalidacion).

No exit, no proof06

Until actual exit is recorded, the invoice has no article 21 proof. If the goods are not going to leave, review the VAT treatment of the supply with your tax adviser.

Deadlines

What are the deadlines and how
long is the proof kept?

The AES guide sets the procedural deadlines. How long to keep the proof depends on the Spanish General Tax Act (Ley General Tributaria): the exemption can be audited until the AEAT's right to review the VAT expires.

Export deadlines in the AES and for the proof of exemption (reviewed on 25-10-2026).
WhatDeadlineSource
Pre-lodged (D, E, F)Present the goods within 30 days of acceptance; otherwise the AEAT invalidates the declaration on its own initiativeAES guide v1.25, §4.3.3 and §5.4
Supplementary X (type B)30 days from release as the general limit, unless the customs office sets anotherDelegated Regulation (EU) 2015/2446
Arrival (CC507C)Repeat the notice after 15 minutes if the AEAT is consulting a foreign customs officeAES guide v1.25, §6
Exemption proofAs long as the AEAT can audit the VAT on that supply: a four-year limitation period, which interruptions can extendLey 58/2003 General Tributaria, arts. 66 to 70

General information; not tax or customs advice. The deadline of a specific authorisation is set by the customs office.

Frequently asked questions

Questions about exports and the AES

The most common questions about the export DUA, the MRN and the VAT exemption.

What is the export DUA?

It is the customs declaration used to export goods outside the European Union. DUA stands for Documento Único Administrativo, the Spanish name for the Single Administrative Document. In Spain it is lodged in the AES, the Automated Export System of the Spanish Tax Agency (AEAT), with message CC515C. If the AEAT accepts it, it returns an MRN that identifies the export until exit.

Who lodges the export declaration?

The exporter, or a customs representative on its behalf under direct or indirect representation, signing with an electronic certificate. The declarant and the representative are identified by their EORI number, which is not the same as the Spanish tax ID (NIF).

What is the difference between release and actual exit?

Release (levante) authorises the goods to leave; actual exit (salida efectiva, status SA) confirms that they have left the Union. Only actual exit proves the export: a released declaration can stay at awaiting exit (PS) or be invalidated.

What is the MRN and where do I find it?

The MRN (Movement Reference Number) is the 18-character number the AEAT assigns when it accepts the declaration. It comes in the acceptance response and on the declaration's receipts. You use it to check the status of the export in the AES.

How do I prove that an export is exempt from VAT?

The invoice is issued without VAT, with the exemption reason of article 21 of Ley 37/1992 (E2 in VeriFactu). As proof, you keep the actual exit recorded by the AEAT for the MRN of that export: the certificate of actual exit or the receipt downloaded with its CSV. Release is not enough.

What happens if the goods do not leave after release?

The declaration stays at awaiting exit and the invoice has no proof of the exemption. If the operation will not go ahead, you request invalidation with CC514C. Requesting it is not the same as invalidating: the declaration is only cancelled when the AEAT replies with status IV.

Can an export declaration be corrected after it is lodged?

Amendment (CC513C) is for pre-lodged declarations and for very limited cases after acceptance. After release, the general route is to invalidate the declaration and lodge a new one with document 1224 and the invalidated MRN (AES guide v1.25, §8.4 and §12).

How long must the export proof be kept?

As long as the AEAT can audit the VAT on that supply: the limitation period is four years (art. 66 of the Ley General Tributaria, the Spanish General Tax Act) and interruptions can extend it. The receipt with its CSV can be checked again on the AEAT e-office (Sede electrónica).

What software do you need to file an export declaration?

If you export often, a program that builds the declaration (CC515C) and sends it to the AES web services with an electronic certificate. For a one-off export, the AEAT has an export form on its e-office, used with an electronic certificate or ID card. Both need the exporter's EORI number.

Editorial review: Cofactu team · 25 October 2026. Reviewed against the AEAT's AES web services guide v1.25 (17-Jun-2026), Ley 37/1992 (Spanish VAT Act) and Ley 58/2003 (Spanish General Tax Act). Sources: AEAT · Instructions for the AES export form · AEAT · AES export web services guide v1.25 (Spanish) · AEAT · Customs web services (Spanish) · BOE · Ley 37/1992 (VAT Act), art. 21 · BOE · Ley 58/2003 (General Tax Act), arts. 66 to 70 · EUR-Lex · Union Customs Code (Regulation (EU) 952/2013) · EUR-Lex · Delegated Regulation (EU) 2015/2446.

CN code finder · Cofactu Customs · Import declaration (H1) · Import VAT · Transit (NCTS) · ICS2 and the ENS · EORI number · VeriFactu invoices · Invoicing and accounting · Form 303 (VAT return)

Sources: Regulation (EU) 952/2013, Union Customs Code (Official Journal of the EU) · Law 37/1992, Spanish VAT Act (BOE, Spanish).

(Start today)

Cofactu Customs is not open to clients yet. You can already invoice with VeriFactu and document your transport from the same account, for free.

Your first invoice

  • Unlimited VeriFactu invoices with QR
  • Unlimited DeCA on the Free plan
  • No card needed