KBS Bridge
Integration guide for hotel software developers
TR
Integration guide

File format for hotel software

All the PMS has to do is write one file and read one file. Connecting to the KBS website is done by KBS Bridge.

Document version 1 Date 27 October 2026 KBS Bridge version 2026.10.26.1 and later

1How it works

What KBS is In Turkey every hotel must report each guest's check-in and check-out to the government's guest registration system, KBS (Kimlik Bildirim Sistemi), on the same day. Depending on the hotel's district, the system belongs to the Police (EGM) or to the Gendarmerie; each has its own website. Turkish guests are reported with their 11-digit Turkish ID number, foreign guests with their passport or ID document number. In this document, "the KBS website" means that website. KBS Bridge logs in to it and does the reporting on behalf of the PMS.

The PMS writes the guests to be reported to kbs_bekleyen.txt. KBS Bridge reads this file every few minutes, reports the check-ins and check-outs to the KBS website and writes the result to kbs_sonuc.txt. The PMS reads the result and updates the reporting flag in its own database.

Files

The PMS and KBS Bridge use the same folder, for example C:\KBS\. If the folder is on another computer, it is shared on the network and both computers can write to it.

FileWritten byPurpose
kbs_bekleyen.txtPMSGuests (section 3)
kbs_sonuc.txtKBS BridgeResult of each record (section 4)
kbs_durum.txtKBS BridgeWhether KBS Bridge is running — optional (section 6)
kbs_simdi.txtPMS"Send now" request — optional (section 6)
kbs_kopru.kilitKBS BridgeKBS Bridge's own lock file

The PMS touches only the file it writes; the others it only reads or ignores.

2What the PMS does

The PMS first writes the guests to kbs_bekleyen.txt, then reads the result from kbs_sonuc.txt.

The whole job
  • One function: KbsBekleyenYaz() → select from the database all guests whose flag is 0, 1 or 3 (records with flag 2 and guests still in reservation are not written), write the lines, save under a temporary name, move over kbs_bekleyen.txt. One query, one file write.
  • Call this function at the end of guest save / edit / check-out / delete.
  • Every few minutes read kbs_sonuc.txt; write the flag from the tamam lines to the database, show the message from the hata lines to the user; then call KbsBekleyenYaz().
RequestLine writtenResult seen
Register the guest on the KBS websiteflag 0 · status icerdegiris;1;tamam
Report the check-outflag 1 · status cikti · check-out timecikis;2;tamam
Report an already reported guest againflag set to 0giris;1;tamam
Change the roomflag 1 · new room numberoda;1;tamam
Correct identity details (name, date of birth etc.)flag 3 · status icerdeFirst duzeltme;3;tamam, then duzeltme;1;tamam
Correct the ID numberflag 3 · status icerde · old number in the eskikimlikno columnFirst duzeltme;3;tamam, then duzeltme;1;tamam
Delete a reported guest's recordflag 1 · status iptalcikis;2;tamam
Delete the record of a guest whose correction is not finishedflag 3 · status iptalduzeltme;2;tamam

The number in the middle of the result line is the record's new flag; the PMS writes that flag to the database.

Step by step

  1. The PMS writes kbs_bekleyen.txt. The file is not a list of new records to report; it is the hotel's current state. Whenever a guest is saved, edited, checked out, deleted or has their flag changed, the PMS rewrites the file from scratch: all records in the database whose flag is 0, 1 or 3 (including those whose status has not changed).
    Records with flag 2 and guests who have not checked in (still in reservation) are not written. The file is written even when there is no guest to send; it then has only the header line and #SON.
  2. KBS Bridge processes the file. It reads the file every few minutes, reports check-ins, check-outs and room changes to the KBS website, and writes the result of each record to kbs_sonuc.txt.
  3. The PMS reads kbs_sonuc.txt. It reads the file every few minutes, processes the lines in order and writes nothing to the file. Example
    kbs_sonuc.txt
    kayitno;islem;bayrak;sonuc;mesaj;zaman;ad;soyad;uyari
    12345;giris;1;tamam;KBS sitesine giriş bildirildi.;23.10.2026 14:07;;;
    12346;cikis;2;tamam;KBS sitesine çıkış bildirildi.;23.10.2026 14:07;;;
    12349;giris;0;hata;eksik bilgi: cinsiyet;23.10.2026 14:07;;;
    12350;duzeltme;3;tamam;Eski kayıt KBS sitesinden çıkarıldı. Doğru bilgilerle giriş yapılacak.;23.10.2026 14:07;;;
    12352;giris;1;tamam;KBS sitesine giriş bildirildi. Yazılan ad ile KBS sitesindeki ad farklı görünüyor (KBS sitesinde: HA***** YI*****). Kimlik numarasının kontrol edilmesi gerekebilir.;23.10.2026 14:12;;;adfarkli
    #SON
    • 12345 → Flag in the database is 0; 1 in the line is higher, the flag in the database is set to 1.
    • 12346 → Flag in the database is 1; 2 in the line is higher, the flag in the database is set to 2.
    • 12349 → hata; the flag in the database does not change, mesaj is shown to the user.
    • 12350 → First step of a correction; the flag in the database stays 3. When the correction is finished this line is replaced by 12350;duzeltme;1;tamam;Kimlik bilgisi KBS sitesinde düzeltildi., and then the flag is set to 1.
    • 12352 → The flag in the database is set to 1; in addition, because the uyari column says adfarkli, the user is told to check the ID number (section 5).
    After changing the flags, the PMS rewrites kbs_bekleyen.txt (step 1). Records with flag 2 thus drop out of the file.

3kbs_bekleyen.txt

The guest file written by the PMS.

kbs_bekleyen.txt
kayitno;bayrak;durum;oda;ad;soyad;kimlikno;uyruk;cinsiyet;dogumtarihi;dogumyeri;giris;cikis;plaka;telefon;eskikimlikno
12345;0;icerde;105;Ayşe;Yılmaz;12345678901;TC;K;14.03.1985;İzmir;23.10.2026 14:05;;35ABC123;05321234567;
12346;1;cikti;107;John;Smith;C01X00T47;GBR;E;02.07.1979;London;21.10.2026 16:30;23.10.2026 11:10;;;
12347;1;iptal;110;Mehmet;Kaya;98765432109;TC;E;01.01.1990;Aydın;23.10.2026 09:00;;;;
12348;1;icerde;108;Elif;Demir;23456789012;TC;K;05.09.1992;Bursa;22.10.2026 18:20;;;;
12349;0;icerde;112;Anna;Müller;C7F2K91LX;DEU;;11.05.1988;Berlin;23.10.2026 13:40;;;;
12350;3;icerde;114;Mehmet;Öztürk;34567890123;TC;E;20.06.1979;Denizli;22.10.2026 20:15;;;;34567890132
12351;0;icerde;116;;;45678901234;TC;;;;23.10.2026 14:02;;;;
12352;0;icerde;118;Ali;Koç;56789012345;TC;E;03.04.1980;Ankara;23.10.2026 14:10;;;;
12354;0;cikti;122;Can;Şahin;78901234567;TC;E;07.07.1987;İstanbul;22.10.2026 21:30;23.10.2026 10:30;;;
#SON

Hover over a line (tap on a phone) to see what the case is.

Columns

ColumnWhat is writtenExample
kayitnoNumber of the guest record in the database (primary key). Different for every record, never changes afterwards. Not the room or reservation number.12345
bayrakFlag: 0 to be reported · 1 check-in reported · 2 check-out reported · 3 correction to be reported0
durumStatus: icerde in the hotel · cikti checked out · iptal deleted recordicerde
odaRoom number. Letters and digits only, at most 10 characters.105
ad · soyadFirst name · last name. May be left empty for Turkish guests (note below).Ayşe
kimliknoTurkish ID number for Turkish guests; passport or ID document number for foreign guests.12345678901
uyrukNationality: TC for Turkish guests. For foreign guests the 3-letter country code (ISO 3166-1 alpha-3, for example Germany DEU).GBR
cinsiyetGender: E male or K femaleK
dogumtarihiDate of birth: day.month.year14.03.1985
dogumyeriPlace of birth.İzmir
girisCheck-in time: day.month.year hour:minute23.10.2026 14:05
cikisCheck-out time, same format. Left empty if the guest has not checked out; the planned check-out date is not written.23.10.2026 11:10
plakaVehicle licence plate, no spaces.35ABC123
telefonPhone, digits only.05321234567
eskikimliknoOnly when the ID number was corrected (flag 3): the number currently registered on the KBS website.12345678910

Which details are mandatory

Without the details below the KBS website does not accept the guest; KBS Bridge does not send and writes the reason to kbs_sonuc.txt.

GuestPolice (EGM)Gendarmerie
TurkishTurkish ID number, roomTurkish ID number, room
ForeignDocument number, first name, last name, place of birth, date of birth, gender, nationality, roomDocument number, first name, last name, date of birth, gender, nationality, room
First and last name of Turkish guests The KBS website finds the person by the ID number; first and last name are not mandatory. If they are sent empty, KBS Bridge writes the masked name shown by the KBS website (for example AY*****) to the ad and soyad columns of kbs_sonuc.txt. If they are written, KBS Bridge compares them with the name on the KBS website and warns if they do not match (section 5).

Rules

  • UTF-8 (with or without BOM), semicolon separator, line endings CRLF or LF. The first line is exactly:
    kayitno;bayrak;durum;oda;ad;soyad;kimlikno;uyruk;cinsiyet;dogumtarihi;dogumyeri;giris;cikis;plaka;telefon;eskikimlikno
    The last line is #SON.
  • Values must not contain a semicolon or a line break (example: Ay;han).
  • The file is first written in the same folder under a temporary name specific to the computer (for example kbs_bekleyen_RESEPSIYON1.tmp), then moved over kbs_bekleyen.txt.
  • Column names, values (icerde, tamam, #SON …) and the messages in kbs_sonuc.txt are in Turkish and stay as they are. The PMS shows the messages to the user as they are; the reception staff reading them is Turkish.

4kbs_sonuc.txt

The result file written by KBS Bridge. The PMS only reads it.

kbs_sonuc.txt
kayitno;islem;bayrak;sonuc;mesaj;zaman;ad;soyad;uyari
12345;giris;1;tamam;KBS sitesine giriş bildirildi.;23.10.2026 14:07;;;
12346;cikis;2;tamam;KBS sitesine çıkış bildirildi.;23.10.2026 14:07;;;
12347;cikis;2;tamam;KBS sitesine çıkış bildirildi.;23.10.2026 14:07;;;
12348;oda;1;tamam;KBS sitesinde oda 104 → 108;23.10.2026 14:07;;;
12349;giris;0;hata;eksik bilgi: cinsiyet;23.10.2026 14:07;;;
12350;duzeltme;3;tamam;Eski kayıt KBS sitesinden çıkarıldı. Doğru bilgilerle giriş yapılacak.;23.10.2026 14:07;;;
12351;giris;1;tamam;KBS sitesine giriş bildirildi.;23.10.2026 14:07;ME*****;KA*****;
12352;giris;1;tamam;KBS sitesine giriş bildirildi. Yazılan ad ile KBS sitesindeki ad farklı görünüyor (KBS sitesinde: HA***** YI*****). Kimlik numarasının kontrol edilmesi gerekebilir.;23.10.2026 14:12;;;adfarkli
12354;giris;1;tamam;KBS sitesine giriş bildirildi.;23.10.2026 14:07;;;
12354;cikis;2;tamam;KBS sitesine çıkış bildirildi.;23.10.2026 14:07;;;
#SON

Hover over a line (tap on a phone) to see what the PMS does.

The example lines above are the result of the kbs_bekleyen.txt example in section 3 at a hotel under the Police. At a hotel under the Gendarmerie the columns and values are the same; only the mesaj texts differ (for example "Jandarma'ya giriş bildirildi.").

Rules

  • UTF-8, semicolon separator. The first line is the header line above, the last line is #SON. A file whose last line is not #SON is not processed that time; it is tried again on the next read.
  • The PMS opens the file for reading only, reads it and closes it at once. It does not delete, change or clean up lines.
  • Lines are deleted by KBS Bridge: tamam lines once the PMS has updated the flag and written kbs_bekleyen.txt with the new flag; a hata line when the record is fixed or drops out of the file; an oda line after 24 hours.

5Outages and special cases

This section describes what KBS Bridge does; nothing extra is required from the PMS. Results still arrive in kbs_sonuc.txt and are handled according to the table in section 2.

Synchronising with the KBS website

When the KBS website is down or the computer running KBS Bridge stays off, the reception can register and check out guests on the KBS website by hand. For this reason KBS Bridge compares every record with the record on the KBS website before sending it. It does not repeat what was done by hand and reports what is missing. In this way identity reporting is done in line with the regulations and by the most accurate method possible. This comparison relies on kbs_bekleyen.txt containing, every time, all records whose flag is 0, 1 or 3; a record that is not in the file cannot be compared. ↩ Back

In the PMSOn the KBS websiteWhat KBS Bridge doeskbs_sonuc.txt
Not reported (0), in the hotelRegistered (entered by hand)Does not send the check-in again.giris;1;tamam (mesaj: was already registered on the KBS website)
Not reported (0), in the hotelNot thereReports the check-in.giris;1;tamam
Not reported (0), checked outRegistered (entered by hand)Does not send the check-in, reports the check-out.giris;1;tamam (already registered), then cikis;2;tamam
Not reported (0), checked outNot there; the check-in can still be sent with the correct dateAsks the user (below). On No, sends the check-in and the check-out.While waiting for the answer giris;0;hata (mesaj: waiting for an answer in KBS Bridge)
Not reported (0), checked outNot there; the check-in can no longer be sent with the correct dateDoes not report the guest; lets the PMS close the record.cikis;2;tamam (mesaj: the reason)
Reported (1), in the hotelRegistered, different roomUpdates the room on the KBS website to the one in the PMS.oda;1;tamam
Reported (1), in the hotelNot there (checked out or deleted by hand)Sends nothing, warns (below).oda error line (mesaj: not found on the KBS website)
Reported (1), checked outRegisteredReports the check-out.cikis;2;tamam
Reported (1), checked outNot there (checked out by hand)Does not send the check-out again.cikis;2;tamam (mesaj: already appeared as checked out on the KBS website)

Correct date

Police: the check-in day is today. Gendarmerie: the check-in time is not older than 72 hours.

Cases left to the user

CaseWhat KBS Bridge doesWhat the user does
Guest who checked out before the check-in was reported, is not on the KBS website, and whose check-in can still be sent with the correct dateAsks the user in its own window. If no answer is given, it does not report when the time runs out; cikis;2;tamam.Yes (I registered and checked out the guest by hand) → KBS Bridge does not report the guest, writes cikis;2;tamam to kbs_sonuc.txt. No → reports first the check-in, then the check-out; writes first giris;1;tamam, then cikis;2;tamam.
More than one record on the KBS website matches the guest and it is not certain which oneDoes not send and does not close, so as not to create a duplicate record; writes an error line. Checks again every round.Checks the record on the KBS website by hand.
Reported (1) and in the hotel in the PMS, but not on the KBS websiteSends nothing; writes an oda;1;hata line, mesaj: "Girişi bildirilmiş görünüyor ama KBS sitesindeki konaklayanlar listesinde bulunamadı (KBS sitesinden elle silinmiş olabilir)." — in English: appears to have been reported but was not found in the KBS website's list of guests staying (may have been deleted from the KBS website by hand). The PMS shows this message to the user.If the guest was removed by mistake or is to be reported again, sets the flag to 0 in the PMS; KBS Bridge reports the check-in again.
The name written does not match the name on the KBS website (adfarkli)Registers the guest, warns.Checks the ID number. If it is wrong, corrects it; KBS Bridge removes the wrong record and reports the right person.
The KBS website rejected the recordDoes not send again unless the record changes.Fixes the record.
How a wrong ID number is caught For Turkish guests only the ID number goes to the KBS website; if one digit is wrong, somebody else gets registered. If first and last name are written, KBS Bridge compares them with the masked name shown by the KBS website (for example ME*****) and, if they do not match, writes adfarkli to the uyari column.

6Status and Send now

These two files are optional. If it wishes, the PMS can show the status of KBS Bridge on its own screen and offer the user a "Send now" button.

kbs_durum.txt — whether KBS Bridge is running

KBS Bridge writes this file once a minute. The PMS can look at it and show the reception "KBS Bridge is running" or "not running"; for example, if the computer running KBS Bridge has been switched off, the reception sees it in the PMS.

kbs_durum.txt
zaman;surum;oturum;bekleyengiris;bekleyencikis;sontur;hata
24.10.2026 14:08:00;2026.10.24.1;acik;0;1;24.10.2026 14:07:12;
#SON
ColumnMeaning
zamanWhen the file was written: day.month.year hour:minute:second. If older than 3 minutes, KBS Bridge is not running.
surumVersion of KBS Bridge.
oturumacik logged in to the KBS website · kapali not logged in · otp Police only: waiting for the EGM SEC code (a one-time code generated by the EGM SEC app on the phone, like Microsoft Authenticator); the code is entered in KBS Bridge's window.
bekleyengiris · bekleyencikisNumber of check-ins and check-outs waiting to be sent.
sonturTime of the last send, same format.
hataEmpty means no problem. If not empty, KBS Bridge's problem is written here.

kbs_simdi.txt — Send now

KBS Bridge sends every few minutes. For a user who wants to send without waiting, the PMS can add a "Send now" button. The button leaves an empty file named kbs_simdi.txt in the folder; KBS Bridge sees the file within a minute, deletes it and starts sending.

7Testing (Test Environment)

Whether the changes made in the PMS for KBS Bridge work correctly can be tested with the KBS Bridge "Test Environment". The Test Environment takes the place of the KBS website; it answers as if the guest's check-in, check-out and room change were being sent to the KBS website, but nothing goes to the KBS website. KBS Bridge is downloaded from the link at the end of this section; no KBS user name or password is needed.

How to test

  1. Download KBS Bridge, unzip and run it.
  2. In the Ayarlar (Settings) window, select the folder where the PMS writes kbs_bekleyen.txt. Klasörü dene (Test folder) shows that the file is read.
  3. In KBS Bridge, open the Test Ortamı › Rehber ve rapor (Test Environment › Guide and report) tab. The 11 steps there are performed in the PMS. KBS Bridge sees from the files that each step was done correctly and puts a ✓ next to it.
  4. When the steps are finished, save the report with Raporu kaydet (Save report) and e-mail it to AKÇAM.

Rules

  • Testing is done with the PMS's test database.
  • The files and rules are exactly those in this document. Nothing separate is written into the PMS for testing.
  • Every mesaj in kbs_sonuc.txt starts with TEST — . The PMS shows the message as it is.
  • The report file is sent as it is; it is not opened and re-saved in another program.

Test IDs

The Test Environment accepts any ID number; the number does not have to belong to a real person. Error and warning cases are tested with these numbers:

NumberWhat the Test Environment doeskbs_sonuc.txt
11111111110Rejects the guest.giris;0;hata
22222222220Registers the guest, but shows a different name.giris;1;tamam, adfarkli in the uyari column
Foreign guest whose document number starts with TESTRED (for example TESTRED123)Rejects the guest.giris;0;hata

Timing

So that the test does not take long, the times in the Test Environment are short. KBS Bridge looks at kbs_bekleyen.txt every 15 seconds.

RuleOn the Police KBS websiteIn the Test Environment
Wait between two operations
After a guest is registered or their room is changed, a new room change or the check-out of the same guest can only be sent after this time has passed. KBS Bridge waits this time itself.
5 minutes30 seconds

Download

⬇ KBS Bridge for testing KbsKopru.zip · version 2026.10.26.1 · 41.5 MB

The zip contains a single program file (KbsKopru.exe); there is no installer. Runs on Windows 10 and Windows 11. If Windows shows a warning on first start, choose More info › Run anyway.

🛡 VirusTotal: none of 66 antivirus engines found a threat · 26 October 2026 · view report · SHA-256 aadc1b52ac1440df07423abf815909455106a30f662ae4d4f86a320d35935361