Overall Grouped Compare
Bookings Overall Grouped Compare API returns two, time-based bookings overall grouped data sets along with a comparative calculation.
Request
Endpoint
GET
/v4/{billing_plan}/account/{account_id}/flights/bookings/overall/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 | ||
ⓝ *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 | ||
page | Requested page number for paginated results. | int | 1 | |
page_size | Requested page size for paginated results in the range [1, 100]. | int | 25 |
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/grouped/compare?from=2021-03-15&to=2022-03-15&iata_departure_code=flr&group_type=trip_type&group_type=flight_type' \
-H 'x-api-key: {x_api_key}' \
-H 'Authorization: Bearer {jwt_bearer}' \
Response
Status
Status | Description |
---|---|
200 | Overall Grouped Compare data has been successfully returned. |
Body
FlightsBookingsGroupedComparedOverall
Field | Description | Type |
---|---|---|
*results | Paginated grouped compared bookings overall data. | FlightsBookingsGroupedComparedOverallResults |
paging | Response pagination. | Paging |
FlightsBookingsGroupedComparedOverallResults
Field | Description | Type |
---|---|---|
actual | Bookings overall grouped data for the actual timeframe. | FlightsBookingsGroupedComparableOverall |
comparison | Bookings overall grouped data for the comparison timeframe. | FlightsBookingsGroupedComparableOverall |
variation | Calculated difference between actual and comparison . |
array[FlightsBookingsGroupedOverallVariation] |
FlightsBookingsGroupedComparableOverall
Field | Description | Type |
---|---|---|
timeframe | Reference date range. | Timeframe |
value | Bookings overall grouped data for the corresponding timeframe . |
array[FlightsBookingsGroupedOverallElement] |
Timeframe
Field | Description | Type |
---|---|---|
*from | Start date of timeframe. | date |
*to | End date of timeframe. | date |
FlightsBookingsGroupedOverallElement
Field | Description | Type |
---|---|---|
*group | Group fields values combination for the requested grouping. | array[FlightsGroupElement] |
*overall | Bookings overall values of the corresponding group . |
FlightsBookingsOverall |
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 |
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 |
FlightsBookingsGroupedOverallVariation
Field | Description | Type |
---|---|---|
*group | Group fields values combination for the requested grouping. | array[FlightsGroupElement] |
*overall | Bookings overall variation for the corresponding group . |
FlightsBookingsOverallVariation |
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 |
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": {
"from": "2021-03-15",
"to": "2022-03-15"
},
"value": [
{
"group": [
{
"name": "trip_type",
"value": "round_trip"
},
{
"name": "flight_type",
"value": "international"
}
],
"overall": {
"passengers": {
"confirmed": 36400,
"canceled": 19550,
"total": 55950
},
"days_in_advance": {
"booking": 42.6,
"cancellation": 50.8
},
"partition": 50.5
}
},
{
"group": [
{
"name": "trip_type",
"value": "oneway"
},
{
"name": "flight_type",
"value": "international"
}
],
"overall": {
"passengers": {
"confirmed": 32994,
"canceled": 10880,
"total": 43874
},
"days_in_advance": {
"booking": 36.4,
"cancellation": 42.6
},
"partition": 45.8
}
},
{
"group": [
{
"name": "trip_type",
"value": "oneway"
},
{
"name": "flight_type",
"value": "domestic"
}
],
"overall": {
"passengers": {
"confirmed": 1526,
"canceled": 719,
"total": 2245
},
"days_in_advance": {
"booking": 57.2,
"cancellation": 68.4
},
"partition": 2.1
}
},
{
"group": [
{
"name": "trip_type",
"value": "round_trip"
},
{
"name": "flight_type",
"value": "domestic"
}
],
"overall": {
"passengers": {
"confirmed": 1124,
"canceled": 564,
"total": 1688
},
"days_in_advance": {
"booking": 46.6,
"cancellation": 43.4
},
"partition": 1.6
}
}
]
},
"comparison": {
"timeframe": {
"from": "2020-03-15",
"to": "2021-03-15"
},
"value": [
{
"group": [
{
"name": "trip_type",
"value": "round_trip"
},
{
"name": "flight_type",
"value": "international"
}
],
"overall": {
"passengers": {
"confirmed": 9416,
"canceled": 6059,
"total": 15475
},
"days_in_advance": {
"booking": 47.1,
"cancellation": 55.9
},
"partition": 37.0
}
},
{
"group": [
{
"name": "trip_type",
"value": "oneway"
},
{
"name": "flight_type",
"value": "international"
}
],
"overall": {
"passengers": {
"confirmed": 10414,
"canceled": 3548,
"total": 13962
},
"days_in_advance": {
"booking": 27.2,
"cancellation": 36.2
},
"partition": 41.0
}
},
{
"group": [
{
"name": "trip_type",
"value": "oneway"
},
{
"name": "flight_type",
"value": "domestic"
}
],
"overall": {
"passengers": {
"confirmed": 3049,
"canceled": 471,
"total": 3520
},
"days_in_advance": {
"booking": 19.4,
"cancellation": 30.2
},
"partition": 12.0
}
},
{
"group": [
{
"name": "trip_type",
"value": "round_trip"
},
{
"name": "flight_type",
"value": "domestic"
}
],
"overall": {
"passengers": {
"confirmed": 2551,
"canceled": 380,
"total": 2931
},
"days_in_advance": {
"booking": 23.0,
"cancellation": 25.0
},
"partition": 10.0
}
}
]
},
"variation": [
{
"group": [
{
"name": "trip_type",
"value": "round_trip"
},
{
"name": "flight_type",
"value": "international"
}
],
"compare": {
"passengers": {
"confirmed": {
"value": 26984,
"variation": "POSITIVE"
},
"canceled": {
"value": 13491,
"variation": "POSITIVE"
},
"total": {
"value": 40475,
"variation": "POSITIVE"
}
},
"days_in_advance": {
"booking": {
"value": -4.5,
"variation": "NEGATIVE"
},
"cancellation": {
"value": -5.1,
"variation": "NEGATIVE"
}
},
"partition": {
"variation": "POSITIVE",
"value": 13.5
}
}
},
{
"group": [
{
"name": "trip_type",
"value": "oneway"
},
{
"name": "flight_type",
"value": "international"
}
],
"compare": {
"passengers": {
"confirmed": {
"value": 22580,
"variation": "POSITIVE"
},
"canceled": {
"value": 7332,
"variation": "POSITIVE"
},
"total": {
"value": 29912,
"variation": "POSITIVE"
}
},
"days_in_advance": {
"booking": {
"value": 9.2,
"variation": "POSITIVE"
},
"cancellation": {
"value": 6.4,
"variation": "POSITIVE"
}
},
"partition": {
"variation": "POSITIVE",
"value": 4.8
}
}
},
{
"group": [
{
"name": "trip_type",
"value": "oneway"
},
{
"name": "flight_type",
"value": "domestic"
}
],
"compare": {
"passengers": {
"confirmed": {
"value": -1523,
"variation": "NEGATIVE"
},
"canceled": {
"value": 248,
"variation": "POSITIVE"
},
"total": {
"value": -1275,
"variation": "NEGATIVE"
}
},
"days_in_advance": {
"booking": {
"value": 37.8,
"variation": "POSITIVE"
},
"cancellation": {
"value": 38.2,
"variation": "POSITIVE"
}
},
"partition": {
"variation": "NEGATIVE",
"value": -9.9
}
}
},
{
"group": [
{
"name": "trip_type",
"value": "round_trip"
},
{
"name": "flight_type",
"value": "domestic"
}
],
"compare": {
"passengers": {
"confirmed": {
"value": -1427,
"variation": "NEGATIVE"
},
"canceled": {
"value": 184,
"variation": "POSITIVE"
},
"total": {
"value": -1243,
"variation": "NEGATIVE"
}
},
"days_in_advance": {
"booking": {
"value": 23.6,
"variation": "POSITIVE"
},
"cancellation": {
"value": 18.4,
"variation": "POSITIVE"
}
},
"partition": {
"variation": "NEGATIVE",
"value": -8.4
}
}
}
]
},
"paging": {
"last": "/bookings/overall/grouped/compare?page=1&page_size=25&iata_departure_code=flr&from=2021-03-15&group_type=trip_type&group_type=flight_type&to=2022-03-15",
"first": "/bookings/overall/grouped/compare?page=1&page_size=25&iata_departure_code=flr&from=2021-03-15&group_type=trip_type&group_type=flight_type&to=2022-03-15",
"prev": null,
"next": null,
"current": "/bookings/overall/grouped/compare?page=1&page_size=25&iata_departure_code=flr&from=2021-03-15&group_type=trip_type&group_type=flight_type&to=2022-03-15",
"pages": [
{
"number": 1,
"uri": "/bookings/overall/grouped/compare?page=1&page_size=25&iata_departure_code=flr&from=2021-03-15&group_type=trip_type&group_type=flight_type&to=2022-03-15"
}
],
"elements": [
1,
2,
3,
4
],
"total": 4,
"size": 25
}
}