Complex Types and Validations

KEY VALIDATION RULES SUMMARY

Customs Information:

  • customsoffice: Must be valid customs office code from nomenclature (e.g., BG001000)
  • document: Single Administrative Document (SAD) number, max 20 characters
  • customslocation: Must be valid customs location code

Date/Time Validation:

  • customsdate/customstime: Date/time of transport continuation after customs release - must be after NRA submission time
  • receiveddate/receivedtime: Must be after customsdate/customstime
  • If transfer: transferdate/transfertime must be after NRA submission and between customs and received times
  • If transhipment: transdate/transtime must be after NRA submission

Purpose Codes (LIMITED):

  • Only 01, 06, 07 are allowed for third country transport
  • Codes 02-05 are NOT valid for this declaration type

Recipient Identification:

  • Uses identtype (Bulgarian ID types only): 1, 2, 3, 5
  • Does NOT use vintype (no foreign IDs for recipients)

Complex Types

1. Importer (shipper)

FieldTypeRequiredValidationDescription
identbulstatYESminLength: 9Identification number
identtypeidenttypeYES1,2,3,5Type of ID

2. Customs Information (customs)

FieldTypeRequiredValidationDescription
customsofficestringYESmaxLength: 8Customs authority - select from nomenclature
documentstringYESmaxLength: 20Single Administrative Document (import customs declaration)

3. Recipient (cr/rowenum)

Note: Uses identtype (Bulgarian), not vintype.

FieldTypeRequiredValidationDescription
cridentbulstatYESpattern: [0-9]{1,13}Identification number
cridenttypeidenttypeYES1,2,3,5ID type (Bulgarian only)
crnamestringYESmaxLength: 200Name/Title

4. Goods (goods/rowenum)

FieldTypeRequiredValidationDescription
codestringYESmaxLength: 20CN commodity code
quantitytypeenumConditionalкг | м2 | брояUnit of measure
quantitynetdecimalYESfractionDigits: 3Net quantity
quantitygrossdecimalNOfractionDigits: 3Gross quantity
pricedecimalYESfractionDigits: 2Value in leva
purposeenumYES01, 06, 07 ONLYPurpose code (LIMITED)
purposeotherstringConditional*maxLength: 1000Other purpose description (required for 06, 07)

5. Transport Organizer (organizer)

Optional section for person organizing the transport. Must provide EITHER reprperson OR reprfirm (not both)

reprperson (Physical Person):

FieldTypeRequiredValidationDescription
ispersonbooleanYES*trueFlag for physical person
egnstringYES*length: 10Identification number
namestringYES*maxLength: 200Name
identtypenumericYES*2=EGN, 3=LNCh, 5=NRA, 6=OtherID type

reprfirm (Legal Entity):

FieldTypeRequiredValidationDescription
isfirmbooleanYES*trueFlag for legal entity
bulstatstringYES*maxLength: 15, VIN cannot start with BGIdentification number
namestringYES*maxLength: 200Name
identtypenumericYES*1=EIK, 5=NRA, 6=Other, 9=VINID type

* Required only if organizer section is used


Purpose Codes for Third Country

CodeBulgarianEnglishpurposeother Required
01доставка на стокаDelivery of goodsNo
06другоOtherYes
07преминаване с претоварни операцииTransit with transshipment operationsYes - include UNP

Note: Codes 02, 03, 04, 05 are NOT available for third country transport.


XML Example

<?xml version="1.0" encoding="WINDOWS-1251"?>
<decHfrThirdcountry>
  <part1>
    <shipper>
      <ident>123456789</ident>
      <identtype>1</identtype>
    </shipper>
    <customs>
      <customsoffice>BG001000</customsoffice>
      <document>26BG123456789012</document>
    </customs>
    <customsdate>2026-01-20</customsdate>
    <customstime>10:00</customstime>
    <customslocation>BG001015</customslocation>
    <regvehicle>CA1234AB</regvehicle>
    <istransfer>false</istransfer>
    <cr>
      <rowenum>
        <crident>987654321</crident>
        <cridenttype>1</cridenttype>
        <crname>Bulgarian Recipient EOOD</crname>
        <address>
          <rowenum>
            <receivedaddress>
              <localaddress>Industrial Zone</localaddress>
              <ekatte>68134</ekatte>
            </receivedaddress>
            <receiveddate>2026-01-20</receiveddate>
            <goods>
              <rowenum>
                <code>GOODS123</code>
                <quantitynet>100.000</quantitynet>
                <price>2500.00</price>
                <purpose>01</purpose>
              </rowenum>
            </goods>
          </rowenum>
        </address>
      </rowenum>
    </cr>
    <cname>Ivan Petrov</cname>
    <cphone>888123456</cphone>
    <cphonecode>+359</cphonecode>
    <cpemail>[email protected]</cpemail>
    <dname>Maria Ivanova</dname>
    <iscorrect>true</iscorrect>
  </part1>
</decHfrThirdcountry>

Document Information: