errorcountryPRTubl-2.1

PT-R-004:ATCUD validation code required

Fix: Add ATCUD code from certified software.

Portuguese invoices require ATCUD (unique document code).

Severity
Fatal
Rule set
ubl-2.1
Country
PRT
Fix type
BLOCKED

Engine Classification

Financial or legal field · Modification blocked by policy

Reason: ATCUD (Código Único de Documento) requires a validation series registered with Autoridade Tributária. The code must be algorithmically generated by certified invoicing software using the registered series. You cannot manually add an ATCUD - ensure your invoicing software is AT-certified and has a valid series registered.

What is PT-R-004?

PT-R-004 is a fatal validation rule defined in the ubl-2.1 specification (PRT national rules). It validates the XPath: Extension or Note for ATCUD element in the UBL invoice XML.

When this rule fires, the invoice is rejected by Peppol access points and never reaches the buyer.

Target path: XPath: Extension or Note for ATCUD

This error requires manual correction — financial fields are protected by policy.

Why This Error Matters

ATCUD required for Portuguese invoice validity.

PT-R-004 is a hard failure — the invoice must be corrected and re-sent before it can reach the recipient.

Validator Behavior

  • ·Causes invoice rejection
  • ·Fails UBL schema validation
  • ·Error returned: PT-R-004
  • ·Specification: ubl-2.1

How to Fix It

1.

Get ATCUD series

Register series with AT

2.

Generate code

Series + document number

3.

Add to invoice

Include ATCUD in document

XML Example

Generic example based on the rule's target XPath. Your actual XML structure may differ.

Before
<!-- Triggers validation error -->
<XPath: Extension or Note for ATCUD></XPath: Extension or Note for ATCUD>
After
<!-- Corrected -->
<XPath: Extension or Note for ATCUD>VALID_VALUE</XPath: Extension or Note for ATCUD>

Technical Reference

XPathXPath: Extension or Note for ATCUD
Specubl-2.1

Common Causes

  • ·Missing ATCUD
  • ·Invalid ATCUD format
  • ·Uncertified software

Seeing this in production? The API handles PT-R-004 automatically. See the fix response →

Frequently Asked Questions

Portuguese invoices require ATCUD (unique document code).

Add ATCUD code from certified software. This error involves a protected field — Invoice Navigator flags it in your pipeline so your team can correct it at the source.

Yes, PT-R-004 is a critical error that will cause invoice rejection. It must be fixed before submission.

Related Errors

Related Content

Last updated: 3 March 2026

Share this guide:

Validate your invoice

Drop your XML here to check for PT-R-004

Detect PT-R-004 before submission

This error involves a financial field that can't be auto-modified. We'll flag it with a clear diagnosis so you can fix it at the source.