1C-Bitrix Integration with KLADR: Import, Search, Mapping to FIAS

1C-Bitrix Integration with KLADR When developing an online store on 1C-Bitrix, sooner or later you face the need for address autocomplete. Clients enter city and street manually — errors, duplicates, delivery failures. We regularly encounter situations where the accounting system 1C:Enterprise us

Our competencies:

Frequently Asked Questions

Latest works

  • B2B ADVANCE company website development
    B2B ADVANCE company website development
    1462
  • Website development for FIXPER company
    Website development for FIXPER company
    1019
  • Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    764
  • Development based on 1C Enterprise for MIRSANBEL
    Development based on 1C Enterprise for MIRSANBEL
    882
  • Website development on CRM Bitrix24 for DOLBIMBY
    Website development on CRM Bitrix24 for DOLBIMBY
    810
  • Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    1166

1C-Bitrix Integration with KLADR

When developing an online store on 1C-Bitrix, sooner or later you face the need for address autocomplete. Clients enter city and street manually — errors, duplicates, delivery failures. We regularly encounter situations where the accounting system 1C:Enterprise uses KLADR, while the site has FIAS connected via DaData. Addresses don't match, orders stall. In this article, we'll break down how to properly integrate KLADR into Bitrix and ensure seamless exchange with 1C.

Why KLADR is Still Relevant

KLADR — the address classifier of the Russian Federation, maintained by the Federal Tax Service. It was the primary standard. Today, most new systems have migrated to FIAS, but legacy infrastructure in 1C and reporting to the Federal Tax Service still require the KLADR code. If you have an online store on Bitrix integrated with 1C, ignoring KLADR is not an option.

When You Need KLADR Integration Instead of FIAS

  • Client's accounting system is 1C:Enterprise version 8.3.14 or lower, which operates with KLADR codes.
  • Exchange with the Federal Tax Service in formats requiring the KLADR code.
  • Transport companies (CDEK, Russian Post) that haven't yet switched to FIAS.
  • Import of an old address database where all records are in KLADR format.

If no such limitations exist, go ahead and use FIAS — it is officially supported and more precise. But for hybrid scenarios, mapping between KLADR and FIAS is essential.

Characteristic KLADR FIAS
Depth 5 levels (region, district, city, locality, street) 7+ levels (adds buildings, apartments)
Code 11-13 digits GUID (AOGUID) + KLADR code in CODE field
Updates Quarterly Daily
Federal Tax Service support Yes, legacy Yes, current

KLADR Structure

The KLADR code is an 11-digit or 13-digit number (including the relevance indicator). Structure:

PP RRRRR GGG RRR ULITCH 2 5 3 3 4 = 17 characters (with extensions) 
  • PP — subject code (region).
  • RRRRR — district code.
  • GGG — city code.
  • RRR — locality code.
  • ULITCH — street code.

KLADR database files are downloaded from the Federal Tax Service website (fias.nalog.ru — same section, KLADR). Format — DBF files. Source: fias.nalog.ru

Importing KLADR into MySQL/PostgreSQL

# Convert DBF → SQL using dbf2sql utility or Python python3 -c " import dbf, csv table = dbf.Table('KLADR.DBF') table.open() for record in table: print(','.join([str(f) for f in record])) table.close() " > kladr.csv 

After importing into the kladr_objects table, create indexes on code and parent code for fast search.

KLADR Search in Bitrix

function searchKladrCities(string $regionCode, string $cityName): array { $connection = \Bitrix\Main\Application::getConnection(); $name = $connection->getSqlHelper()->forSql(mb_strtolower($cityName)); $sql = " SELECT CODE, NAME, SOCR FROM kladr_objects WHERE CODE LIKE '{$regionCode}%' AND LENGTH(CODE) = 13 -- city level AND LOWER(NAME) LIKE '%{$name}%' AND STATUS = '1' -- active records LIMIT 20 "; // ... } 

This method returns a list of cities whose code starts with the region code. It's used in the autocomplete component.

Mapping KLADR ↔ FIAS

Since modern systems use FIAS and legacy uses KLADR, a mapping table is often needed. The FIAS database has a CODE field — that's the KLADR code. The ADDROBJ table contains both identifiers: AOGUID (FIAS) and CODE (KLADR).

// Get KLADR code from FIAS GUID $sql = "SELECT CODE FROM fias_ADDROBJ WHERE AOGUID = '" . $fiasGuid . "'"; 

The mapping table solves address mismatch during exchange with 1C.

Address Autocomplete via DaData with KLADR Code

DaData returns both kladr_id and fias_id in the suggestion response. If you specifically need KLADR:

$("#address").suggestions({ token: dadataToken, type: "ADDRESS", onSelect: function(suggestion) { const d = suggestion.data; $("#kladr-id").val(d.kladr_id); $("#fias-id").val(d.fias_id); // Store both — for different downstream systems } }); 

Storing both identifiers is best practice when migrating from KLADR to FIAS.

Passing to 1C:Enterprise

When syncing orders with 1C:Enterprise via CommerceML or direct REST exchange, the address is transmitted in a format that 1C recognizes. If 1C version is old (below 8.3.14), it accepts KLADR codes. Pass the kladr_id from the order field along with the string address.

How We Implement KLADR Integration in Bitrix

Our approach is structured and tested:

  1. Analyze the current address schema: what fields are stored, which identifiers 1C uses.
  2. Import the KLADR database (latest version from the Federal Tax Service) into a separate kladr_objects table.
  3. Create REST endpoints for hierarchical search: regions → cities → streets.
  4. Map existing addresses (if any) to KLADR codes via open FIAS data.
  5. Integrate with DaData or another autocomplete service, preserving the KLADR code in the order.
  6. Configure exchange with 1C: add a kladr_id field in CommerceML.
  7. Test on live data — verify that all addresses from 1C map correctly.

On one project, we integrated for a retail chain with 50,000 addresses. The KLADR database took about 2 GB after indexing. City search by first characters executed in 0.02 seconds.

What Our Work Includes

  • Import and configuration of the KLADR database on your server.
  • REST API for address search with parent code filtering.
  • Mapping table between KLADR and FIAS for seamless operation with modern services.
  • Integration with 1C: setting up exchange of address requisites.
  • Documentation on API usage and post-implementation support.

Timeline and Pricing

Effort depends on the volume of legacy data:

Task Estimate (hours)
Import KLADR database 4–6
Create search endpoints 6–8
Map KLADR ↔ FIAS 3–4
Integrate with 1C 4–8

Cost is calculated individually after auditing your system. We'll assess your project within one day — contact us.

Contact us — write to us via Telegram or leave a request on our website. We'll respond within an hour.