HORES HTTP API / Web API¶
General information¶
HORES Web api interface acts as HTTP server. Communication is done via HTTPS protocol. Unencrypted connection is available only for testing purposes. SSL is used only to encrypt communication, no client authentication based on SSL certificates is currently available.
Data are transfered in JSON format (you must use „Content-Type: application/json“ header for POST requests!).
Only methods corresponding to actions allowed by user-rights of user, who’s credentials are used to access API, are allowed.
Authentication is done via HTTP Authorization header. Depending on configuration, two methods of authentication are available:
HTTP Basic authentication (RFC 2617)¶
Used for testing and legacy purpose. Login and password are checked against HORES users database. User must have „API access“ enabled to use this login method.
Varování
Do not use Basic authentication for production implementation.
Permanent token¶
Can be defined for each user in HORES and allows for non-interactive authentication of API operations in the name of that user. Use „Authorization“ header with „Token“ keyword such as:
GET /api/rooms HTTP/1.1
Host: example.com
Accept: application/json
Authorization: Token 65sad4f64df6sd6f4sdffassdfa
Data format¶
Request format¶
No common data-structure
Response format¶
Returned data have common JSON structure:
{
"result": 0,
"error": null,
"warning": null,
"data": null
}
result: result code, 0 for success, non-zero for errors
error: optional error message (only when result != 0)
warning: optional warning message
data: returned data. May be empty or not present when no results found or when calling method without return value
Sample success response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"result": 0,
"data":
[
{
"id": 120,
"code": "118",
"room_type_id": 2,
"description": "DBL",
"floor": 0,
"beds": 2,
"room_service_code": null,
"phone_number": 118,
"attr_1": null,
"attr_2": null,
"floor_code": "1",
"building": null,
"clean": false,
"inspection": true,
"used": true,
"ord": 26
}
]
}
Sample error response:
HTTP/1.1 404 Not Found
Vary: Accept
Content-Type: application/json
{
"result": 1,
"error": "Guest account not found!",
"data": null
}
API description¶
- GET /api/hores_info¶
Version and build info about running instance
- GET /api/rooms¶
List of existing rooms
Example response:
[ { "id": 120, "code": "118", "room_type_id": 2, "description": "DBL", "floor": 0, "beds": 2, "room_service_code": null, "phone_number": 118, "attr_1": null, "attr_2": null, "floor_code": "1", "building": null, "clean": false, "inspection": true, "used": true, "ord": 26 } ]
- Response JSON Object:
id (int) – Unique identifier
code (string) – Code
room_type_id (int) – Type
description (string) – Description
floor (int) – Floor
beds (int) – Number of beds
room_service_code (string) – Maid’s code
phone_number (string) – Phone number
attr_1 (string) – Attribute 1
attr_2 (string) – Attribute 2
floor_code (string) – Floor code
building (string) – Building code
clean (boolean) – Cleaned
inspection (boolean) – Inspection required
used (boolean) – Used
ord (int) – Display order number
- GET /api/roomTypes¶
List of existing room types
Example response:
[ { "id": 10, "code": "DBL", "description": "Double", "beds": 2, "rooms_cnt": 20, "rooms_total": 30, "pricelist_code": "DB", "technical": false, "multi": false, "ord": 1, "translation": { "cs": null, "de": null, "en": null } } ]
- Response JSON Object:
id (int) – Unique identifier
code (string) – Code
description (string) – Room type description
beds (int) – Standard number of beds for room type
rooms_cnt (int) – Internal use
rooms_total (int) – Internal use
pricelist_code (string) – Internal use
technical (boolean) – True for technical rooms
multi (boolean) – Internal use
ord (int) – Display order number
translation (dict) – Dictionary of available translations, may be empty or null
- GET /api/rasters¶
List of existing rasters
Example response:
[ { "id": 2, "code": "AR", "name": "Aranzma", "type": 3, "accounting_group": 5, "cash_register_code": 0, "variant": 1, "vat": "0.0", "promote_to_cash": false, "print_description": false, "translation": { "cs": null, "de": null, "en": null }, "ord": 2, "allow_discount": true, "exclude_from_income": false } ]
- Response JSON Object:
id (int) – Unique identifier
code (string) – Raster code
name (string) – Raster name
type (int) – Raster type: 1 = Accommodation, 2 = F&B, 3 = Other
variant (int) – Raster variant: 1 = revenue, 2 = prepayment, 3 = other. A variant is valid only for type = 3, rasters with type = 1 or 2 have no variants (variant = 0)
accounting_group (int) – Accounting group
cash_register_code (int) – Used for statistical/internal purpose
variant – Raster variant: 1 = revenue, 2 = prepayment, 3 = other. A variant is valid only for type = 3, rasters with type = 1 or 2 have no variants (variant = 0)
vat (numeric) – VAT value in percent (e.g., 21.0)
promote_to_cash (boolean) – Project into cash
print_description (boolean) – If true, description can be printed on receipt
ord (int) – Use defined order
allow_discount (boolean) – If true, discount can be used with this raster
exclude_from_income (boolean) – If true, cass office items with this raster should not be included in certain reports
translation (dict) – Dictionary of available translations, may be empty or null
- GET /api/fandb_codes¶
List of existing fandb codes
Example response:
[ { "id": 7, "code": "LUN2", "name": "Small Buffet Lunch", "meal_category": "breakfast", "price": "12.00", "currency_id": 1, "raster_id": 3, "meal_type": "food", "ord": null, "translation": null }, ]
- Response JSON Object:
id (int) – Unique identifier
code (string) – FandB code
name (string) – FandB name
meal_category (string) – ‚breakfast‘, ‚dinner‘, ‚supper‘, ‚half_board‘, ‚full_board‘, ‚all_inclusive‘, ‚other‘
price (numeric) – Predefined unit price
currency_id (int) – Price currency
raster_id (int) – Price raster
meal_type (string) – ‚food‘, ‚beverage‘
ord (int) – Use defined order
translation (dict) – Dictionary of available translations, may be empty or null
- GET /api/fandb¶
List of fandb codes usage for specified period
- Query Parameters:
date_from (date) – Filter data from date
date_to (date) – Filter data to date
Example response:
[ { "fb_code": "SN", "fb_name": "Snídaně", "quantity": 1, "price": "50.00", "note": null, "currency_code": "EUR", "center_name": null, "isgroup": false, "title": "FBTEST", "checkin_date": "2023-06-20", "checkout_date": "2023-06-23", "rooms": "116", "source_id": 4 }, ]
- Response JSON Object:
id (int) – Unique identifier
fb_code (string) – FandB code
fb_name (string) – FandB name
quantity (int) – Meal count
price (numeric) – Unit price
note (string) – Note for given serving
currency_code (string) – Currency code
center_name (string) – Center name
isgroup (boolean) – True if fandb is part of group reservation
title (string) – guest or reservation name
checkin_date" (date) – guest checkin date
checkout_date (date) – guest checkout date
rooms (string) – Room numbers
source_id" (string) – Reservation source ID
- GET /api/pricelists¶
List of existing pricelists
Example response:
[ { "id": 6, "code": "AVP", "name": "Availpro", "description": "w ddrf", "price_calculation": 2, "accomodation_currency_id": 2, "accomodation_raster_id": 56, "breakfast_raster_id": 51, "breakfast_currency_id": 2, "breakfast_price": "50.00", "breakfast_in_accomodation": true, "breakfast_bill_separately": false, "city_fee_raster_id": 25, "city_fee_currency_id": 2, "city_fee": "0.50", "city_fee_in_accomodation": false, "city_fee_bill_separately": false, "ignore_zero_price": false, "ord": null, "raster_1_id": 3, "raster_1_price": "266.00", "raster_1_in_accomodation": false, "raster_2_id": null, "raster_2_price": "0.00", "raster_2_in_accomodation": false, "raster_3_id": null, "raster_3_price": "0.00", "raster_3_in_accomodation": false, "raster_4_id": null, "raster_4_price": "0.00", "raster_4_in_accomodation": false, "raster_5_id": null, "raster_5_price": "0.00", "raster_5_in_accomodation": false, "raster_6_id": null, "raster_6_price": "0.00", "raster_6_in_accomodation": false, "city_fee_force_guest_account": true, "deleted": false } ]
- GET /api/reservation_sources¶
List of existing reservation_sources
Example response:
[ { "id": 2, "code": "W", "name": "WEB", } ]
- Response JSON Object:
id (int) – Unique identifier
code (string) – Source code
name (string) – Source name
- GET /api/packages¶
List of existing packages. Packages can be used instead of simple prices for each date of stay. Package contains one or more raster items each with given price. When printing guest account, only package name/code is shown to guest, but internally items are stored and processed for reports/accounting exports by rasters inside package.
Optionally package may contain date-specific raster items (date_specific = true). Such items are charged to guest-account only when charge-date corresponds to rasters date_from/date_to dates. In this case, package has varying price depending on date when charged.
Example response:
[ { "id": 2, "code": "FL", "name": "Flowers", "description": "Fresh flowers in room before arrival", "currency_id": 3, "single_value": false, "include_accomodation": false, "translation": { "cs": null, "de": null, "en": null }, "ord": 2, "date_specific": true, "rasters": [ { "id": 9, "packages_id": 2, "rasters_id": 43, "price": "20.00", "date_from": "2017-10-20", "date_to": "2017-11-20" } ] } ]
- Response JSON Object:
id (int) – Unique identifier
code (string) – Package code
name (string) – Package name
description (string) – Package description
currency_id (int) – Package currency
single_value (boolean) – When true, package is charge to guest-account as single item, all raster items are kept internal. When false, package is broken to raster items when charge to guest account.
include_accomodation (boolean) – When true, accomodation price from pricelist is embedded to package when package is charged to guest-account
date_specific (boolean) – True value indicates that some raster items may have date-specific validity
ord (int) – Use defined order
translation (dict) – Dictionary of available translations, may be empty or null
rasters
- Response JSON Object:
id (int) – Unique identifier of given package-raster item
packages_id (int) – Parent package id
rasters_id (int) – ID of corresponding raster, see
GET /api/rasters
price (decimal) – Item price
date_from (date) – Item is valid/usable only from this date
date_to (date) – Item is valid/usable only until this date
- GET /api/payment_methods¶
List of available payment methods
Example response:
[ { "id": 2, "code": "C", "name": "Cred.card", "type": 2, "translation": null, "rounding": false } ]
- Response JSON Object:
id (int) – Unique identifier
code (string) – Payment method code
name (string) – Payment method name
type (int) – Type: 1 = cash, 2 = payment/credit card, 3 = foreign currency, 4 = other, 5 = invoice
rounding (boolean) – If true, total receipt payment in cash should be rounded according currency settings
translation (dict) – Dictionary of available translations, may be empty or null
- GET /api/payment_card_types¶
List of available payment card types
Example response:
[ { "id": 4, "code": "MA", "name": "Maestro", "text": null, "limit": 999999, "bonus": "0.00", "type_id": 12, "ord": 4 } ]
- Response JSON Object:
id (int) – Unique identifier
code (string) – Card type code
name (string) – Card type name
text (string) – Text
limit (int) –
bonus (numeric) – Commissions (%)
type_id (int) – Internat type representation
ord (int) – User defined order
- GET /api/currencies¶
List of available currencies
Example response:
[ { "id": 5, "code": "USD", "name": "USD", "valuta": "23.000", "deviza": "0.000", "units": 1, "note": null, "round": 0, "pricing_round": 0, "symbol": "$", "ord": null, "code_iso": "USD" } ]
- Response JSON Object:
id (int) – Unique identifier
code (string) – Currency code (used for internal identification)
name (string) – Name of currency
valuta (numeric) – Foreign currency rate
deviza (numeric) – Foreign exchange rate
units (int) – Number of units to calculate the rate
note (string) – Note
round (int) – Rounding to x decimal places
pricing_round (int) –
symbol (string) – Symbol or code printed when price is displayed or printed
ord (int) – Used defined order
code_iso (string) – ISO code of given currency (used for interoperability purposes)
- GET /api/current_accounts¶
A list of accounts of groups and guests that are accommodated. Technical rooms are ignored.
- Query Parameters:
room_code (string) – Optional, when present, only room-account and group-accounts relevant for given room_code are returned
include_disabled (string) – Optional, default False. If True, accounts with user disabled external charging flag will be included.
Example response:
{ "groups": [ { "account_id": 6371, "id": 5017, "name": "Group", "checkout_date": "2015-01-31", "checkin_date": "2015-01-28" } ], "rooms": [ { "account_id": 5953, "id": 5852, "checkout_date": "2014-11-22", "code": "401", "checkin_date": "2014-10-15", "last_name": "Brown", "first_nae": "Bill", "gdpr_consent": true, "accommodation_prepayed": false } ] }
groups
- Response JSON Object:
id (int) – Unique identifier for given checked-in group
account_id (int) – Account number
name (string) – Name of group
checkin_date (date) – Check-in date
checkout_date (date) – Check-out date
rooms
- Response JSON Object:
id (int) – Unique identifier for given checked-in room
account_id (int) – Account number
last_name (string) – Surname of main guest
first_name (string) – Name of main guest
checkin_date (date) – Check-in date
checkout_date (date) – Check-out date
code (string) – Room code (number)
gdpr_consent (boolean) – Consent with personal info processing
accommodation_prepayed (boolean) – True when accommodation is already payed in advance
- GET /api/account_for_guest/¶
Designed for systems that keep data in their database and need to check while charging if the guest has moved.
- Query Parameters:
current_guest_id (int) – Guest ID (value „id“ returned in
GET /api/current_guests
)
Example response:
{ "current_account_id": 11122 }
- Response JSON Object:
current_account_id (int) – Guest account number
- GET /api/current_guests¶
List of individual guests
- Query Parameters:
room_id (int) – Room ID (value „id“ returned in
GET /api/current_accounts
)ci_date_from (date) – Check-in date from
ci_date_to (date) – Check-out date until
include_departured (boolean) – Include already departured guests (default false)
modified_since (datetime) – Return only records modified after given date, format YYYY-MM-DD HH:MM:SS
Example response:
[ { "id": 11570, "first_name": "Gerald", "last_name": "Fryson", "guest_card_id": 10512, "res_guest_id": 5738, "res_id": 4619, "checkin_date": "2017-10-21", "checkout_date": "2017-10-23", "a_hn": null, "a_street": null, "a_town": null, "a_zip": null, "citizenship": "USA", "birth_date": "1965-01-13", "sex": null, "room": "501", "room_note": "2xDBL", "gc_note": null, "gcs_note": null, "guest_code": "O", "email": null, "departured": false, "order_email": null, "order_phone_number": null, "phone_number": null, "order_phone_number_int": null, "phone_number_int": null, "current_room_id": 6216, "gdpr_consent": true, "room_type_code": "DBL", "room_type_description": "Double", "group_name": "Fryson", "pricelist_code": "BAR", "source_code": "BOOK" }, ]
- Response JSON Object:
id (int) – Unique identifier
first_name (string) – Guest’s name
last_name (string) – Guest’s surname
guest_card_id (int) – Guest card ID (identical for repeated stays)
res_guest_id (int) – Reservation ID of a particular guest (allows to pair a specific reserved room-name with a particular guest)
res_id (int) – Reservation number
checkin_date (date) – Check-in date
checkout_date (date) – Check-out date
a_hn (string) – House number
a_street (string) – Street
a_town (string) – City
a_zip (string) – Zip code
citizenship (string) – Citizenship
birth_date (date) – Date of birth
sex (string) – Sex („M“ - male, „F“ - female, „C“ - child)
room (string) – Room number
room_note (string) – Note (applies to the whole room)
gc_note (string) – Note (refers to a particular guest in general - stored in the guest card, independent of the particular stay)
gcs_note (string) – Short note (refers to a particular guest in general - stored in the guest card, independent of the particular stay)
email (string) – Guest e-mail address
departured (boolean) – True if guest is checked-out
guest_code (string) – Guest category (business trip, holiday, etc hotel specified)
order_email (string) – Contact email filled in order-info on reservation level – same for whole reservation)
order_phone_number (string) – Contact phone number filled in order-info on reservation level – same for whole reservation)
phone_number (string) – Contact phone number for given guest-card
order_phone_number_int (string) – Number in international format if valid, else null
phone_number – Number in international format if valid, else null
current_room_id (int) – Guests staying on same room together have same current_room_id
gdpr_consent (boolean) – Consent with personal info processing
room_type_code (string) – Room type code
room_type_description (string) – Room type description (usually name)
group_name (string) – Group name if guest is part of some group
pricelist_code (string) – Code of selected pricelist
source_code (string) – Code of reservation source
- GET /api/reservation_guests¶
List of guests in reservations
- Query Parameters:
ci_date_from (date) – Check-in date from
ci_date_to (date) – Check-in date until
include_canceled (boolean) – If true, results will include canceled reservation (default false)
include_checked_in (boolean) – If true, results will include already checked-in guests (default false)
modified_since (datetime) – Return only records modified after given date, format YYYY-MM-DD HH:MM:SS
technical (boolean) – If set, return only reservations for technical/non-technical rooms
confirmed (boolean) – If set, return only confirmed/unconfirmed reservations
Example response:
[ { "id": 9035, "first_name": null, "last_name": "Abc", "guest_card_id": 831223, "res_id": 6961, "checkin_date": "2017-03-22", "checkout_date": "2017-03-25", "a_hn": null, "a_street": null, "a_town": null, "a_zip": null, "a_country": null, "citizenship": null, "birth_date": null, "sex": null, "room": "102", "rg_note": null, "res_note": null, "gc_note": null, "gcs_note": null, "guest_code": "O", "email": null, "checked_in": false, "guest_count": 2, "res_no_show": false, "canceled": false, "departured": null, "order_email": null, "order_phone_number": null, "phone_number": null, "order_phone_number_int": null, "phone_number_int": null, "gdpr_consent": true, "room_type_code": "DBL", "room_type_description": "Double", "group_name": "Abc", "pricelist_code": "BAR", "source_code": "BOOK", "header_note": "some text", "reservation_id": 8556, "r_country_code": "CZE" }, ]
- Response JSON Object:
id (int) – Reservation ID of a particular guest (allows to pair a specific reserved room-name with a particular guest, see the res_guest_id column for accommodated guests)
first_name (string) – Guest’s name
last_name (string) – Guest’s surname
guest_card_id (int) – Guest card ID (identical for repeated stays)
res_id (int) – Reservation number
checkin_date (date) – Check-in date
checkout_date (date) – Check-out date
a_hn (string) – House number
a_street (string) – Street
a_town (string) – City
a_zip (string) – Zip code
a_country (string) – Address country
citizenship (string) – Citizenship
birth_date (date) – Date of birth
sex (string) – Sex („M“ - male, „F“ - female, „C“ - child)
room (string) – Room number
rg_note (string) – Note (refers to a particular guest in given reservation – is relevant for given reservation only)
res_note (string) – Note (applies to the whole reservation)
gc_note (string) – Note (refers to a particular guest in general - stored in the guest card, independent of the particular stay)
gcs_note (string) – Short note (refers to a particular guest in general - stored in the guest card, independent of the particular stay)
guest_code (string) – Guest category (business trip, holiday, etc hotel specified)
email (string) – Guest e-mail address
checked_in (boolean) – True if guest is/was checked_in
guest_count (int) – Number of guests in reservation segment
res_no_show (boolean) – When true, reservation was canceled as no-show. That means, at least one room did not arrived.
canceled (boolean) – True when reservation-row was canceled
departured (boolean) – True when there is link to departured checked-in guest (see
GET /api/current_guests
)order_email (string) – Contact email filled in order-info on reservation level – same for whole reservation)
order_phone_number (string) – Contact phone number filled in order-info on reservation level – same for whole reservation)
phone_number (string) – Contact phone number for given guest-card
order_phone_number_int (string) – Number in international format if valid, else null
phone_number – Number in international format if valid, else null
gdpr_consent (boolean) – Consent with personal info processing
room_type_code (string) – Room type code
room_type_description (string) – Room type description (usually name)
group_name (string) – Reservation name
pricelist_code (string) – Code of selected pricelist
source_code (string) – Code of reservation source
header_note (string) – Special reservation note
reservation_id (int) – Reservation row ID
r_country_code (string) – Reservation country code
- GET /api/check_card¶
If the hotel uses HORES lock cards, a specific room can be identified by reading the card. The lock card identifier is an integer type written in the first usable trace or the first usable field on the card or by card serial number. This function is not supported on all connected lock systems/card readers!
- Query Parameters:
check_id (int) – Card ID from the card (written by PMS or other system)
serial_number (string) – Card serial number (identificator of given physical card, non-editable)
Verification was successful:
Example response:
{ "result": 0, "room_id": 4232, "account_id": 5996, "room_code": "322" }
Verification failed:
Example response:
{ "result":3, "message":"Card validity expired" }
- Response JSON Object:
result (int) – 0 - Verification was OK. In this case, room_id and room_code are present and filled in. If the result is nonzero, the message contains more information and room_id and room_code are missing. 1 - Card ID is not in the database 2 - Date and time of the card validity expired 3 - Card expired or card has been cancelled (there is a newer valid card for the selected room) 4 - The lock system module is not installed, the card cannot be verified 5 - Room is not accommodated
room_id (int) – Room ID which can be used to get a list of guests in the room using
GET /api/current_guests
account_id (int) – Account number for the selected room
room_code (string) – Room code
message (string) – Report in case of error
- GET /api/lock_cards_numbers¶
List of valid card serial numbers for currently occupied rooms. This method can by used to offline match cards to HORES rooms/guests by external system.
!!! Warning, sending out lock-system cards serial numbers may be sensitive and pottentiall security risk, depending on lock-system in hotel and it’s configuration. This method must be enabled by special runtime parameter –webapi-enable-lock-card-numbers and should be used only after consultation with given lock-system provider.
Example response:
{ "result": 0, "data": [ { "current_account_id": 6845, "room_id": 301, "room_code": "ONE", "serial_number": "12345687", "valid_from": "2021-05-28 14:00:00", "valid_to": "2021-07-16 12:00:00" }, { "current_account_id": 6845, "room_id": 301, "room_code": "ONE", "serial_number": "9898965456", "valid_from": "2021-05-28 14:00:00", "valid_to": "2021-07-16 12:00:00" } ] }
- POST /api/charge_account¶
Charging the sent items to a guest/group account
Example request:
{ "account_id": 5696, "guest_id": 5899, "items": [ { "price": "200.00", "raster_id": 5, "currency_id": 2, "description": "Soup", "receipt_number": "R01225214", "unit_price": "100.00", "units": 2, "vat": "11.0", "item_identification_code": "XYZ5566" } ] }
- Request JSON Object:
account_id (int) – Account number that the items should be charged to (returned by
GET /api/check_card
orGET /api/current_accounts
)guest_id (int) – Optional, returned by
GET /api/current_guests
. If specified, the items will be charged to a particular guest.price (numeric) – Total amount
raster_id (int) – Raster ID (returned by
GET /api/rasters
)currency_id (int) – Currency ID (returned by
GET /api/currencies
)description (string) – Item description (may be blank)
receipt_number (string) – Receipt number (may be blank)
unit_price (numeric) – Unit price - required only if units are filled in. If used, the multiple of unit price and number of units must match the total price.
units (int) – Number of units - required only with unit_price, see unit_price
vat (numeric) – VAT in %
item_identification_code (string) – Product ID code (for example, for warehousing)
inventory (int) – 0 – no inventory movement, 1 – item should be removed from inventory, -1 – cancel, item should be returned to inventory
Example response:
Only standard result structure with no/empty data is returned, result 0 when success:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "result": 0, }
- POST /api/transfer_cash¶
Transferring revenues to HORES. After transferring, HORES can display, check, and convert the entered items into the cash register items („Modules“ -> „Cash register system“ -> „Revenue transfers“). In one request, it is possible to enter revenues from multiple cash registers, data is passed in the form of a field of records of the structure below.
Example request:
[ { "cash_register_code": "Cash register 1", "tax_date": "2024-03-12", "items": [ { "price": "200.00", "raster_id": 5, "currency_id": 2, "payment_method_id": 2, "note": "Wine", "vat_price": "42.00", "vat": "20.0", "tax_date": "2024-01-02", "default_currency_price": "200.00", "exchange_rate": "1.00", "receipt_number": "R0122512014", "credit_card_type_id": 3, "credit_card_number": "1564xxxx5899" } ] } ]
- Request JSON Object:
cash_register_code (string) – The cash register code/name may contain any string. It is entered in the item notes and serves to identify the batch when processed in HORES.
tax_date (numeric) – Date of taxable supply in YYYY-MM-DD format
items (list) –
price (numeric) – Total amount
raster_id (int) – Raster ID (returned by
GET /api/rasters
)payment_method_id (int) – Payment method ID (returned by
GET /api/payment_methods
)currency_id (int) – Currency ID (returned by
GET /api/currencies
)note (string) – Item description (may be blank)
vat_price (numeric) – Calculated VAT amount
vat (numeric) – VAT in percentage (if not set, will be automatically filled based on raster_id)
tax_date – Date of taxable supply
default_currency_price (numeric) – Amount in default (local) currency
exchange_rate (numeric) – Exchange rate (not required, if not specified, calculated from price and default_currency_price)
receipt_number (string) – Optional, document (receipt) number
credit_card_type (int) – Required for credit card payment, credit card type ID (returned by
GET /api/payment_card_types
)credit_card_number (string) – Optional, credit card number (in any format, may be crossed or otherwise treated)
Example response:
Only standard result structure with no/empty data is returned, result 0 when success:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "result": 0, }
- GET /api/raster_movements¶
Overview of raster movements in accounts and in cash register items. Parameters aid or cid determine the last processed ID - the query returns the values from the respective tables, where id > aid for accounts, or id > cid for cash register items. Currently, you cannot select the change date, the linked system must remember the last processed item’s id.
Only records that have passed through the final accounts are returned.
The server response is a two-dimensional field of values (because of the amount of data being used, the dictionary is not used as in the previous cases, as the number of items can really be high)
- Query Parameters:
aid (int) – Last account item id
cid (int) – Last cass office item id
include_no_final_account (bool) – default False, if True, data will include items not processed by final account
filter_rasters (str) – string of raster ids to include in results (use numbers separated by comma, for example: „3,4,12,35“)
Example response:
[ ["a", 40001, 25, "50.0000000", 1, "2015-06-02T00:07:26.647987+02:00", null, "50.0000000", 1, 0, "2331123", 0, 1, "50.0000000", 332], ["a", 40002, 25, "50.0000000", 1, "2015-06-02T00:07:26.647987+02:00", null, "50.0000000", 1, 0, "2331123", 0, 1, "50.0000000", 332], ["a", 40003, 51, "400.0000000", 1, "2015-06-02T00:07:26.647987+02:00", null, "200.0000000", 2, 0, "2331123", 0, 1, "50.0000000", 332], ["a", 40005, 66, "-18.1620051", 2, "2015-06-02T00:07:26.647987+02:00", null, "-18.1620051", 1, 0, "2331123", 0, -1, "50.0000000", 332] ]
Position
Type
Value
0
char
Item type - „a“ = account item, „c“ = cash register item
1
int
Item ID
2
int
Raster ID
3
numeric
Total price
4
int
Change ID
5
datetime
The date of the item creation (for cancelled and modified items it may be misleading as it is sometimes copied from the source item. The solution is planned, but not ready yet)
6
string
Document for account items, note for cash register items
7
numeric
Unit price
8
int
Quantity
9
int
The parent’s item ID for editing (cancellation, change, division …)
10
string
Item identification - stock code. For complementary sales products, the stock code is set in the complementary sale.
11
int
Payment method ID for cash register items („c“)
12
int
Stock status coefficient (1 - addition, -1 - decrease (cancellation))
13
numeric
Total amount converted to the default currency. For paid items, the amount is at the payment rate, for the unpaid it is at the current rate at the time of the query.
14
int
Final accounts ID
15
int
Current account ID for account items (null for cass-office items)
- GET /api/product_categories¶
List of available product categories
Example response:
[ { "id": 3, "title": "Minibar" }, { "id": 5, "title": "Tickets" } ]
- Response JSON Object:
id (int) – Unique identifier
title (string) – Category title
- POST /api/product_categories¶
Creating/updating categories in complementary sales (the request body contains a list of categories defined by the structure described below).
Example request:
[ { "id": 3, "title": "Minibar" }, { "id": 5, "title": "Tickets" } ]
- Request JSON Object:
id (int) – Unique identifier (when empty, new category will be created)
title (string) – Category title
Example response:
Only standard result structure with no/empty data is returned, result 0 when success:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "result": 0, }
- POST /api/products¶
Creating/updating products in complementary sales (the request body contains a list of products defined by the structure described below).
Example request:
[ { "id": 1, "title": "Wine", "unit": "ks", "raster_id": 8, "purchase_price": "11.79", "selling_price": "200.00", "product_code": "", "category_id": 1, "stock": 3, "service": false, "selling_price1": "2.00", "selling_price2": null, "catalogue_number": "abc" } ]
- Request JSON Object:
id (int) – Unique identifier
title (string) – Name of product
unit (string) – Name of quantity unit (e.g. pcs.)
raster_id (int) – Corresponding raster ID
purchase_price (numeric) – Purchase price
selling_price (numeric) – Selling price
product_code (string) – Product code
category_id (int) – Complementary sales category ID
stock (int) – Items in stock
service (boolean) – True when it comes to a service (ignoring the stock quantity)
selling_price1 (numeric) – Selling price in second currency
selling_price2 (numeric) – Selling price in third currency
catalogue_number (string) – Catalogue number
Example response:
Only standard result structure with no/empty data is returned, result 0 when success:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "result": 0, }
- GET /api/account_items¶
Unpayed account items on given account
- Query Parameters:
current_account_id (int) – Mandatory, id (number) of account to query
lang (string) – Language code - optional, if it is entered and there are translations available in the system, the item names will be sent in the selected language (e.g. „en“, „cs“, „sk“ …). If not specified, the default language will be used.
Example response:
[ { "id": 2566, "code": "AC", "name": "Accomodation", "currency": "EUR", "price": "250.00", "amount": 1, "checkin_date": "2016-08-05", "description": null } ]
- Response JSON Object:
id (int) – Unique identifier
code (string) – Raster or package code
name (string) – Raster or package name
currency (string) – Currency code
price (numeric) – Total amount
amount (int) – Quantity
date (date) – Item date
description (string) – Description if available
- POST /api/room_state¶
Set room state
Example request:
{ "room_code": "201", "room_clean": true }
- Request JSON Object:
room_code (string) – Room code
room_clean (boolean) – State specifying if cleaned (true/1 = cleaned, false/0 = not cleaned)
room_state (string) – Special room state, current valid values are: clean, in_progress, unclean
Example response:
Only standard result structure with no/empty data is returned, result 0 when success:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "result": 0, }
- GET /api/traces_targets¶
List of existing traces targets
Example response:
[ { "id": 3, "code": "S", "name": "Service" } ]
- Response JSON Object:
id (int) – Unique identifier
code (string) – Target code
name (string) – Target name
- GET /api/traces¶
List of existing traces
- Query Parameters:
current_room_id (int) – ID of checked in room
traces_target_id (int) – Filter traces for only given traces_target_id, see /tracesTargets
action_date_from (date) – Only traces with action_date >= this value will be returned (format: YYYY-MM-DD)
reservation_group_id (int) – Reservation ID filter
room_id (int) – Room ID filter
Example response:
[ { "id": 170596, "description": "provide us a quiet room, NOT facing the road. so it is not too loud during at nights.", "action_date": "2017-05-07", "action_time": null, "traces_target_id": null, "traces_target": null, "solved": false, "solution": null, "current_room_id": null, "reservation_group_id: null, "room_id": null, "internal_data": null, "category": null } ]
- Response JSON Object:
id (int) – Unique identifier
description (string) – Trace description
action_date (date) – YYYY-MM-DD
action_time (time) – HH:MM
traces_target_id (int) – ID of target (see /tracesTargets)
traces_target (string) – Code of current target
solved (boolean) – True if trace resolved/finished
solution (string) – Solution notes/description
current_room_id (int) – ID of current-room this trace is bound to
reservation_group_id (int) – ID of reservation this trace is bound to
room_id (int) – ID of room this trace is bound to
category (string) – Category of traces from predefined enumeration
internal_data (string) – Text used by external applications for various reasons
- POST /api/traces¶
Updates or creates traces for given checked-in room
Example request:
[ { "trace_id": 170596, "current_room_id": 34, "description": "provide us a quiet room, NOT facing the road. so it is not too loud during at nights.", "action_date": "2017-05-07", "action_time": null, "traces_target_id": null, "traces_target": null, "solved": false, "solution": null, "reservation_group_id": null, "room_id": null, "internal_data": null, "category": null } ]
- Request JSON Object:
trace_id (int) – ID of single trace. If set, existing trace will be updated
current_room_id (int) – ID of single checked-in room. If trace_id is empty, new trace will be created for this room
description (string) – Trace description
action_date (date) – YYYY-MM-DD
action_time (time) – HH:MM
traces_target_id (int) – ID of target (see /tracesTargets)
traces_target (string) – Code of current target
solved (boolean) – True if trace resolved/finished
solution (string) – Solution notes/description
reservation_group_id (int) – ID of reservation this trace is bound to
room_id (int) – ID of room this trace is bound to
category (string) – Category of traces from predefined enumeration
internal_data (string) – Text used by external applications for various reasons
Example response:
Only standard result structure with no/empty data is returned, result 0 when success:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "result": 0, }
- GET /api/cm_rates_list¶
Dictionary of all rate-codes used for external reservation delivery mapping, with corresponding internal codes and guest-count
Example response:
{ "result": 0, "data": { "BB": { "hores_code": "AVP", "hores_type": "BB", "guest_count": 2 } } }Result keys are online rate-codes. For each online rate-code:
- >json int guest_count:
Number of guests for which price is calculated
- >json string hores_code:
Code of connected HORES pricelist
- >json string hores_type:
Code of connected HORES pricetype withing that pricelist
- GET /api/cm_room_types¶
Mapping table between internal room-types and channel-manager room-types
Example response:
[ { "id": 43, "room_type_id": 5, "online_room_type": "TRP", "online_sync": true, "channel_id": "hores_api" }, { "id": 40, "room_type_id": 2, "online_room_type": "DBL", "online_sync": true, "channel_id": "hores_api" } ]
- >json int id:
Unique identifier of given record
- >json int room_type_id:
Internal room-type id, see /roomTypes
- >json string online_room_type:
Room-type code used by external system
- >json boolean online_sync:
If true, given room-type should be offered via connected online system for reservations
- >json string channel_id:
Internal ID, currently not usable by connected systems
- GET /api/cm_reservations¶
List basic reservation information
- Query Parameters:
ci_date_from (date) – Check-in date from
ci_date_to (date) – Check-in date until
reservation_id (int) – Reservation id
modified_since (datetime) – Return only records modified after given date, format YYYY-MM-DD HH:MM:SS
technical (boolean) – If set, return only reservations for technical/non-technical rooms
confirmed (boolean) – If set, return only confirmed/unconfirmed reservations
Example response:
[ { "reservation_number": 170596, "name": "Reservation name", "source_code": "BOOKING", "source_id": 22, "order_email": null, "order_phone_number": null, "order_number": "6547676", "non_refundable": false, "note": "Some text informations...", "total_price": "3000.0", "currency_code": "EUR", "sale_code": null, "guest_code": null, "payment_method": "C", "discount_code": null, "loyalty_card": null, "rows": [ { "id": 855666, "date_from": "2017-01-01", "date_to": "2017-01-10", "room_type_id": 2, "room_type_code": "DBL", "room_count": 2, "guest_count": 4, "pricelist_id": 12, "pricetype_id": 32, "cm_rate_code": "BAR", "cm_room_code": "DBL", "canceled": false, "option": false, "option_date": null, "arrival_time": "14:00", "technical": false, "tentative": false, "services": [ { "id": 44, "raster_id": 3, "package_id": null, "on_room": true, "pay_once": false, "on_group": false, "price": "50.00" } ], "prices": [ { "date_from": "2017-01-01", "date_to": "2017-01-05", "price": "200.00", "package_id": null }, { "date_from": "2017-01-06", "date_to": "2017-01-09", "price": "250.00", "package_id": null } ] } ] } ]
- Response JSON Object:
reservation_number (int) – Unique identifier (reservation number)
name (string) – Reservation name (title)
source_code (string) – Booking source code
source_id (int) – Booking source internal identification
note (string) – Note/comments, free textual information field
order_email (string) – Email contact (for whole reservation)
order_phone_number (string) – Phone number (for whole reservation)
order_number (string) – Order number provided by reservation-creator
non_refundable (boolean) – If true, reservation is not refundable when canceled
total_price (decimal) – Total price of reservation including services etc.
currency_code (string) – Reservation accommodation currency (used for total_price for example)
sale_code (string) – Sale code for statistical and other purposes
guest_code (string) – Guest code for statistical and other purposes
rows (list) – Each reservation has at leas one, possibly many rows, each row can have different data
payment_method (string) – Payment method selected for reservation
discount_code (string) – Discount code
loyalty_card (string) – Loyalty card
id (int) – Internal row id
date_from (date) – Checkin date
date_to (date) – Checkout date
room_type_id (int) – Internal id of reserved room-type
room_type_code (string) – Internal room-type code
room_count (int) – Number of reserved rooms
guest_count (int) – Total number of guests for this row, for all rooms, including children
pricelist_id (int) – Internal id of pricelist
pricetype_id (int) – Internal id of pricetype
cm_rate_code (string) – Rate-code used for online/channel-manager purpose
cm_room_code (string) – Room-code used for online/channel-manager purpose
canceled (boolean) – When True, row is canceled. When all rows are canceled, whole reservation is canceled.
prices (list) – Pricing for single room per day
option (boolean) – If true reservation is in option (unconfirmed) state
option_date (boolean) – If option is true, must be confirmed to this date
arrival_time (time) – Time of arrival at checkin, HH:MM
technical (boolean) – If True, room-type is „technical“, meaning not phisical room but waiting or other special type of reservation
tentative (boolean) – If True, reservation is in „tentative“ state, meaning it’s unconfirmed
date_from – Price is valid from this date included
date_to – Price is valid to this date included
price (decimal) – Price value
package_id (int) – Package ID, see
GET /api/packages
id – Internal row id
raster_id (int) – Raster ID, see
GET /api/rasters
package_id – Package ID, see
GET /api/packages
on_room (boolean) – When true, service will be charged per room, when false, service will be charged per guest
on_group (boolean) – Only valid for group-guests, when true, item will be charged to group account
pay_once (boolean) – When true, service will be charge once per stay, when false, service will be charge for each day
price – Unit price to charge
- GET /api/reservations¶
List basic reservation information. Optional „order_info“ section provides personal or contact information for customer who ordered reservation. If reservation is personal (not „group“), system will try to match reservation name to guest name in reservation guests to find customer personal information. Otherwise (when it’s „group“ reservation or no guest card match was found) information from „order“ section of reservation header is used.
- Query Parameters:
ci_date_from (date) – Check-in date from
ci_date_to (date) – Check-in date until
reservation_id (int) – Reservation id
modified_since (datetime) – Return only records modified after given date, format YYYY-MM-DD HH:MM:SS
is_group (boolean) – If present, return only groups (true) or individuals (false)
technical (boolean) – If set, return only reservations for technical/non-technical rooms
confirmed (boolean) – If set, return only confirmed/unconfirmed reservations
include_order_info (boolean) – If set, „order_info“ dict will be added to response. It’s off by default to reduce unnecessary database queries when not needed.
Example response:
[ { "reservation_number": 170596, "name": "Reservation name", "source_code": "BOOKING", "source_id": 22, "order_email": null, "order_phone_number": null, "order_number": "6547676", "non_refundable": false, "note": "Some text informations...", "total_price": "3000.0", "currency_code": "EUR", "sale_code": null, "guest_code": null, "payment_method": "C", "is_group": False, "discount_code": null, "loyalty_card": null, "rows": [ { "id": 855666, "date_from": "2017-01-01", "date_to": "2017-01-10", "room_type_id": 2, "room_type_code": "DBL", "room_count": 2, "guest_count": 4, "pricelist_id": 12, "pricetype_id": 32, "rate_code": "BAR", "room_code": "DBL", "canceled": false, "country_code": "CZE", "option": false, "option_date": null, "arrival_time": "14:00", "technical": false, "tentative": false, "services": [ { "id": 44, "raster_id": 3, "package_id": null, "on_room": true, "pay_once": false, "on_group": false, "price": "50.00" } ], "prices": [ { "date_from": "2017-01-01", "date_to": "2017-01-05", "price": "200.00", "package_id": null }, { "date_from": "2017-01-06", "date_to": "2017-01-09", "price": "250.00", "package_id": null } ] } ], "order_info" = { "order_name": None, "order_address": None, "order_country": None, "order_lang": None, "order_email": None, "order_phone_number": None, "first_name": None, "last_name": None, "a_hn": None, "a_street": None, "a_town": None, "a_zip": None, "birth_date": None, "sex": None, "gdpr_consent": None } } ]
- Response JSON Object:
reservation_number (int) – Unique identifier (reservation number)
name (string) – Reservation name (title)
source_code (string) – Booking source code
source_id (int) – Booking source internal identification
note (string) – Note/comments, free textual information field
order_email (string) – Email contact (for whole reservation)
order_phone_number (string) – Phone number (for whole reservation)
order_number (string) – Order number provided by reservation-creator
non_refundable (boolean) – If true, reservation is not refundable when canceled
total_price (decimal) – Total price of reservation including services etc.
currency_code (string) – Reservation accommodation currency (used for total_price for example)
sale_code (string) – Sale code for statistical and other purposes
guest_code (string) – Guest code for statistical and other purposes
rows (list) – Each reservation has at leas one, possibly many rows, each row can have different data
payment_method (string) – Payment method selected for reservation
is_group (boolean) – True if group reservation, False if individual
discount_code (string) – Discount code
loyalty_card (string) – Loyalty card
id (int) – Internal row id
date_from (date) – Checkin date
date_to (date) – Checkout date
room_type_id (int) – Internal id of reserved room-type
room_type_code (string) – Internal room-type code
room_count (int) – Number of reserved rooms
guest_count (int) – Total number of guests for this row, for all rooms, including children
pricelist_id (int) – Internal id of pricelist
pricetype_id (int) – Internal id of pricetype
cm_rate_code (string) – Rate-code used for online/channel-manager purpose
cm_room_code (string) – Room-code used for online/channel-manager purpose
canceled (boolean) – When True, row is canceled. When all rows are canceled, whole reservation is canceled.
country_code (string) – Reservation country code
prices (list) – Pricing for single room per day
option (boolean) – If true reservation is in option (unconfirmed) state
option_date (boolean) – If option is true, must be confirmed to this date
arrival_time (time) – Time of arrival at checkin, HH:MM
technical (boolean) – If True, room-type is „technical“, meaning not phisical room but waiting or other special type of reservation
tentative (boolean) – If True, reservation is in „tentative“ state, meaning it’s unconfirmed
date_from – Price is valid from this date included
date_to – Price is valid to this date included
price (decimal) – Price value
package_id (int) – Package ID, see
GET /api/packages
id – Internal row id
raster_id (int) – Raster ID, see
GET /api/rasters
package_id – Package ID, see
GET /api/packages
on_room (boolean) – When true, service will be charged per room, when false, service will be charged per guest
on_group (boolean) – Only valid for group-guests, when true, item will be charged to group account
pay_once (boolean) – When true, service will be charge once per stay, when false, service will be charge for each day
price – Unit price to charge
- POST /api/cm_reservation¶
Updates or creates reservation. When multiple parameters for the value are present, for example room_type_id, room_type_code and cm_room_code, only one value needs to be filled in for request to be processed. When multiple values are set, internal id is checked first, internal code second and „cm“ related values last.
Example request:
{ "reservation_number": 170596, "name": "Reservation name", "source_code": "BOOKING", "source_id": 22, "order_phone_number": null, "order_email": null, "order_number": "5464864", "note": "Some text informations...", "prepend_note": "Some importent text", "append_note": "Some less important text", "sale_code": null, "guest_code": null, "payment_method": "C", "option": false, "option_date": null, "discount_code": null, "loyalty_card": null, "rows": [ { "id": 855666, "date_from": "2017-01-01", "date_to": "2017-01-10", "room_type_id": 2, "room_type_code": "DBL", "room_count": 2, "guest_count": 4, "pricelist_id": 12, "pricetype_id": 32, "cm_rate_code": "BAR", "cm_room_code": "DBL", "canceled": false, "country_code": "CZE", "option": false, "option_date": null, "arrival_time": "14:00", "services": [ { "raster_id": 3, "package_id": null, "on_room": true, "pay_once": false, "on_group": false, "price": "50.00" } ], "prices": [ { "date_from": "2017-01-01", "date_to": "2017-01-05", "price": "200.00", "package_id": null }, { "date_from": "2017-01-06", "date_to": "2017-01-09", "price": "250.00", "package_id": null } ] } ] }
- Request JSON Object:
reservation_number (int) – Unique identifier (reservation number). If set and reservation exists, it will be modified, to create new reservation, leave empty
name (string) – Reservation name (title)
source_code (string) – Booking source code
source_id (int) – Booking source internal identification
note (string) – Note/comments, free textual information field
prepend_note (string) – Free text which will be prependet to existing user-editable reservation-level note. Line end will be added automatically at the end of text.
append_note (string) – Free text which will be appended to existing user-editable reservation-level note. Line end will be added automatically before text.
order_phone_number (string) – Phone number contact (for whole reservation)
order_email (string) – Email contact (for whole reservation)
order_number (string) – Order number provided by reservation-creator
sale_code (string) – Sale code for statistical and other purposes
guest_code (string) – Guest code for statistical and other purposes
rows (list) – Each reservation has at leas one, possibly many rows, each row can have different data
payment_method (string) – Payment method selected for reservation
option (boolean) – If true whole reservation is in option (unconfirmed) state
option_date (boolean) – If option is true, must be confirmed to this date
discount_code (string) – Discount code
loyalty_card (string) – Loyalty card
id (int) – Internal row id, leave empty for new reservation rows
date_from (date) – Checkin date
date_to (date) – Checkout date
room_type_id (int) – Internal id of reserved room-type
room_type_code (string) – Internal room-type code
room_count (int) – Number of reserved rooms
guest_count (int) – Total number of guests for this row, for all rooms, including children
pricelist_id (int) – Internal id of pricelist
pricetype_id (int) – Internal id of pricetype
cm_rate_code (string) – Rate-code used for online/channel-manager purpose
cm_room_code (string) – Room-code used for online/channel-manager purpose
canceled (boolean) – When True, row is canceled. When all rows are canceled, whole reservation is canceled.
country_code (string) – Reservation country code
prices (list) – Pricing for single room per day
option – If true reservation is in option (unconfirmed) state
option_date – If option is true, must be confirmed to this date
arrival_time (time) – Time of arrival at checkin, HH:MM
date_from – Price is valid from this date included
date_to – Price is valid to this date included
price (decimal) – Price value
package_id (int) – Package ID, see
GET /api/packages
raster_id (int) – Raster ID, see
GET /api/rasters
package_id – Package ID, see
GET /api/packages
. Only raster_id or package_id can be set for one service row, not both.on_room (boolean) – When true, service will be charged per room, when false, service will be charged per guest
on_group (boolean) – Only valid for group-guests, when true, item will be charged to group account
pay_once (boolean) – When true, service will be charge once per stay, when false, service will be charge for each day
price – Unit price to charge. If package_id is set, this value is ignored and package price is assigned automatically from stored package details.
Example response:
When new reservation is created, reservation number is returned, else only standard result structure with no/empty data is returned, result 0 when success:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "result": 0, "data": { "reservation_number": 2344533 } }
- POST /api/reservation¶
Updates or creates reservation. When multiple parameters for the value are present, for example room_type_id, room_type_code and cm_room_code, only one value needs to be filled in for request to be processed. When multiple values are set, internal id is checked first, internal code second and „cm“ related values last.
Example request:
{ "reservation_number": 170596, "name": "Reservation name", "source_id": 22, "order_phone_number": null, "order_email": null, "order_number": "5464864", "note": "Some text informations...", "prepend_note": "Some importent text", "append_note": "Some less important text", "sale_code": null, "guest_code": null, "payment_method": "C", "option": false, "option_date": null, "discount_code": null, "loyalty_card": null, "rows": [ { "id": 855666, "date_from": "2017-01-01", "date_to": "2017-01-10", "room_type_id": 2, "room_type_code": "DBL", "room_count": 2, "guest_count": 4, "pricelist_id": 12, "pricetype_id": 32, "canceled": false, "option": false, "option_date": null, "arrival_time": "14:00", "services": [ { "raster_id": 3, "package_id": null, "on_room": true, "pay_once": false, "on_group": false, "price": "50.00" } ], "prices": [ { "date_from": "2017-01-01", "date_to": "2017-01-05", "price": "200.00", "package_id": null }, { "date_from": "2017-01-06", "date_to": "2017-01-09", "price": "250.00", "package_id": null } ] } ] }
- Request JSON Object:
reservation_number (int) – Unique identifier (reservation number). If set and reservation exists, it will be modified, to create new reservation, leave empty
name (string) – Reservation name (title)
source_id (int) – Booking source internal identification
note (string) – Note/comments, free textual information field
prepend_note (string) – Free text which will be prependet to existing user-editable reservation-level note. Line end will be added automatically at the end of text.
append_note (string) – Free text which will be appended to existing user-editable reservation-level note. Line end will be added automatically before text.
order_phone_number (string) – Phone number contact (for whole reservation)
order_email (string) – Email contact (for whole reservation)
order_number (string) – Order number provided by reservation-creator
sale_code (string) – Sale code for statistical and other purposes
guest_code (string) – Guest code for statistical and other purposes
rows (list) – Each reservation has at leas one, possibly many rows, each row can have different data
payment_method (string) – Payment method selected for reservation
option (boolean) – If true whole reservation is in option (unconfirmed) state
option_date (boolean) – If option is true, must be confirmed to this date
discount_code (string) – Discount code
loyalty_card (string) – Loyalty card
id (int) – Internal row id, leave empty for new reservation row
date_from (date) – Checkin date
date_to (date) – Checkout date
room_type_id (int) – Internal id of reserved room-type
room_type_code (string) – Internal room-type code
room_count (int) – Number of reserved rooms
guest_count (int) – Total number of guests for this row, for all rooms, including children
pricelist_id (int) – Internal id of pricelist
pricetype_id (int) – Internal id of pricetype
canceled (boolean) – When True, row is canceled. When all rows are canceled, whole reservation is canceled.
prices (list) – Pricing for single room per day
option – If true reservation is in option (unconfirmed) state
option_date – If option is true, must be confirmed to this date
arrival_time (time) – Time of arrival at checkin, HH:MM
date_from – Price is valid from this date included
date_to – Price is valid to this date included
price (decimal) – Price value
package_id (int) – Package ID, see
GET /api/packages
raster_id (int) – Raster ID, see
GET /api/rasters
package_id – Package ID, see
GET /api/packages
. Only raster_id or package_id can be set for one service row, not both.on_room (boolean) – When true, service will be charged per room, when false, service will be charged per guest
on_group (boolean) – Only valid for group-guests, when true, item will be charged to group account
pay_once (boolean) – When true, service will be charge once per stay, when false, service will be charge for each day
price – Unit price to charge. If package_id is set, this value is ignored and package price is assigned automatically from stored package details.
Example response:
When new reservation is created, reservation number is returned, else only standard result structure with no/empty data is returned, result 0 when success:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "result": 0, "data": { "reservation_number": 2344533 } }
- GET /api/reservation_guest¶
List guests for given reservation
- Query Parameters:
reservation_number (int) – Reservation number
Example response:
[ { "reservation_id": 2334, "reservation_guest_id": 65443, "first_name": null, "last_name": "Abc", "guest_card_id": 831223, "a_hn": null, "a_street": null, "a_town": null, "a_zip": null, "a_country": "CZE", "citizenship": null, "birth_date": null, "sex": null, "room": "102", "rg_note": null, "gc_note": null, "gcs_note": null, "email": null, "gdpr_consent": true, "phone_number": null, "ic_number": null, "ic_type": null, "licence_plate". null }, ]
- Response JSON Object:
reservation_id (int) – Reservation row ID
reservation_guest_number (int) – Reservation ID of a particular guest, if empty, new guest will be created)
first_name (string) – Guest’s name
last_name (string) – Guest’s surname
guest_card_id (int) – Guest card ID (identical for repeated stays)
reservation_id – Reservation number
a_hn (string) – House number
a_street (string) – Street
a_town (string) – City
a_zip (string) – Zip code
a_country (string) – Country code
citizenship (string) – Citizenship
birth_date (date) – Date of birth
sex (string) – Sex („M“ - male, „F“ - female, „C“ - child)
room (string) – Room number
rg_note (string) – Note (refers to a particular guest in given reservation – is relevant for given reservation only)
gc_note (string) – Note (refers to a particular guest in general - stored in the guest card, independent of the particular stay)
gcs_note (string) – Short note (refers to a particular guest in general - stored in the guest card, independent of the particular stay)
email (string) – Guest e-mail address
phone_number (string) – Guest phone number
gdpr_consent (boolean) – Consent with personal info processing
ic_number (string) – IC/Passport number etc.
ic_type (string) – Option type of ic_number, valid strings are: ‚personal_id‘, ‚passport‘, ‚drivers_license‘, ‚other‘
licence_plate (string) – Car licnece plate
- POST /api/reservation_guest¶
Create or update reservation-guest information
Example request:
[ { "reservation_id": 2334, "reservation_guest_id": 65443, "first_name": null, "last_name": "Abc", "guest_card_id": 831223, "a_hn": null, "a_street": null, "a_town": null, "a_zip": null, "a_country": "CZE", "citizenship": null, "birth_date": null, "sex": null, "room": "102", "rg_note": null, "gc_note": null, "gcs_note": null, "email": null, "phone_number": null, "gdpr_consent": true, "ic_number": null, "ic_type": null, "licence_plate". null }, ]
- Request JSON Object:
reservation_guest_id (int) – Reservation ID of a particular guest, if empty, new guest will be created)
first_name (string) – Guest’s name
last_name (string) – Guest’s surname
guest_card_id (int) – Guest card ID (identical for repeated stays)
reservation_id (int) – ID of reservation row
a_hn (string) – House number
a_street (string) – Street
a_town (string) – City
a_zip (string) – Zip code
a_country (string) – Country code
citizenship (string) – Citizenship
birth_date (date) – Date of birth
sex (string) – Sex („M“ - male, „F“ - female, „C“ - child)
room (string) – Room number
rg_note (string) – Note (refers to a particular guest in given reservation – is relevant for given reservation only)
gc_note (string) – Note (refers to a particular guest in general - stored in the guest card, independent of the particular stay)
gcs_note (string) – Short note (refers to a particular guest in general - stored in the guest card, independent of the particular stay)
email (string) – Guest e-mail address
phone_number (string) – Guest phone number
gdpr_consent (boolean) – Consent with personal info processing
ic_number (string) – IC/Passport number etc.
ic_type (string) – Option type of ic_number, valid strings are: ‚personal_id‘, ‚passport‘, ‚drivers_license‘, ‚other‘
licence_plate (string) – Car licnece plate
- DELETE /api/reservation_guest¶
- Query Parameters:
reservation_guest_id (int) – ID of reservation guest record to delete
Delete reservation-guest from reservation guests-list (this will delete only informations about guest, not lower reserved guest-count!
- GET /api/cm_available_room_numbers¶
Available room numbers for given date-range. Only rooms available for the whole date-range are returned. It may happen that available_room_count may be smaller then number of available_rooms. In that case there are some reservations without assigned room-numbers.
Because of that, available_room_count is value determining real available rooms count, available_rooms list is list of room_numbers which can be used up to available_room_count value.
- Query Parameters:
date_from (date) – Checkin date
date_to (date) – Last payed date (checkout date - 1 day)
Example response:
{ "result": 0, "data": { "DBL": { "available_room_count": 12, "available_rooms": [ "218", "202", "121", "205", "104", "126", "114", "112", "204", "509", "326", "122" ], "prices": { "BAR": [ { "price": "510.00", "date": "2018-04-19" }, { "price": "510.00", "date": "2018-04-20" }, { "price": "510.00", "date": "2018-04-18" } ] } }, "TRP": { "available_room_count": 1, "available_rooms": [ "106", "401" ], "prices": { "BB": [ { "price": "510.00", "date": "2018-04-18" }, { "price": "510.00", "date": "2018-04-19" }, { "price": "510.00", "date": "2018-04-20" } ] } } } }
- GET /api/cr_cm_available_room_numbers¶
Same as /api/cm_available_room_numbers but data is corrected for ConnectedRooms module
- GET /api/cm_available_room_rates¶
Available rooms for given date-range. For each date list of available room-types with number of available rooms and allowed prices will be returned.
- Query Parameters:
date_from (date) – Check-in date from
date_to (date) – Check-out date until
Example response:
[ { "date":"2017-01-01", "room_types": [ { "room_type":"DBL", "availability":10, "prices": [ { "rate_code":"BAR", "price":"200.00" }, { } ] }, { } ] }, { } ]
- GET /api/prepayment¶
List of prepayment items for given reservation
- Query Parameters:
reservation_number (int) – Reservation number for which to return prepayment items
Example response:
[ { "id": 3189, "receipt_number": 5689, "payment_date": "2018-02-22", "receipt_note": null, "coi_id": 5583, "raster_id": 34, "price": "400.00", "currency_id": 1, "vat": "20.0", "payment_method_id": 5, "description": null, "coi_note": null, "created_at": "2018-02-22", "canceled": false, "final_account_id": null, "vat_price": "80.00", "default_currency_price": "400.00", "exch_rate": "1.0000", "prepayment_currency_id": 1, "prepayment_exch_rate": "1.00", "prepayment_price": "400.00", "credit_card": null } ]
- Response JSON Object:
id (int) – Unique identifier of receipt
receipt_number (int) – Number of associated receipt
payment_date (date) – Date of payment
receipt_note (string) – Receipt-level note
coi_id (int) – Unique identifier of receipt item
raster_id (int) – Raster ID, see
GET /api/rasters
price (decimal) – Price
currency_id (int) – Currency ID (returned by
GET /api/currencies
)vat (decimal) – VAT value in percentage
payment_method_id (int) – Payment method ID, see
GET /api/payment_methods
description (string) – Item level description (can identify/explain given item)
coi_note (string) – Item level note (internal note about item)
created_at (date) – Date of item creation
canceled (boolean) – True if item is canceled
final_account_id (int) – Final account id number
vat_price (decimal) – Calculated VAT price (local currency)
default_currency_price (decimal) – Price converted to local currency
exch_rate (decimal) – Exchange rate
credit_card (string) – Credit-card number, sanitized
prapayment_currency_id (int) – Currency to use when item is charged to guest-account
prepayment_exch_rate (decimal) – Exchange rate used when item is charged to guest-account
prepayment_price (decimal) – Price used when item is charged to guest-account
- POST /api/prepayment¶
Create prepayment for specific reservation number.
If „send_to_emails“ is filled, payment confirmation will be send to provided emails. Attached will be PDF with cass-office receipt.
More than one item can be written to single receipt using additional_items field when needed.
Example request:
[ { "reservation_group_id": 4562, "payment_date": "2018-02-22", "receipt_note": null, "raster_id": 34, "price": "400.00", "currency_id": 1, "vat": "20.0", "payment_method_id": 5, "description": null, "coi_note": null, "vat_price": "80.00", "default_currency_price": "400.00", "exch_rate": "1.0000", "prepayment_currency_id": 1, "prepayment_exch_rate": "1.00", "prepayment_price": "400.00", "credit_card": null, "credit_card_type": null, "send_to_emails": "test@domain.com, hotel@domain.com", "additional_items": [ { "raster_id": 34, "price": "400.00", "currency_id": 1, "vat": "20.0", "payment_method_id": 5, "description": null, "coi_note": null, "vat_price": "80.00", "default_currency_price": "400.00", "exch_rate": "1.0000", "prepayment_currency_id": 1, "prepayment_exch_rate": "1.00", "prepayment_price": "400.00", "credit_card": null, "credit_card_type": null } ] } ]
- Request JSON Object:
reservation_group_id (int) – ID (number) of reservation for which to create prepayment
payment_date (date) – Date of payment
receipt_note (string) – Receipt-level note
raster_id (int) – Raster ID, see
GET /api/rasters
price (decimal) – Price
currency_id (int) – Currency ID (returned by
GET /api/currencies
)vat (decimal) – VAT value in percentage
payment_method_id (int) – Payment method ID, see
GET /api/payment_methods
description (string) – Item level description (can identify/explain given item)
coi_note (string) – Item level note (internal note about item)
vat_price (decimal) – Calculated VAT price (local currency)
default_currency_price (decimal) – Price converted to local currency
exch_rate (decimal) – Exchange rate
credit_card (string) – Credit-card number, will be encrypted when saved
prapayment_currency_id (int) – Currency to use when item is charged to guest-account. If empty, currency_id will be used
prepayment_exch_rate (decimal) – Exchange rate used when item is charged to guest-account. If empty, exch_rate will be used
prepayment_price (decimal) – Price used when item is charged to guest-account. When empty, price will be used
credit_card_type (int) – Required for credit card payment, credit card type ID (returned by
GET /api/payment_card_types
)send_to_emails (string) – Comma separated list of email addresses to which payment confirmation should be send
Example response:
Result 0 when success:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "result": 0, "data": { "receipt_ids": [5668] } }
- GET /api/prepayment_invoice¶
List of existing invoice numbers for given prepayment receipt.
Values for prepayment_receipt_id filter are returned by
POST /api/prepayment
method, either when new prepayment is created, or as „ID“ values forGET /api/prepayment
items.- Query Parameters:
prepayment_receipt_id (int) – ID of prepayment receipt
Example response:
{ "result": 0, "data": { "invoice_numbers": [ "161814" ] } }
- POST /api/prepayment_invoice¶
Create invoice for given prepayment_receipt_id.
Values for prepayment_receipt_id filter are returned by
POST /api/prepayment
method, either when new prepayment is created, or as „ID“ values forGET /api/prepayment
items.More items returned by
GET /api/prepayment
method may have same ID. That means they are part of same prepayment_receipt and when invoice is created from such receipt, all items are added to this invoice automatically.If „send_to_emails“ is filled, payment confirmation will be send to provided emails. Attached will be PDF with invoice document if invoice header was filled.
Example request:
{ "prepayment_receipt_id": 3189, "send_to_emails": "test@domain.com, hotel@domain.com", "invoice": { "address_title": "S.H.I.E.L.D.", "address_name": "Nick Fury", "address_town": "Washington, D.C.", "address_street": null, "address_hn": null, "address_zip": "20010", "address_country": "usa", "in": 7888585, "vat": US98856664, "vat2": US58777458, "email": nick.fury@shield.gov", "phone_number": "+12027734812" } }
- Request JSON Object:
prepayment_receipt_id (int) – ID of prepayment receipt for which all items will be used to generate invoice
send_to_emails (string) – Comma separated list of email addresses to which payment confirmation should be send
address_title (string) – Main company/person to which invoice is issued
address_name (string) – Secondary name (maybe person name in case address_title is company)
address_town (string) – Invoicing address
address_street (string) – Invoicing address
address_hn (string) – Invoicing address
address_zip (string) – Invoicing address
address_street – Invoicing address
address_country (string) – alpha3 ISO code of country
in (string) – Identification number (IČO in Czech republic)
vat (string) – TAX identification number (VAT in Czech republic)
vat2 (string) – TAX identification number (IČ DPH for Slovakia)
string (phone_number) – email
string – phone number
Example response:
Result 0 when success:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "result": 0, "data": { "invoice_number": 58896354 } }
- GET /api/occupancy_chart¶
Occupancy information for individual dates
- Query Parameters:
date_from (date) – Display dates from
date_to (date) – Display dates to
Example response:
{ "result": 0, "data": { "room_type_counts": { "1": 6, "2": 77, "3": 31, "4": 21, "5": 12, "7": 9, "9": 2, "10": 2, "11": 0, "103": 0, "104": 1 }, "real_room_count": 200, "dates": { "2018-01-01": { "used_rooms_count": 116, "used_rooms_by_type": { "1": 5, "2": 64, "3": 25, "4": 0, "5": 10, "7": 7, "9": 2, "10": 2, "11": 0, "103": 0, "104": 1 }, "occupied_rooms_count": 116, "occupied_rooms_by_type": { "1": 5, "2": 64, "3": 25, "4": 0, "5": 10, "7": 7, "9": 2, "10": 2, "11": 0, "103": 0, "104": 1 }, "reservations_tp": 0, "reservations_confirmed": 0, "reservations_confirmed_single": 0, "reservations_unconfirmed": 0, "allocations_rs_total": 0, "allocations_rs_used": 0, "allocations_rs_by_type_total": { "1": 0, "2": 0, "3": 0, "4": 0, "5": 0, "7": 0, "9": 0, "10": 0, "11": 0, "103": 0, "104": 0 }, "allocations_rs_by_type_used": { "1": 0, "2": 0, "3": 0, "4": 0, "5": 0, "7": 0, "9": 0, "10": 0, "11": 0, "103": 0, "104": 0 }, "faults_total": 0, "faults_by_type": { "1": 0, "2": 0, "3": 0, "4": 0, "5": 0, "7": 0, "9": 0, "10": 0, "11": 0, "103": 0, "104": 0 }, "top_date": false, "blocked": false, "current_rooms_total": 116, "current_rooms_total_single": 107 } } }
real_room_count: Total number of physical rooms in hotel (= 100%)
room_type_counts: Total number of rooms by type
dates: counts for each date in selected date-range
used_rooms_count: Number of rooms blocked by guests or technical faults
used_rooms_by_type: Same as used_rooms_count for each room type
occupied_rooms_count: Number of rooms occupied by guests, faults are not included
occupied_rooms_by_type: Same as occupied_rooms_count for each room type
reservations_tp: Number of rooms reserved on technical rooms = waitings
reservations_confirmed: Total number of rooms from confirmed reservations
reservations_confirmed_single: Number of rooms from confirmed reservations that are not group reservations
reservations_unconfirmed: Number of unconfirmed reservations (= options)
allocations_: Currently not usable data
faults_total: Total number of rooms blocked by technical faults
faults_by_type: Same as faults_total but for each room type
top_date: True if date is marked as „top“ (special in some way)
blocked: True if date is marked as „blocked“
current_rooms_total: Number of rooms occupied (= already checked in) for this date
current_rooms_total_single Number of non-group member rooms occupied (= already checked in) for this date
- GET /api/logo¶
Returns hotel logo in binary format with Content-Type: appliction/octet-stream and Content-Disposition: attachment; filename=“xyz.abc“
- GET /api/zoomletter_info¶
Returns information needed to register hotel in Zoom-letter system when this module is available
- GET /api/iiko_cancel_receipt¶
- Query Parameters:
iiko_order_id (string) – IIKO order for which HORES receipt should be canceled
Special method for IIKO integration to cancel corresponding receipt in HORES when receipt in IIKO is canceled.
- POST /api/login¶
Method verifies user account in HORES, returns some user-data on success
- Query Parameters:
username (string) – Username for HORES user
password (string) – Password for HORES user
Example response:
{ "result": 0, "data": { "user_id": 2, "user_rights": {...} } }
- Response JSON Object:
user_id (int) – Unique identifier of HORES user
user_rights (dict) – Dictionary of user rights values
- GET /api/get_license¶
Method to get some HORES license information
Example response:
{ "result": 0, "data": { "license": 234, "hotel_name": "Hotel California", "hotel_address": "Palm Springs, CA 92264", "license_number": 234 } }
- Response JSON Object:
license_number (int) – Unique license number
hotel_name (string) – Hotel name from settings
hotel-address" (string) – Hotel address from settings
license (int) – Same as license_number for compatibility
- GET /api/get_license¶
Undocumented method to get some detailed room-occupancy data for currently occupied rooms
- GET /api/user_messages¶
List messages for user
- POST /api/update_user_message¶
Set user-message status
- POST /api/send_message¶
Send message to user
- GET /api/contacts¶
List contacts
- GET /api/room_service_actions¶
Available room service actions list
- GET /api/users¶
List HORES users
- POST /api/set_room_attr¶
Set attribute parameters for room