The hoteliga API

Reporting

Reporting resource enables you to export various reports available in the system. Currently supports JSON only.

Resources
Resource Description
POST /v1/Report Export a specific report.

POST /v1/Report

Export a specific report. The "parameters" field in the request payload contains actual parameters that are necessary by each report. To get the information about required parameters per report, check the new API section. Button "API report parameters" will take you to the grid containing necessary information. Report parameters can be found in the column named accordingly. Note that for those reports that support "roomId" parameter, pass "roomId" value as 0 if you want to export data for all rooms.

Request parameters

id Id of the report
parameters Parameters required by the report
output Type of the output, such as "json"

Response

The result is the data of the requested report.

Example Request

<?xml version="1.0" encoding="UTF-8"?>
<Report>
    <Id>124</Id>
    <Parameters>
        <DateFrom>7/01/2021</DateFrom>
        <DateTo>7/15/2021</DateTo>
        <RoomId>1</RoomId>
    </Parameters>
    <Output>Json</Output>
</Report>
            
{
    "id": 124,
    "parameters": {
        "dateFrom": "7/01/2021",
        "dateTo": "7/15/2021",
        "roomId": 1
    },
    "output": "json",
}
            

Example Response

<?xml version="1.0" ?>
<Title>Arrivals for period</Title>
<Headers>
    <Header>
        <Customer>Sandro Begiashvili</Customer>
        <Country>Georgia</Country>
        <Agency>2</Agency>
        <Cust. notes>Male</Cust. notes>
        <Res. id>13264</Res. id>
        <Booking agency code></Booking agency code>
        <Check in>2021-07-12</Check in>
        <Checkout>2021-07-17</Checkout>
        <Room>304 Doble</Room>
        <Room type>Doble!</Room type>
        <Adults>2</Adults>
        <Children>0</Children>
        <Nights>4</Nights>
        <Board>RO</Board>
        <Reserv. notes>Booking.com reservation.</Reserv. notes>
    </Header>
</Headers>
            
{
    "title": "Arrivals for period",
    "headers": [
        [
            "Customer",
            "Country",
            "Agency",
            "Cust. notes",
            "Res. id",
            "Booking agency code",
            "Check in",
            "Checkout",
            "Room",
            "Room type",
            "Adults",
            "Children",
            "Nights",
            "Board",
            "Reserv. notes"
        ]
    ],
    "data": [
        [
            "Sandro Begiashvili",
            "Georgia",
            "2",
            "Male",
            "#13264",
            "",
            "2021-07-12",
            "2021-07-17",
            "304 Doble",
            "Doble!",
            "2",
            "0",
            "4",
            "RO",
            "Booking.com reservation."
        ]
    ]
}