NRA HFRG - Flat XML Import Format

Simplified XML for importing declaration data. "Flat" means all single-value fields sit at one level under the root (e.g. CarrierName instead of carrier/reprfirm/name). Only repeating collections (counterparties, addresses, goods) are nested.

Declaration types

OperationTypeDeclarationDescriptionFormat
9ImportGoods from another EU Member State into BulgariaHFRGBULGARIA
(unified transport format)
10ExportGoods from Bulgaria to another EU Member State
13Internal TransportGoods transported within Bulgaria
14Third CountryGoods from a non-EU country after customs clearance
11Cancellation (Annul)Cancel a previously submitted declarationHFRGAnnul
(separate format)
12ConfirmationConfirm receipt or dispatch of goodsHFRGConfirm
(separate format)

XML template files

FileRoot elementCovers
flat-import-template.xml<HFRGBULGARIA>Import (9), Export (10), Internal (13), ThirdCountry (14) — all fields included, fill only those relevant to the chosen OperationType
flat-import-annul.xml<HFRGAnnul>Cancellation (11) — 4 fields only
flat-import-confirm.xml<HFRGConfirm>Confirmation (12) — 7 fields only

Header

Every Flat XML file starts with a <Header> element containing system metadata:

ElementDescription
VersionFormat version (currently 1)
FiscalRegNoFiscal registration number (Bulstat/EIK) of the submitting entity
OperationTypeDeclaration type code: 9, 10, 11, 12, 13, or 14
TransportDateDate/time of transport (ISO 8601)
InternalReferenceInternal reference number from the source system
UINUnique transport number (if already assigned by NRA)

Field Mapping Tables

1. Flat XML Element Reference by Declaration Type

Flat XML elementXSD fieldImport (9)Export (10)Internal (13)ThirdCountry (14)
RecipientIdentrecipient/identYESYES--
RecipientIdentTyperecipient/identtypeYESYES--
ShipperIdentshipper/ident--YESYES
ShipperIdentTypeshipper/identtype--YESYES
IsSrissr-YES--
CustomsOfficecustoms/customsoffice---YES
CustomsDocumentcustoms/document---YES
CustomsDatecustomsdate---YES
CustomsTimecustomstime---YES
CustomsLocationcustomslocation---YES
HasCarrier, CarrierIsPerson, CarrierName, CarrierIdent, CarrierIdentTypecarrieroptoptoptopt
HasOrganizer, OrganizerIsPerson, OrganizerName, OrganizerIdent, OrganizerIdentTypeorganizeroptoptoptopt
RegVehicleregvehicleREQREQREQREQ
RegTrailer1regtrailer1optoptoptopt
RegTrailer2regtrailer2optoptoptopt
LoadLocalAddress, LoadStreet, LoadNumber, LoadEkatteloadaddress/receivedaddress (top)-YESYES-
LoadDateloaddate/receiveddate (top)-YESYES-
LoadTimeloadtime/receivedtime (top)-optREQ-
IsTransferistransferREQREQREQREQ
TransferLocalAddress, TransferStreet, TransferNumber, TransferEkattetransferaddressoptoptoptopt
TransferDatetransferdateoptoptoptopt
TransferTimetransfertimeoptoptoptopt
TransCarrierIsPerson, TransCarrierName, TransCarrierIdent, TransCarrierIdentTypetranscarrieroptoptoptopt
TransRegVehicletransregvehicleoptoptoptopt
TransRegTrailer1transregtrailer1optoptoptopt
TransRegTrailer2transregtrailer2optoptoptopt
IsTranshipmenttranshipment/istranshipmentoptoptopt-
TranshipmentTransportTypetranshipment/transporttypeoptoptopt-
TranshipmentDatetranshipment/transdateoptoptopt-
TranshipmentTimetranshipment/transtimeoptoptopt-
TranshipmentLocalAddress, TranshipmentStreet, TranshipmentNumber, TranshipmentEkattetranshipment/transaddressoptoptopt-
ContactNamecnameREQREQREQREQ
ContactPhonecphoneREQREQREQREQ
ContactPhoneCodecphonecodeREQREQREQREQ
ContactEmailcpemailREQREQREQREQ
DeclarantNamednameREQREQREQREQ
IsCorrectiscorrectREQREQREQREQ

2. Counterparties (Import, Internal, ThirdCountry)

Flat XML elementXSD fieldRequired
Counterparty/Identcr/rowenum/cridentREQ
Counterparty/IdentTypecr/rowenum/cridenttypeREQ
Counterparty/Namecr/rowenum/crnameREQ
Counterparty/TIdentcr/rowenum/tidentopt
Counterparty/TIdentTypecr/rowenum/tidenttypeopt
Counterparty/TNamecr/rowenum/tnameopt
Counterparty/Countrycr/rowenum/countryopt (Import only)
Address/LocalAddressaddress/rowenum/receivedaddress/localaddressREQ
Address/Streetaddress/rowenum/receivedaddress/streetopt
Address/Numberaddress/rowenum/receivedaddress/numbopt
Address/Ekatteaddress/rowenum/receivedaddress/ekatteREQ
Address/ReceivedDateaddress/rowenum/receiveddateREQ
Address/ReceivedTimeaddress/rowenum/receivedtimeopt

3. Buyers (Export only)

Flat XML elementXSD fieldRequired
Buyer/Identcr/rowenum/cridentREQ
Buyer/IdentTypecr/rowenum/cridenttypeREQ
Buyer/Namecr/rowenum/crnameREQ
Buyer/TIdentcr/rowenum/tidentopt
Buyer/TIdentTypecr/rowenum/tidenttypeopt
Buyer/TNamecr/rowenum/tnameopt
Buyer/Countrycr/rowenum/countryREQ

4. Goods (all types)

Flat XML elementXSD fieldRequired
Good/Codegoods/rowenum/codeREQ
Good/QuantityTypegoods/rowenum/quantitytypeopt (kg, m2, pcs)
Good/QuantityNetgoods/rowenum/quantitynetREQ
Good/QuantityGrossgoods/rowenum/quantitygrossopt
Good/Pricegoods/rowenum/priceREQ
Good/Purposegoods/rowenum/purposeREQ
Good/PurposeOthergoods/rowenum/purposeotheropt

Purpose codes by type

CodeDescriptionImportExportInternalThirdCountry
01DeliveryYESYESYESYES
02ComplaintYESYESYES-
03DonationYESYESYES-
04ProcessingYESYESYES-
05Storage until demandYESYES--
06OtherYESYESYESYES
07Transit with transshipmentYESYES-YES

5. Identifier Types

Main identifier (recipient/shipper)

CodeType
1Bulstat
2PIN
3FPN/PN
5NRA Service Number

Person identifier (carrier/organizer person)

CodeType
2PIN
3FPN/PN
5NRA Service Number
6Other

Firm identifier (carrier/organizer firm, counterparty)

CodeType
1Bulstat
5NRA Service Number
6Other
9VIN

6. Annul (OperationType 11) - separate format

Flat XML elementXSD fieldRequired
Identpart1/identREQ
IdentTypepart1/identtypeREQ
UINpart1/uinREQ
IsCorrectpart1/iscorrectREQ

7. Confirm (OperationType 12) - separate format

Flat XML elementXSD fieldRequired
Identpart1/identREQ
IdentTypepart1/identtypeREQ
IsReceivedpart1/isreceivedopt
UinReceivedpart1/uinreceivedopt
IsSentpart1/issentopt
UinSentpart1/uinsentopt
IsCorrectpart1/iscorrectREQ