▪ Offers
Offers API returns information about accommodation offers for a POI.
Request
Endpoint
GET
/v4/{billing_plan}/account/{account_id}/poi/{poi_id}/rates/details
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/details?from=2022-05-01&to=2022-05-31&page_size=2' \
-H 'x-api-key: {x_api_key}' \
-H 'Authorization: Bearer {jwt_bearer}' \
Response
Status
Status | Description |
---|---|
200 | Offers data has been successfully returned. |
Body
Offers
Field | Description | Type |
---|---|---|
*results | Paginated list of offers. | array[Offer] |
paging | Response pagination. | Paging |
Offer
Field | Description | Type | Examples |
---|---|---|---|
*checkin_date | Check-in date of the offer. | date | 2022-05-01 |
*room_name | Descriptive identifier of the room typology. | string | Double Room |
*stay_price | Price of the offer in Euros. | decimal | |
*min_stay | Minimum amount of days required for the stay. | int | |
:fontawesome-solid-exclamation-circle: :fontawesome-solid-sync-alt: * number_of_guests |
Number of guests allowed for the offer. | ||
refundable | Whether the offer is refundable. | boolean | |
:fontawesome-solid-exclamation-circle: :fontawesome-solid-sync-alt: * prepayment_required |
Whether the offer requires payment in advance. | boolean | |
breakfast_included | Whether the offer includes breakfast in stay_price . |
boolean | |
:fontawesome-solid-exclamation-circle: :fontawesome-solid-sync-alt: * lunch_included |
Whether the offer includes lunch in stay_price . |
boolean | |
:fontawesome-solid-exclamation-circle: :fontawesome-solid-sync-alt: * dinner_included |
Whether the offer includes dinner in stay_price . |
boolean | |
available_rooms | Number of available rooms detected for room_name on checkin_date . |
int | |
total_rooms | Total number of rooms detected for room_name on checkin_date . |
int |
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": [
{
"checkin_date": "2022-05-01",
"room_name": "Double Room",
"stay_price": 71.0,
"min_stay": 1,
"number_of_guest": 1,
"refundable": true,
"prepayment": true,
"breakfast_included": false,
"lunch": false,
"dinner": false,
"available_rooms": 10,
"total_rooms": 10
},
{
"checkin_date": "2022-05-01",
"room_name": "Double Room",
"stay_price": 67.0,
"min_stay": 1,
"number_of_guest": 1,
"refundable": false,
"prepayment": true,
"breakfast_included": true,
"lunch": false,
"dinner": false,
"available_rooms": 10,
"total_rooms": 10
}
],
"paging": {
"last": "/rates/details?page=413&page_size=2&from=2022-05-01&to=2022-05-31",
"first": "/rates/details?page=1&page_size=2&from=2022-05-01&to=2022-05-31",
"prev": null,
"next": "/rates/details?page=2&page_size=2&from=2022-05-01&to=2022-05-31",
"current": "/rates/details?page=1&page_size=2&from=2022-05-01&to=2022-05-31",
"pages": [
{
"number": 1,
"uri": "/rates/details?page=1&page_size=2&from=2022-05-01&to=2022-05-31"
},
{
"number": 2,
"uri": "/rates/details?page=2&page_size=2&from=2022-05-01&to=2022-05-31"
},
{
"number": 3,
"uri": "/rates/details?page=3&page_size=2&from=2022-05-01&to=2022-05-31"
},
{
"number": 4,
"uri": "/rates/details?page=4&page_size=2&from=2022-05-01&to=2022-05-31"
},
{
"number": 5,
"uri": "/rates/details?page=5&page_size=2&from=2022-05-01&to=2022-05-31"
}
],
"elements": [
1,
2
],
"total": 825,
"size": 2
}
}