en

API for booking widgets on the website for Shelter CLOUD

The API allows you to make a search query, get availability and prices for the specified dates and then make a reservation.


Request for availability and prices

GET request of the following type:

https://pms.frontdesk24.ru/externalPrices/jsSearchJoin.aspx?arrival=2020-12-20%2010:00&depart=2020-12-20%2020:00&adults=1&byHours=1&ages=&filter=[{token:e2b7a588-abd2-424f-b5b6-dfdefdd4be1f}]&plainJson=1

Parameters:

arrival - date and time of arrival. format yyyy-MM-dd%20hh:mm

depart - date and time of departure. format yyyy-MM-dd%20hh:mm

adults - the number of adults

byHours - an indication that the booking is hourly

ages - the age of the children. The format is [x,y,z]

filter - it contains only a token. the token can be found in your Personal Account in the online widget constructor

plainJson - a sign that you need it in JSON (otherwise it will be Javascript)


Available dates for the calendar

GET request of the following type:

https://pms.frontdesk24.ru/externalPrices/jsAvailables.aspx?token=e2b7a588-abd2-424f-b5b6-dfdefdd4be1f&dateFrom=2022-08-11&dateTo=2022-08-30&roomId=2925&plainJson=1

Parameters:

DateFrom - start of interval

DateTo - end of interval

roomId - room category (optional)

The response will contain an array of intervals available for booking


Getting the number of numbers

If you plan to book several rooms at once, you will need a query that will show the number of available rooms (so that the user cannot sel ect more than there are)


Request format:

https://pms.frontdesk24.ru/api/online/Availables?token=e2b7a588-abd2-424f-b5b6-dfdefdd4be1f&arrival=2020-07-30&departure=2020-08-31


Response format:

[

    {

"roomTypeId": 2925,

"roomTypeName": "Standard",

        "freeRooms": 7

    },

    {

"roomTypeId": 2941,

"roomTypeName": "Suite",

        "freeRooms": 15

    }

]


Creating a reservation

To create a reservation, you need to make a POST request fr om the server (not Javascript) to https://pms.frontdesk24.ru/externalPrices/CreateOrder.aspx by passing a private token in the token parameter, and a structure of the following type in data. If you transfer several bookings in the array, they will be combined into one order.

[

    {

        "arrival": "2020-08-21",

        "timeArrival":"12:00",

        "departure": "2020-08-21",

        "timeDeparture":"14:00",

        "adults": 1,

        "children": 2,

        "ages": [

            7,

            2

        ],

        "roomId": 238,

        "byBedsVariant": false,

        "count": 1,

        "amount": 2400,

        "boardingId": 873,

        "tariffId": 3486,

        "ContactName": "Customer",

        "contactPhone": "+79161234567",

        "contactEmail": "email@mail.ru",

        "comment": "Guest comment",

        "source": "site",

        "guests": [

            {

                "surname": "Koshkin",

                "name": "Vasily",

                "patronymic": "",

                "phone": "123",

                "email": "vasiliy@koshkin.ru"

            },

            {

                "surname": "Koshkina",

                "name": "Vasilisa",

                "age": 7

            },

            {

                "surname": "Koshkin",

                "name": "Boris",

                "birthdate": "2013-12-31T20:00:00.000Z"

            }

        ]

    }

]


Cancellation of the reservation

In order to cancel a reservation, you need to make a POST request of the following type, passing a private token and an order ID:

curl --location --request POST 'https://pms.frontdesk24.ru/externalPrices/AnnulateOrder.aspx' \

--header 'Content-Type: application/x-www-form-urlencoded' \

--data-urlencode 'token=PRIVATE_TOKEN' \

--data-urlencode 'orderId=1234567'

Оставьте заявку

Задать вопрос