Skip to content

Rooms

Pricing Tier Licence Type

Rooms API returns all available room typologies in a timeframe for a POI.

Request

Endpoint

GET /v4/{billing_plan}/account/{account_id}/poi/{poi_id}/rates/rooms

Path Parameters

Name                       Description Type Examples
*{billing_plan} Billing plan to be applied to the call. string licence
ondemand
*{account_id} Provided identifier of the account. string
*{poi_id} Identifier of the POI to retrieve data for.
Value obtainable either :
- if {billing_plan}licence, from $.results[*].resource.id field of List Licences Response Body
- if {billing_plan}ondemand, from $.results.pois[*].id field of any Search API Response Body.
string XXeUNbmtYZTsH7UGvNfXWo

Header Parameters

Name                          Description Type Examples                         
*x-api-key Provided API key {x_api_key} that allows authentication. string
*Authorization Provided token {jwt_bearer} that allows authorization. string Bearer {jwt_bearer}

Query Parameters

Name                           Description Type Examples Default
*from Start date of timeframe. date 2020-01-01
*to End date of timeframe. date 2020-12-31
refundable Filter by offers refundability. boolean
breakfast_included Filter by breakfast inclusion in offers. boolean
lunch_included Filter by lunch inclusion in offers. boolean
dinner_included Filter by dinner inclusion in offers. boolean
number_of_guests Filter by allowed number of guests. int
page Requested page number for paginated results. int 1
page_size Requested page size for paginated results in the range [1, 100]. int 25
Example
curl -X GET 'https://api.datappeal.io/v4/licence/account/{account_id}/poi/HF8xjSQW4W43NGr56denSh/rates/rooms?from=2022-05-01&to=2022-05-31' \
-H 'x-api-key: {x_api_key}' \
-H 'Authorization: Bearer {jwt_bearer}' \

Response

Status

Status Description
200 Rooms data has been successfully returned.

Body

Rooms

Field Description Type
*results Paginated list of descriptive identifiers of room typologies. array[string]
paging Response pagination. Paging
Paging
Field Description Type
last A relative URI to the last page. string
first A relative URI to the first page. string
prev A relative URI to the previous page. string
next A relative URI to the next page. string
current A relative URI to the current page. string
pages A set of relative URIs calculated around the current page. Page
elements All indexes shown on the current page. array[int]
total The number of all elements that API can retrieve. int
size The selected page size. int
Page
Field Description Type
number Number of the page. int
uri URI of the page. string
Example
{
    "results": [
        "Double Room",
        "Economy Double Room",
        "Economy Twin Room",
        "Junior Suite",
        "Suite",
        "Superior Double or Twin Room",
        "Superior Twin Room",
        "Triple Room",
        "Twin Room"
    ],
    "paging": {
        "last": "/rates/rooms?page=1&page_size=25&from=2022-05-01&to=2022-05-31",
        "first": "/rates/rooms?page=1&page_size=25&from=2022-05-01&to=2022-05-31",
        "prev": null,
        "next": null,
        "current": "/rates/rooms?page=1&page_size=25&from=2022-05-01&to=2022-05-31",
        "pages": [
            {
                "number": 1,
                "uri": "/rates/rooms?page=1&page_size=25&from=2022-05-01&to=2022-05-31"
            }
        ],
        "elements": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9
        ],
        "total": 9,
        "size": 25
    }
}