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.
| OperationType | Declaration | Description | Format |
|---|---|---|---|
| 9 | Import | Goods from another EU Member State into Bulgaria | HFRGBULGARIA (unified transport format) |
| 10 | Export | Goods from Bulgaria to another EU Member State | |
| 13 | Internal Transport | Goods transported within Bulgaria | |
| 14 | Third Country | Goods from a non-EU country after customs clearance | |
| 11 | Cancellation (Annul) | Cancel a previously submitted declaration | HFRGAnnul (separate format) |
| 12 | Confirmation | Confirm receipt or dispatch of goods | HFRGConfirm (separate format) |
| File | Root element | Covers |
|---|---|---|
| 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 |
Every Flat XML file starts with a <Header> element containing system metadata:
| Element | Description |
|---|---|
| Version | Format version (currently 1) |
| FiscalRegNo | Fiscal registration number (Bulstat/EIK) of the submitting entity |
| OperationType | Declaration type code: 9, 10, 11, 12, 13, or 14 |
| TransportDate | Date/time of transport (ISO 8601) |
| InternalReference | Internal reference number from the source system |
| UIN | Unique transport number (if already assigned by NRA) |
| Flat XML element | XSD field | Import (9) | Export (10) | Internal (13) | ThirdCountry (14) |
|---|---|---|---|---|---|
| RecipientIdent | recipient/ident | YES | YES | - | - |
| RecipientIdentType | recipient/identtype | YES | YES | - | - |
| ShipperIdent | shipper/ident | - | - | YES | YES |
| ShipperIdentType | shipper/identtype | - | - | YES | YES |
| IsSr | issr | - | YES | - | - |
| CustomsOffice | customs/customsoffice | - | - | - | YES |
| CustomsDocument | customs/document | - | - | - | YES |
| CustomsDate | customsdate | - | - | - | YES |
| CustomsTime | customstime | - | - | - | YES |
| CustomsLocation | customslocation | - | - | - | YES |
| HasCarrier, CarrierIsPerson, CarrierName, CarrierIdent, CarrierIdentType | carrier | opt | opt | opt | opt |
| HasOrganizer, OrganizerIsPerson, OrganizerName, OrganizerIdent, OrganizerIdentType | organizer | opt | opt | opt | opt |
| RegVehicle | regvehicle | REQ | REQ | REQ | REQ |
| RegTrailer1 | regtrailer1 | opt | opt | opt | opt |
| RegTrailer2 | regtrailer2 | opt | opt | opt | opt |
| LoadLocalAddress, LoadStreet, LoadNumber, LoadEkatte | loadaddress/receivedaddress (top) | - | YES | YES | - |
| LoadDate | loaddate/receiveddate (top) | - | YES | YES | - |
| LoadTime | loadtime/receivedtime (top) | - | opt | REQ | - |
| IsTransfer | istransfer | REQ | REQ | REQ | REQ |
| TransferLocalAddress, TransferStreet, TransferNumber, TransferEkatte | transferaddress | opt | opt | opt | opt |
| TransferDate | transferdate | opt | opt | opt | opt |
| TransferTime | transfertime | opt | opt | opt | opt |
| TransCarrierIsPerson, TransCarrierName, TransCarrierIdent, TransCarrierIdentType | transcarrier | opt | opt | opt | opt |
| TransRegVehicle | transregvehicle | opt | opt | opt | opt |
| TransRegTrailer1 | transregtrailer1 | opt | opt | opt | opt |
| TransRegTrailer2 | transregtrailer2 | opt | opt | opt | opt |
| IsTranshipment | transhipment/istranshipment | opt | opt | opt | - |
| TranshipmentTransportType | transhipment/transporttype | opt | opt | opt | - |
| TranshipmentDate | transhipment/transdate | opt | opt | opt | - |
| TranshipmentTime | transhipment/transtime | opt | opt | opt | - |
| TranshipmentLocalAddress, TranshipmentStreet, TranshipmentNumber, TranshipmentEkatte | transhipment/transaddress | opt | opt | opt | - |
| ContactName | cname | REQ | REQ | REQ | REQ |
| ContactPhone | cphone | REQ | REQ | REQ | REQ |
| ContactPhoneCode | cphonecode | REQ | REQ | REQ | REQ |
| ContactEmail | cpemail | REQ | REQ | REQ | REQ |
| DeclarantName | dname | REQ | REQ | REQ | REQ |
| IsCorrect | iscorrect | REQ | REQ | REQ | REQ |
| Flat XML element | XSD field | Required |
|---|---|---|
| Counterparty/Ident | cr/rowenum/crident | REQ |
| Counterparty/IdentType | cr/rowenum/cridenttype | REQ |
| Counterparty/Name | cr/rowenum/crname | REQ |
| Counterparty/TIdent | cr/rowenum/tident | opt |
| Counterparty/TIdentType | cr/rowenum/tidenttype | opt |
| Counterparty/TName | cr/rowenum/tname | opt |
| Counterparty/Country | cr/rowenum/country | opt (Import only) |
| Address/LocalAddress | address/rowenum/receivedaddress/localaddress | REQ |
| Address/Street | address/rowenum/receivedaddress/street | opt |
| Address/Number | address/rowenum/receivedaddress/numb | opt |
| Address/Ekatte | address/rowenum/receivedaddress/ekatte | REQ |
| Address/ReceivedDate | address/rowenum/receiveddate | REQ |
| Address/ReceivedTime | address/rowenum/receivedtime | opt |
| Flat XML element | XSD field | Required |
|---|---|---|
| Buyer/Ident | cr/rowenum/crident | REQ |
| Buyer/IdentType | cr/rowenum/cridenttype | REQ |
| Buyer/Name | cr/rowenum/crname | REQ |
| Buyer/TIdent | cr/rowenum/tident | opt |
| Buyer/TIdentType | cr/rowenum/tidenttype | opt |
| Buyer/TName | cr/rowenum/tname | opt |
| Buyer/Country | cr/rowenum/country | REQ |
| Flat XML element | XSD field | Required |
|---|---|---|
| Good/Code | goods/rowenum/code | REQ |
| Good/QuantityType | goods/rowenum/quantitytype | opt (kg, m2, pcs) |
| Good/QuantityNet | goods/rowenum/quantitynet | REQ |
| Good/QuantityGross | goods/rowenum/quantitygross | opt |
| Good/Price | goods/rowenum/price | REQ |
| Good/Purpose | goods/rowenum/purpose | REQ |
| Good/PurposeOther | goods/rowenum/purposeother | opt |
| Code | Description | Import | Export | Internal | ThirdCountry |
|---|---|---|---|---|---|
| 01 | Delivery | YES | YES | YES | YES |
| 02 | Complaint | YES | YES | YES | - |
| 03 | Donation | YES | YES | YES | - |
| 04 | Processing | YES | YES | YES | - |
| 05 | Storage until demand | YES | YES | - | - |
| 06 | Other | YES | YES | YES | YES |
| 07 | Transit with transshipment | YES | YES | - | YES |
| Code | Type |
|---|---|
| 1 | Bulstat |
| 2 | PIN |
| 3 | FPN/PN |
| 5 | NRA Service Number |
| Code | Type |
|---|---|
| 2 | PIN |
| 3 | FPN/PN |
| 5 | NRA Service Number |
| 6 | Other |
| Code | Type |
|---|---|
| 1 | Bulstat |
| 5 | NRA Service Number |
| 6 | Other |
| 9 | VIN |
| Flat XML element | XSD field | Required |
|---|---|---|
| Ident | part1/ident | REQ |
| IdentType | part1/identtype | REQ |
| UIN | part1/uin | REQ |
| IsCorrect | part1/iscorrect | REQ |
| Flat XML element | XSD field | Required |
|---|---|---|
| Ident | part1/ident | REQ |
| IdentType | part1/identtype | REQ |
| IsReceived | part1/isreceived | opt |
| UinReceived | part1/uinreceived | opt |
| IsSent | part1/issent | opt |
| UinSent | part1/uinsent | opt |
| IsCorrect | part1/iscorrect | REQ |