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.
1How it works
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.
| File | Written by | Purpose |
|---|---|---|
kbs_bekleyen.txt | PMS | Guests (section 3) |
kbs_sonuc.txt | KBS Bridge | Result of each record (section 4) |
kbs_durum.txt | KBS Bridge | Whether KBS Bridge is running — optional (section 6) |
kbs_simdi.txt | PMS | "Send now" request — optional (section 6) |
kbs_kopru.kilit | KBS Bridge | KBS 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.
- One function:
KbsBekleyenYaz()→ select from the database all guests whose flag is0,1or3(records with flag2and guests still in reservation are not written), write the lines, save under a temporary name, move overkbs_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 thetamamlines to the database, show the message from thehatalines to the user; then callKbsBekleyenYaz().
| Request | Line written | Result seen |
|---|---|---|
| Register the guest on the KBS website | flag 0 · status icerde | giris;1;tamam |
| Report the check-out | flag 1 · status cikti · check-out time | cikis;2;tamam |
| Report an already reported guest again | flag set to 0 | giris;1;tamam |
| Change the room | flag 1 · new room number | oda;1;tamam |
| Correct identity details (name, date of birth etc.) | flag 3 · status icerde | First duzeltme;3;tamam, then duzeltme;1;tamam |
| Correct the ID number | flag 3 · status icerde · old number in the eskikimlikno column | First duzeltme;3;tamam, then duzeltme;1;tamam |
| Delete a reported guest's record | flag 1 · status iptal | cikis;2;tamam |
| Delete the record of a guest whose correction is not finished | flag 3 · status iptal | duzeltme;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
- 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,1or3(including those whose status has not changed).
Records with flag2and 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. - 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. - 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 is0;1in the line is higher, the flag in the database is set to1.12346→ Flag in the database is1;2in the line is higher, the flag in the database is set to2.12349→hata; the flag in the database does not change,mesajis shown to the user.12350→ First step of a correction; the flag in the database stays3. When the correction is finished this line is replaced by12350;duzeltme;1;tamam;Kimlik bilgisi KBS sitesinde düzeltildi., and then the flag is set to1.12352→ The flag in the database is set to1; in addition, because theuyaricolumn saysadfarkli, the user is told to check the ID number (section 5).
kbs_bekleyen.txt(step 1). Records with flag2thus drop out of the file.
3kbs_bekleyen.txt
The guest file written by the PMS.
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
| Column | What is written | Example |
|---|---|---|
kayitno | Number of the guest record in the database (primary key). Different for every record, never changes afterwards. Not the room or reservation number. | 12345 |
bayrak | Flag: 0 to be reported · 1 check-in reported · 2 check-out reported · 3 correction to be reported | 0 |
durum | Status: icerde in the hotel · cikti checked out · iptal deleted record | icerde |
oda | Room number. Letters and digits only, at most 10 characters. | 105 |
ad · soyad | First name · last name. May be left empty for Turkish guests (note below). | Ayşe |
kimlikno | Turkish ID number for Turkish guests; passport or ID document number for foreign guests. | 12345678901 |
uyruk | Nationality: TC for Turkish guests. For foreign guests the 3-letter country code (ISO 3166-1 alpha-3, for example Germany DEU). | GBR |
cinsiyet | Gender: E male or K female | K |
dogumtarihi | Date of birth: day.month.year | 14.03.1985 |
dogumyeri | Place of birth. | İzmir |
giris | Check-in time: day.month.year hour:minute | 23.10.2026 14:05 |
cikis | Check-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 |
plaka | Vehicle licence plate, no spaces. | 35ABC123 |
telefon | Phone, digits only. | 05321234567 |
eskikimlikno | Only 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.
| Guest | Police (EGM) | Gendarmerie |
|---|---|---|
| Turkish | Turkish ID number, room | Turkish ID number, room |
| Foreign | Document number, first name, last name, place of birth, date of birth, gender, nationality, room | Document number, first name, last name, date of birth, gender, nationality, room |
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 overkbs_bekleyen.txt. - Column names, values (
icerde,tamam,#SON…) and the messages inkbs_sonuc.txtare 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.
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#SONis 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:
tamamlines once the PMS has updated the flag and writtenkbs_bekleyen.txtwith the new flag; ahataline when the record is fixed or drops out of the file; anodaline 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 PMS | On the KBS website | What KBS Bridge does | kbs_sonuc.txt |
|---|---|---|---|
Not reported (0), in the hotel | Registered (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 hotel | Not there | Reports the check-in. | giris;1;tamam |
Not reported (0), checked out | Registered (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 out | Not there; the check-in can still be sent with the correct date | Asks 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 out | Not there; the check-in can no longer be sent with the correct date | Does not report the guest; lets the PMS close the record. | cikis;2;tamam (mesaj: the reason) |
Reported (1), in the hotel | Registered, different room | Updates the room on the KBS website to the one in the PMS. | oda;1;tamam |
Reported (1), in the hotel | Not there (checked out or deleted by hand) | Sends nothing, warns (below). | oda error line (mesaj: not found on the KBS website) |
Reported (1), checked out | Registered | Reports the check-out. | cikis;2;tamam |
Reported (1), checked out | Not 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
| Case | What KBS Bridge does | What 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 date | Asks 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 one | Does 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 website | Sends 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 record | Does not send again unless the record changes. | Fixes the record. |
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.
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
| Column | Meaning |
|---|---|
zaman | When the file was written: day.month.year hour:minute:second. If older than 3 minutes, KBS Bridge is not running. |
surum | Version of KBS Bridge. |
oturum | acik 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 · bekleyencikis | Number of check-ins and check-outs waiting to be sent. |
sontur | Time of the last send, same format. |
hata | Empty 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
- Download KBS Bridge, unzip and run it.
- 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. - 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.
- 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
mesajinkbs_sonuc.txtstarts withTEST —. 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:
| Number | What the Test Environment does | kbs_sonuc.txt |
|---|---|---|
11111111110 | Rejects the guest. | giris;0;hata |
22222222220 | Registers 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.
| Rule | On the Police KBS website | In 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 minutes | 30 seconds |
Download
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.
aadc1b52ac1440df07423abf815909455106a30f662ae4d4f86a320d35935361