What does BR-57 mean?
The rule checks the Deliver to address of the goods recipient (BG-15). In CII it sits in ram:ShipToTradeParty/ram:PostalTradeAddress. If you give a Deliver to address, the Deliver to country code (BT-80, ram:CountryID) must be present. The code follows the two-letter ISO 3166-1 alpha-2 standard, for example "DE". Without a country code you cannot assign the place of delivery to one country.
Common causes of BR-57
- ram:CountryID is missing from ram:PostalTradeAddress of the Deliver to address.
- Only street, city and post code are given, the country is missing.
- The country name appears as free text instead of a two-letter ISO code.
- ram:PostalTradeAddress was created without a country although a goods recipient is named.
How to fix BR-57
- Find the faulty spot in the XML. Open the XML of the invoice and go to field BT-80 along this XPath:
//rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID - Apply the fix. Add the element ram:CountryID with the two-letter ISO 3166-1 code (e.g. "DE") to ram:ShipToTradeParty/ram:PostalTradeAddress.
- Validate again. Save the file and validate it again to check that BR-57 is no longer reported.
Add the element ram:CountryID with the two-letter ISO 3166-1 code (e.g. "DE") to ram:ShipToTradeParty/ram:PostalTradeAddress.
//rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryIDBefore / after: the XML example
This is the spot in question before and after the fix (Cross Industry Invoice, ZUGFeRD/Factur-X).
<ram:ShipToTradeParty>
<ram:Name>Beispiel AG - Lager Nord</ram:Name>
<ram:PostalTradeAddress>
<ram:PostcodeCode>20095</ram:PostcodeCode>
<ram:LineOne>Hafenstraße 5</ram:LineOne>
<ram:CityName>Hamburg</ram:CityName>
</ram:PostalTradeAddress>
</ram:ShipToTradeParty>
<ram:ShipToTradeParty>
<ram:Name>Beispiel AG - Lager Nord</ram:Name>
<ram:PostalTradeAddress>
<ram:PostcodeCode>20095</ram:PostcodeCode>
<ram:LineOne>Hafenstraße 5</ram:LineOne>
<ram:CityName>Hamburg</ram:CityName>
<ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
</ram:ShipToTradeParty>
Frequent questions about BR-57
What format does the country code use?
When is the Deliver to address mandatory?
Is CountryID enough or do I also need street and city?
Related error codes
Check BR-57 automatically
Instead of digging through the XML by hand you can validate your ZUGFeRD or XRechnung file online – upload the PDF or the XML and you get every error with rule ID, affected field, fix and XPath, as a readable report or as JSON through the API.