Internal Transport Declaration Schema

decHfr_internal_v5_restrict.xsd

1. Overview

This XML Schema Definition (XSD) defines the structure for declaring high fiscal risk goods transport that starts and ends within the territory of Bulgaria. This declaration must be submitted to the National Revenue Agency (NRA) before the transport begins.

1.1 Purpose

The internal transport schema is used when goods subject to high fiscal risk supervision are transported from one location to another within Bulgaria (Bulgaria → Bulgaria). This applies to movements of specified goods between Bulgarian entities or locations.

1.2 Version Information

2. Root Element: decHfrInternal

The root element contains all declaration data for the internal transport. It consists of one main section (part1) that includes all required and optional information about the shipper, recipient, goods, transport details, and declaration metadata.

3. Main Declaration Section (part1)

The part1 section contains all elements of the declaration. All child elements use the <xs:all> compositor, meaning they can appear in any order but each may appear at most once.

3.1 Shipper Information (shipper)

MANDATORY. Identifies the supplier/sender of the goods.

Field Type Required Description
ident bulstat (9-13 digits) Yes Identification number: PIN/FPN/NRA Service Number or UIC by BULSTAT/UIC by ZTRROLN/NRA Service Number
identtype identtype enum Yes Type of identification number: 1 - UIC by BULSTAT/UIC by ZTRROLN 2 - PIN (Personal identification number) 3 - PNF (Foreigner's Personal Number) / PN (Personal Number) 5 - NRA Service Number

3.2 Unique Transport Number (uin)

OPTIONAL. Used only for corrections to previously submitted declarations.

Field Type Required Description
uin string (max 13 chars) No Unique transport number from the original declaration. Use only when submitting corrections. For initial submissions, do not include this field.

3.3 Carrier Information (carrier)

OPTIONAL. Information about the entity performing the transport. Must provide either reprperson (physical person) OR reprfirm (legal entity).

3.3.1 Physical Person Carrier (reprperson)

Field Type Required Description
isperson boolean Yes Flag indicating physical person (must be true)
name string (max 200 chars) Yes Full name of the person
egn egn (10 digits) Yes Identification number
identtype egntype enum Yes Type of identification: 2 - PIN (Personal identification number) 3 - PNF (Foreigner's Personal Number) / PN (Personal Number) 5 - NRA Service Number 6 - Other number

3.3.2 Legal Entity Carrier (reprfirm)

Field Type Required Description
isfirm boolean Yes Flag indicating legal entity (must be true)
name string (max 200 chars) Yes Name of the organization
bulstat vin (max 15 chars) Yes Identification number
identtype vintype enum Yes Type of identification: 1 - UIC by BULSTAT/UIC by ZTRROLN 5 - NRA Service Number 6 - Other number 9 - VIN number

3.4 Transport Organizer (organizer)

OPTIONAL. Entity organizing the transport. Structure is identical to carrier section - must provide either reprperson or reprfirm.

3.5 Loading Address (loadaddress)

MANDATORY. The address where goods are loaded for transport.

Field Type Required Description
localaddress string (max 100 chars) Conditional Free-text address description. REQUIRED if street/numb are not provided
street string (max 100 chars) Conditional Street name. REQUIRED with numb if localaddress is not provided
numb string (max 5 chars) Conditional Street number. REQUIRED with street if localaddress is not provided
ekatte string (5 digits) Yes Settlement code from the EKATTE nomenclature (Bulgarian address codes)

Note: Either (street AND numb) OR localaddress must be provided, along with ekatte.

3.6 Loading Date and Time

Field Type Required Description
loaddate date (YYYY-MM-DD) Yes Date when goods will be loaded
loadtime time (HH:MM:SS) Yes Time when goods will be loaded

Validation: loaddate/loadtime must be in the future (after the current date/time when the declaration is submitted).

3.7 Recipient Information (cr)

MANDATORY. Information about the buyer/recipient of the goods.

Field Type Required Description
crident bulstat (9-13 digits) Yes Recipient's identification number
cridenttype identtype enum Yes Type of identification (1=UIC, 2=PIN, 3=FPN, 5=NRA Service Number)
crname string (max 200 chars) Yes Recipient's name or organization name

3.8 Third Party Information

OPTIONAL. Information about a third party involved in triangular transactions.

Field Type Required Description
tident bulstat (9-13 digits) No Third party identification number
tidenttype identtype enum No Type of identification
tname string (max 200 chars) No Third party name

Note: All three fields (tident, tidenttype, tname) must be provided together if declaring a third party.

3.9 Delivery Address (receivedaddress)

MANDATORY. The address where goods will be delivered. Structure is identical to loadaddress.

Field Type Required Description
localaddress string (max 100 chars) Conditional Free-text address description
street string (max 100 chars) Conditional Street name
numb string (max 5 chars) Conditional Street number
ekatte string (5 digits) Yes Settlement code from EKATTE nomenclature

3.10 Delivery Date and Time

Field Type Required Description
receiveddate date (YYYY-MM-DD) Yes Date when goods will be delivered
receivedtime time (HH:MM:SS) Yes Time when goods will be delivered

Validation: receiveddate/receivedtime must be after loaddate/loadtime.

4. Goods Information

4.1 Goods Details (goods)

MANDATORY. Details about the transported goods. Multiple goods entries can be declared.

Field Type Required Description
code string (max 20 chars) Yes Goods code from the approved nomenclature
quantitynet decimal Yes Net quantity (must be > 0.00)
quantitygross decimal Yes Gross quantity (must be >= 0.00 and >= quantitynet)
quantitytype enum Conditional Unit of measurement. MANDATORY from 01.05.2025 for goods with new codes added per Order № ZMF-237/31.03.2025. Allowed values: • кг (kilograms) • м2 (square meters) • броя (pieces)
price decimal Conditional Price per unit. MANDATORY (> 0.00) if purpose is 01 (delivery) or 05 (storage)
purpose enum Yes Purpose code: 01 - Delivery 02 - Complaint/return 03 - Donation 04 - Processing 05 - Storage 06 - Other 07 - Transit with transhipment

Important: The quantitytype field becomes mandatory from May 1, 2025, but only for goods using the new codes introduced by Order № ZMF-237/31.03.2025. Existing declarations with old codes can continue using version 4 schemas.

4.2 Vehicle Information

OPTIONAL. Information about the transport vehicle and trailers.

Field Type Required Description
regvehicle string (max 15 chars) No Vehicle registration number (uppercase Latin letters and digits only, no spaces)
regtrailer1 string (max 15 chars) No First trailer registration number
regtrailer2 string (max 15 chars) No Second trailer registration number

Format: Registration numbers must contain only uppercase Latin letters (A-Z) and digits (0-9), with no spaces or special characters.

5. Transfer Operations

5.1 Transfer Flag (istransfer)

OPTIONAL boolean field. Set to true if the transport includes an intermediate transfer/handover point.

If istransfer = true, the following additional fields become MANDATORY:

5.2 Transfer Details

Field Type Required Description
transferaddress address Yes (if istransfer=true) Address where transfer occurs. Same structure as loadaddress/receivedaddress
transferdate date Yes (if istransfer=true) Date of transfer
transfertime time Yes (if istransfer=true) Time of transfer
transcarrier carrier Yes (if istransfer=true) New carrier information (reprperson or reprfirm). Same structure as main carrier section

Validation: transferdate/transfertime must be between loaddate/loadtime and receiveddate/receivedtime.

6. Transhipment Operations

6.1 Transhipment Flag (istranshipment)

OPTIONAL boolean field. Set to true for water, rail, or air transport requiring reloading operations.

If istranshipment = true, the following fields become MANDATORY:

6.2 Transhipment Details

Field Type Required Description
transporttype enum Yes (if istranshipment=true) Type of transport: 1 - Water transport 2 - Rail transport 3 - Air transport
transdate date Yes (if istranshipment=true) Date of transhipment
transtime time Yes (if istranshipment=true) Time of transhipment
transaddress address Yes (if istranshipment=true) Transhipment location

Important: For initial declarations with transhipment, transdate/transtime must equal loaddate/loadtime.

7. Contact and Declaration Information

7.1 Contact Information (contact)

MANDATORY. Contact details for the obligated entity regarding fiscal control procedures.

Field Type Required Description
cname string (max 200 chars) Yes Contact person name
cphonecode string (max 10 chars) Yes Phone country code (pattern: optional '+', then digits/spaces/hyphens)
cphone string (max 10 chars) Yes Phone number
cpemail string (max 200 chars) Yes Email address (must match pattern: [^@]+@[^\.]+\..+)

7.2 Declarator Information

MANDATORY. Information about the person submitting the declaration.

Field Type Required Description
dname string (max 200 chars) Yes Name of the declarator
iscorrect boolean Yes Declaration flag. Must be set to true to confirm: "I declare that the information provided in this form is true and accurate. I am aware that I bear responsibility for false data under Article 313 of the Criminal Code."

Legal Note: By setting iscorrect to true, the declarator acknowledges criminal liability under Article 313 of the Bulgarian Criminal Code for providing false information.

8. Simple Data Types Reference

This section defines the custom simple types used throughout the schema.

Type Name Base Type Pattern/Constraints Description
egn string Length: 10 digits Pattern: [0-9]{10} Personal identification number (10 digits)
bulstat string Max length: 13 digits Pattern: [0-9]{1,13} BULSTAT/UIC identification number (9-13 digits)
vin string Max length: 15 chars Pattern: [A-Z0-9\+\*]{1,15} Vehicle identification number or company ID
egntype integer Enum values: 2, 3, 5, 6 2=PIN, 3=FPN, 5=NRA Service Number, 6=Other
vintype integer Enum values: 1, 5, 6, 9 1=UIC, 5=NRA Number, 6=Other, 9=VIN
identtype integer Enum values: 1, 2, 3, 5 1=UIC, 2=PIN, 3=FPN, 5=NRA Number

9. Complex Types Reference

9.1 address Type

Used for various address fields throughout the schema. All elements are optional, but validation rules require specific combinations.

Element Type Required Description
localaddress string (max 100) Conditional Free-form address description
street string (max 100) Conditional Street name
numb string (max 5) Conditional Street number
ekatte string (5 digits) Yes EKATTE settlement code

Validation rule: Either (street AND numb) OR localaddress must be provided, always along with ekatte.

9.2 addressdetailed Type

Identical structure to address type. May be used in different contexts with the same validation rules.

10. Validation Rules Summary

10.1 Date and Time Validation

10.2 Quantity Validation

10.3 Price Validation

Price must be > 0.00 when purpose code is 01 (delivery) or 05 (storage mode).

10.4 Address Validation

For all address fields: either (street AND numb) OR localaddress must be provided, always along with ekatte code.

10.5 Identification Number Validation

10.6 Vehicle Registration Validation

Vehicle and trailer registration numbers must be uppercase Latin letters (A-Z) and digits (0-9) only, with no spaces. Maximum 15 characters.

10.7 Contact Information Validation

11. Usage Guidelines

11.1 When to Use This Schema

This schema should be used for declaring transport of high fiscal risk goods when:

11.2 Submission Timing

Declarations must be submitted to the National Revenue Agency before the scheduled loading date/time. The system will validate that the loaddate/loadtime is in the future relative to the submission timestamp.

11.3 Corrections and Updates

To submit a correction to a previously filed declaration, include the 'uin' (Unique Transport Number) from the original declaration. This 13-character identifier links the correction to the original filing.

11.4 Version 5 Changes

Version 5 introduces the optional 'quantitytype' field for goods. This field becomes MANDATORY starting May 1, 2025, but only for goods using the new codes introduced by Order № ZMF-237 from March 31, 2025. Declarations for goods with existing codes may continue using version 4 schemas.

12. XML Examples

12.1 Basic Internal Transport Declaration

Example of a minimal valid declaration:

<?xml version="1.0" encoding="WINDOWS-1251"?>
<decHfrInternal>
  <part1>
    <shipper>
      <ident>123456789</ident>
      <identtype>1</identtype>
    </shipper>
    <loadaddress>
      <street>Main Street</street>
      <numb>15</numb>
      <ekatte>12345</ekatte>
    </loadaddress>
    <loaddate>2025-06-15</loaddate>
    <loadtime>10:00:00</loadtime>
    <cr>
      <crident>987654321</crident>
      <cridenttype>1</cridenttype>
      <crname>Recipient Company Ltd</crname>
    </cr>
    <receivedaddress>
      <localaddress>Industrial Zone, Warehouse 5</localaddress>
      <ekatte>54321</ekatte>
    </receivedaddress>
    <receiveddate>2025-06-15</receiveddate>
    <receivedtime>16:00:00</receivedtime>
    <goods>
      <code>GOODS123</code>
      <quantitynet>100.00</quantitynet>
      <quantitygross>110.00</quantitygross>
      <quantitytype>кг</quantitytype>
      <price>25.50</price>
      <purpose>01</purpose>
    </goods>
    <contact>
      <cname>John Smith</cname>
      <cphonecode>+359</cphonecode>
      <cphone>888123456</cphone>
      <cpemail>contact@example.com</cpemail>
    </contact>
    <dname>Jane Doe</dname>
    <iscorrect>true</iscorrect>
  </part1>
</decHfrInternal>

12.2 Declaration with Transfer

Example showing an intermediate transfer point:

<decHfrInternal>
  <part1>
    <!-- Basic fields omitted for brevity -->
    <loaddate>2025-06-15</loaddate>
    <loadtime>08:00:00</loadtime>
    <receiveddate>2025-06-15</receiveddate>
    <receivedtime>18:00:00</receivedtime>
    <istransfer>true</istransfer>
    <transferaddress>
      <street>Transfer Hub Street</street>
      <numb>50</numb>
      <ekatte>99999</ekatte>
    </transferaddress>
    <transferdate>2025-06-15</transferdate>
    <transfertime>13:00:00</transfertime>
    <transcarrier>
      <reprfirm>
        <isfirm>true</isfirm>
        <name>New Carrier Ltd</name>
        <bulstat>555666777</bulstat>
        <identtype>1</identtype>
      </reprfirm>
    </transcarrier>
    <!-- Other required fields -->
  </part1>
</decHfrInternal>

13. Appendix

13.1 Purpose Codes Reference

Code Description (Bulgarian) Description (English)
01 доставка Delivery
02 рекламация Complaint/Return
03 дарение Donation
04 обработка Processing
05 режим складиране Storage mode
06 друго Other
07 преминаване с претоварни операции Transit with transhipment operations

13.2 Transport Type Codes (for Transhipment)

Code Description (Bulgarian) Description (English)
1 Воден Water transport
2 Железопътен Rail transport
3 Въздушен Air transport

13.3 Unit of Measurement Codes

Code Description (Bulgarian) Description (English)
кг килограми Kilograms
м2 квадратни метри Square meters
броя брой Pieces

13.4 Schema Information

13.5 Contact Information

For questions regarding this schema or the declaration process, contact the National Revenue Agency (NRA) of Bulgaria.

---

End of Documentation