Overall Series Grouped Compare
Bookings Overall Series Grouped Compare API returns two, booking time-based overall grouped data series at once: one defined by the specified {BookingsTimeframes}
and {IATACodes}
and another defined by {Comparison...}
and compare_ prefixed query parameters (or auto-calculated with default values where specified).
Additional comparative time-based data series between the two grouped data series are returned as well.
Request
Endpoint
GET
/v4/{billing_plan}/account/{account_id}/flights/bookings/overall/series/grouped/compare
Path Parameters
Name | Description | Type | Examples |
---|---|---|---|
*{billing_plan} | Billing plan to be applied to the call. | string | ondemand |
*{account_id} | Provided identifier of the account. | string |
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 |
---|---|---|---|---|
*{BookingsTimeframes} | Flights Bookings timeframes filter. | BookingsTimeframes | ||
*{IATACodes} | Actual IATA code identifiers. | IATACodes | ||
*period | Time unit of the series. | string | dayweekmonth | |
ⓝ *group_type | Field(s) for which perform grouping. | string | trip_typeflight_type | |
{Comparison BookingsTimeframes} |
Comparison Flights Bookings timeframes filter. | Comparison |
One year before correspondent and valued {BookingsTimeframes}. | |
{ComparisonIATACodes} | Comparison IATA code identifiers. | Comparison |
Same as {IATACodes}. | |
ⓝ departure_countryⓝ compare_departure_country | Filter by country of departure in ISO 3166-1 alpha-2 standard format (in lower case). | string | it | |
ⓝ arrival_countryⓝ compare_arrival_country | Filter by country of arrival in ISO 3166-1 alpha-2 standard format (in lower case). | string | fr | |
ⓝ cabin_classⓝ compare_cabin_class | Filter by booked cabin class of the flight. | string | economybusinessfirst | |
ⓝ haulⓝ compare_haul | Filter by duration range of the booked flight. | string | shortmediumlong | |
flight_type compare_flight_type | Filter by flight type. | string | domesticinternational | |
trip_typecompare_trip_type | Filter by trip type. | string | onewayround_trip | |
stop_days.eqstop_days.gtstop_days.gtestop_days.ltstop_days.ltecompare_stop_days.eqcompare_stop_days.gtcompare_stop_days.gtecompare_stop_days.ltcompare_stop_days.lte | Filter by total number of days elapsed between multi-routes flights departure dates, including both stay time and flight connection waiting time.Field value can be filtered using multiple comparison modes: .eq= → = .gt= → > .gte= → ≥ .lt= → < .lte= → ≤ | int | ||
pax.eqpax.gtpax.gtepax.ltpax.ltecompare_pax.eqcompare_pax.gtcompare_pax.gtecompare_pax.ltcompare_pax.lte | Filter by number of passengers that booked the flight.Field value can be filtered using multiple comparison modes: .eq= → = .gt= → > .gte= → ≥ .lt= → < .lte= → ≤ | int |
Supported values for period
- day
- week
- month
Supported values for group_type
- iata_departure_code
- iata_arrival_code
- departure_country
- arrival_country
- cabin_class
- haul
- flight_type
- trip_type
- status
- stop_days
- pax
Supported values for cabin_class
- economy
- premium_economy
- business
- premium_business
- first
- premium_first
Supported values for haul
- short
- medium
- long
Supported values for flight_type
- domestic
- international
Supported values for trip_type
- oneway
- round_trip
Example
curl -X GET 'https://api.datappeal.io/v4/{billing_plan}/account/{account_id}/flights/bookings/overall/series/grouped/compare?booking_from=2022-10-15&booking_to=2023-10-15&arrival_from=2024-10-15&arrival_to=2025-10-15&iata_departure_code=flr&group_type=arrival_country&period=month' \
-H 'x-api-key: {x_api_key}' \
-H 'Authorization: Bearer {jwt_bearer}' \
Response
Status
Status | Description |
---|---|
200 | Overall Series Grouped Compare data has been successfully returned. |
Body
FlightsSearchesGroupedComparedSeriesOverall
Field | Description | Type |
---|---|---|
*results | Paginated grouped compared overall data series. | FlightsBookingsGroupedComparedSeriesOverallResults |
paging | Response pagination. | Paging |
FlightsBookingsGroupedComparedSeriesOverallResults
Field | Description | Type |
---|---|---|
actual | Overall grouped data series for the actual timeframe. | FlightsBookingsGroupedComparableSeriesOverall |
comparison | Overall grouped data series for the comparison timeframe. | FlightsBookingsGroupedComparableSeriesOverall |
variation | Calculated difference between actual and comparison . |
array[FlightsBookingsSeriesGroupedOverallVariation] |
LocationGroupedComparableSeriesOverall
Field | Description | Type |
---|---|---|
timeframe | Reference date ranges. | FlightsBookingsComparableTimeframe |
value | Overall grouped data series for the corresponding timeframe . |
array[FlightsBookingsGroupedSeriesOverallElement] |
FlightsBookingsComparableTimeframe
Field | Description | Type |
---|---|---|
booking | Reference booking date range. | Timeframe |
arrival | Reference arrival date range. | Timeframe |
Timeframe
Field | Description | Type |
---|---|---|
*from | Start date of timeframe. | date |
*to | End date of timeframe. | date |
FlightsBookingsGroupedSeriesOverallElement
Field | Description | Type |
---|---|---|
*group | Group fields values combination for the requested grouping. | array[FlightsGroupElement] |
*series | Bookings overall series data of corresponding group . |
array[FlightsBookingsSeriesOverallElement] |
FlightsGroupElement
Field | Description | Type | Examples |
---|---|---|---|
*name | Name that identifies the element in the group. | string | trip_typeflight_type |
*value | Value of the corresponding element. | string | onewayactive |
FlightsBookingsSeriesOverallElement
Field | Description | Type |
---|---|---|
*period | Date representing the requested period, corresponding to the first day of the period.day : the day itself.week : first day of the corresponding week.month : first day of the corresponding month. |
date |
*value | Bookings overall data of corresponding period . |
FlightsBookingsOverall |
FlightsBookingsOverall
Field | Description | Type |
---|---|---|
passengers | Count of passengers by booking status. | FlightsBookingsPassengers |
days_in_advance | Average number of days elapsed between booking/cancellation date and departure date. | FlightsBookingsDaysInAdvance |
partition | Incidence percentage of the group's confirmed passengers over total confirmed passengers. | decimal |
FlightsBookingsPassengers
Field | Description | Type |
---|---|---|
confirmed | Count of confirmed (not canceled) passengers. | int |
canceled | Count of canceled passengers. | int |
total | Count of total passengers. | int |
FlightsBookingsDaysInAdvance
Field | Description | Type |
---|---|---|
booking | Average number of days elapsed between booking date and departure date. | decimal |
cancellation | Average number of days elapsed between cancellation date and departure date. | decimal |
LocationSeriesGroupedOverallVariation
Field | Description | Type |
---|---|---|
*group | Group fields values combination for the requested grouping. | array[FlightsGroupElement] |
*series | Overall data variation series for the requested timeframe and period. | array[FlightsBookingsSeriesOverallVariationElement] |
FlightsGroupElement
Field | Description | Type | Examples |
---|---|---|---|
*name | Name that identifies the element in the group. | string | trip_typeflight_type |
*value | Value of the corresponding element. | string | onewayactive |
FlightsBookingsSeriesOverallVariationElement
Field | Description | Type |
---|---|---|
*actual_period | Date representing the actual period, corresponding to the first day of the period.day : the day itself.week : first day of the corresponding week.month : first day of the corresponding month. |
date |
*comparison_period | Date representing the comparison period, corresponding to the first day of the period.day : the day itself.week : first day of the corresponding week.month : first day of the corresponding month. |
date |
*value | Overall variation data between actual_period and comparison_period . |
FlightsBookingsOverallVariation |
FlightsBookingsOverallVariation
Field | Description | Type |
---|---|---|
passengers | Passengers count variation. | FlightsBookingsPassengersVariation |
days_in_advance | Average days in advance variation. | FlightsBookingsDaysInAdvanceVariation |
partition | Group passengers count variation. | Variation |
FlightsBookingsPassengersVariation
Field | Description | Type |
---|---|---|
confirmed | Variation of confirmed (not canceled) passengers. | Variation |
canceled | Variation of canceled passengers. | Variation |
total | Variation of total passengers. | Variation |
Variation
Field | Description | Type | Examples |
---|---|---|---|
value | Difference between actual value and comparison value. |
decimal | 1.12 |
variation | The explicit variation polarity. It is null when values are not available in both timeframes. |
string | POSITIVE NEUTRAL NEGATIVE |
FlightsBookingsDaysInAdvanceVariation
Field | Description | Type |
---|---|---|
booking | Variation of average days in advance of bookings. | Variation |
cancellation | Variation of average days in advance of cancellations. | Variation |
Variation
Field | Description | Type | Examples |
---|---|---|---|
value | Difference between actual value and comparison value. |
decimal | 1.12 |
variation | The explicit variation polarity. It is null when values are not available in both timeframes. |
string | POSITIVE NEUTRAL NEGATIVE |
Variation
Field | Description | Type | Examples |
---|---|---|---|
value | Difference between actual value and comparison value. |
decimal | 1.12 |
variation | The explicit variation polarity. It is null when values are not available in both timeframes. |
string | POSITIVE NEUTRAL NEGATIVE |
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": {
"actual": {
"timeframe": {
"booking": {
"from": "2022-10-15",
"to": "2023-10-15"
},
"arrival": {
"from": "2024-10-15",
"to": "2025-10-15"
}
},
"value": [
{
"group": [
{
"name": "arrival_country",
"value": "fr"
}
],
"series": [
{
"period": "2022-10-01",
"value": {
"passengers": {
"confirmed": 5683,
"canceled": 2425,
"total": 8108
},
"days_in_advance": {
"booking": 50.9,
"cancellation": 67.4
},
"partition": 54.5
}
},
{
"period": "2022-11-01",
"value": {
"passengers": {
"confirmed": 7302,
"canceled": 2136,
"total": 9438
},
"days_in_advance": {
"booking": 48.8,
"cancellation": 63.5
},
"partition": 49.2
}
}
]
},
{
"group": [
{
"name": "arrival_country",
"value": "es"
}
],
"series": [
{
"period": "2022-10-01",
"value": {
"passengers": {
"confirmed": 4511,
"canceled": 981,
"total": 5492
},
"days_in_advance": {
"booking": 53.6,
"cancellation": 52.3
},
"partition": 43.3
}
},
{
"period": "2022-11-01",
"value": {
"passengers": {
"confirmed": 7088,
"canceled": 1073,
"total": 8161
},
"days_in_advance": {
"booking": 50.7,
"cancellation": 48.8
},
"partition": 47.8
}
}
]
}
]
},
"comparison": {
"timeframe": {
"booking": {
"from": "2022-10-15",
"to": "2023-10-15"
},
"arrival": {
"from": "2024-10-15",
"to": "2025-10-15"
}
},
"value": [
{
"group": [
{
"name": "arrival_country",
"value": "fr"
}
],
"series": [
{
"period": "2022-10-01",
"value": {
"passengers": {
"confirmed": 166,
"canceled": 52,
"total": 218
},
"days_in_advance": {
"booking": 117.4,
"cancellation": 96.5
},
"partition": 1.6
}
},
{
"period": "2022-11-01",
"value": {
"passengers": {
"confirmed": 328,
"canceled": 54,
"total": 382
},
"days_in_advance": {
"booking": 81.0,
"cancellation": 53.3
},
"partition": 2.2
}
}
]
},
{
"group": [
{
"name": "arrival_country",
"value": "es"
}
],
"series": [
{
"period": "2022-10-01",
"value": {
"passengers": {
"confirmed": 59,
"canceled": 18,
"total": 77
},
"days_in_advance": {
"booking": 97.5,
"cancellation": 78.0
},
"partition": 0.6
}
},
{
"period": "2022-11-01",
"value": {
"passengers": {
"confirmed": 124,
"canceled": 36,
"total": 160
},
"days_in_advance": {
"booking": 62.9,
"cancellation": 65.8
},
"partition": 0.8
}
}
]
}
]
},
"variation": [
{
"group": [
{
"name": "arrival_country",
"value": "fr"
}
],
"series": [
{
"actual_period": "2021-01-01",
"comparison_period": "2020-11-01",
"value": {
"passengers": {
"confirmed": {
"value": 10057,
"variation": "POSITIVE"
},
"canceled": {
"value": 3015,
"variation": "POSITIVE"
},
"total": {
"value": 13072,
"variation": "POSITIVE"
}
},
"days_in_advance": {
"booking": {
"value": -71.7,
"variation": "NEGATIVE"
},
"cancellation": {
"value": -19.1,
"variation": "NEGATIVE"
}
},
"partition": {
"variation": "NEUTRAL",
"value": 0.0
}
}
},
{
"actual_period": "2021-02-01",
"comparison_period": "2020-12-01",
"value": {
"passengers": {
"confirmed": {
"value": 13986,
"variation": "POSITIVE"
},
"canceled": {
"value": 2581,
"variation": "POSITIVE"
},
"total": {
"value": 16567,
"variation": "POSITIVE"
}
},
"days_in_advance": {
"booking": {
"value": -25.8,
"variation": "NEGATIVE"
},
"cancellation": {
"value": -11.0,
"variation": "NEGATIVE"
}
},
"partition": {
"variation": "NEUTRAL",
"value": 0.0
}
}
}
]
},
{
"group": [
{
"name": "arrival_country",
"value": "es"
}
],
"series": [
{
"actual_period": "2021-01-01",
"comparison_period": "2020-11-01",
"value": {
"passengers": {
"confirmed": {
"value": 10057,
"variation": "POSITIVE"
},
"canceled": {
"value": 3015,
"variation": "POSITIVE"
},
"total": {
"value": 13072,
"variation": "POSITIVE"
}
},
"days_in_advance": {
"booking": {
"value": -71.7,
"variation": "NEGATIVE"
},
"cancellation": {
"value": -19.1,
"variation": "NEGATIVE"
}
},
"partition": {
"variation": "NEUTRAL",
"value": 0.0
}
}
},
{
"actual_period": "2021-02-01",
"comparison_period": "2020-12-01",
"value": {
"passengers": {
"confirmed": {
"value": 13986,
"variation": "POSITIVE"
},
"canceled": {
"value": 2581,
"variation": "POSITIVE"
},
"total": {
"value": 16567,
"variation": "POSITIVE"
}
},
"days_in_advance": {
"booking": {
"value": -25.8,
"variation": "NEGATIVE"
},
"cancellation": {
"value": -11.0,
"variation": "NEGATIVE"
}
},
"partition": {
"variation": "NEUTRAL",
"value": 0.0
}
}
}
]
}
]
},
"paging": {
"last": "/overall/series/grouped/compare?page=9&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31",
"first": "/overall/series/grouped/compare?page=1&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31",
"prev": null,
"next": "/overall/series/grouped/compare?page=2&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31",
"current": "/overall/series/grouped/compare?page=1&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31",
"pages": [
{
"number": 1,
"uri": "/overall/series/grouped/compare?page=1&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31"
},
{
"number": 2,
"uri": "/overall/series/grouped/compare?page=2&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31"
},
{
"number": 3,
"uri": "/overall/series/grouped/compare?page=3&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31"
},
{
"number": 4,
"uri": "/overall/series/grouped/compare?page=4&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31"
},
{
"number": 5,
"uri": "/overall/series/grouped/compare?page=5&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31"
}
],
"elements": [
1,
2
],
"total": 17,
"size": 2
}
}