01Definition
The UID (unique identifier) is the unique identifier of a document within the myDATA ecosystem. The issuer does not choose it and AADE does not assign it: it is calculated in a specific, published way from the document's key data. So two systems that know the same data always arrive at the same UID.
For the other myDATA terms, see the e-invoicing glossary.
02How it is formed
According to AADE's myDATA FAQ, the UID is the SHA-1 hash of six document fields, in this order:
- Issuer VAT number
- Issue date, as yyyy-MM-dd
- The issuer's installation (branch) number in the Taxis registry
- Document type (e.g. 1.1 for a sales invoice)
- Series
- Serial number
The fields are joined with hyphens. AADE's example is the string 999999999-2020-10-22-0-1.1-Α-2: VAT number 999999999, date 22/10/2020, installation 0, type 1.1, series Α, number 2. The SHA-1 of that string is the UID, a 40-character code of digits and the letters A to F.
SHA-1 is a hash function: the same input always gives the same result, while the slightest change (another series, another number) gives a completely different code.
03What it is for
- Identification before and independent of transmission. The UID exists as soon as the document's data is set, whereas the MARK exists only after a successful transmission.
- A shared "language" between systems. The invoicing software, the certified provider and myDATA can all refer to the same document by the same code.
- Recognising the same document. Because the UID comes from VAT number, date, installation, type, series and number, two documents with the same data have the same UID. That helps catch the same number being used twice.
- On the document. On documents issued through a certified provider, the UID is printed together with the MARK, the authentication code and the QR code.
04UID and MARK
The two codes often appear together, but they say different things. The UID answers "which document is this?": it comes from the document's data. The MARK answers "was it registered?": AADE assigns it when it accepts the transmission. A document can have a UID before it has a MARK, but it cannot count as registered without a MARK.
05Common misconceptions
- "AADE assigns the UID." No, what AADE assigns is the MARK. The UID is calculated from the document's data.
- "The UID is encryption." SHA-1 is hashing, not encryption: it does not "hide" data to be recovered later, it simply produces a stable fingerprint.
- "If I resend the same document, it gets a new UID." No, as long as the six fields stay the same, the UID stays the same. Only the MARK of a new transmission can be new.
06Do you need to do anything?
No. The UID is calculated by the invoicing software or the provider. Your part is making sure the data it comes from is right: correct VAT number and installation, correct document type, continuous numbering per series. If any of these changes, the UID changes too, which is why an issued document is not "renumbered": it is corrected with a credit note or the procedure that applies.
07The UID in eFluper
In eFluper you never see or calculate a UID by hand. Numbering is automatic per series and every document is transmitted to myDATA, coming back with a MARK and QR code. When you issue through the certified provider, the document carries the MARK, UID and authentication code, plus a QR code the customer scans to verify it.