Arrival Series Grouped
Bookings Arrival Series Grouped API returns a time-based booking series for the specified_{BookingsTimeframes} and {IATACodes}_, grouped by an arrival time unit (period) and other additional fields (group_type).
Request
Endpoint
GET
/v4/{billing_plan}/account/{account_id}/flights/bookings/arrivals/series/grouped
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} | IATA code identifiers. | IATACodes | ||
| *period | Time unit of the series. | string | dayweekmonth | |
| ⓝ *group_type | Field(s) for which perform grouping. | string | trip_typeflight_type | |
| ⓝ departure_country | Filter by country of departure in ISO 3166-1 alpha-2 standard format (in lower case). | string | it | |
| ⓝ arrival_country | Filter by country of arrival in ISO 3166-1 alpha-2 standard format (in lower case). | string | fr | |
| ⓝ cabin_class | Filter by booked cabin class of the flight. | string | economybusinessfirst | |
| ⓝ haul | Filter by duration range of the booked flight. | string | shortmediumlong | |
| flight_type | Filter by flight type. | string | domesticinternational | |
| trip_type | Filter by trip type. | string | onewayround_trip | |
| stop_days.eqstop_days.gtstop_days.gtestop_days.ltstop_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.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 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/arrivals/series/grouped?iata_departure_code=flr&period=month&from=2022-02-01&to=2022-03-31&arrival_from=2022-06-01&arrival_to=2022-07-31&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 | Arrival Series Grouped data has been successfully returned. |
Body
FlightsBookingsGroupedSeriesOverall
| Name | Description | Type |
|---|---|---|
| *results | Paginated list of time-based arrival series grouped by group_type requested field(s). |
array[FlightsBookingsGroupedSeriesOverallElement] |
| paging | Response pagination. | Paging |
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 |
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": [
{
"group": [
{
"name": "trip_type",
"value": "oneway"
},
{
"name": "flight_type",
"value": "international"
}
],
"series": [
{
"period": "2022-06-01",
"value": {
"passengers": {
"confirmed": 1473,
"canceled": 250,
"total": 1723
},
"days_in_advance": {
"booking": 98.1,
"cancellation": 84.0
},
"partition": 54.0
}
},
{
"period": "2022-07-01",
"value": {
"passengers": {
"confirmed": 1233,
"canceled": 169,
"total": 1402
},
"days_in_advance": {
"booking": 128.7,
"cancellation": 121.5
},
"partition": 54.0
}
}
]
},
{
"group": [
{
"name": "trip_type",
"value": "round_trip"
},
{
"name": "flight_type",
"value": "international"
}
],
"series": [
{
"period": "2022-06-01",
"value": {
"passengers": {
"confirmed": 1111,
"canceled": 502,
"total": 1613
},
"days_in_advance": {
"booking": 98.7,
"cancellation": 88.8
},
"partition": 40.7
}
},
{
"period": "2022-07-01",
"value": {
"passengers": {
"confirmed": 912,
"canceled": 528,
"total": 1440
},
"days_in_advance": {
"booking": 132.7,
"cancellation": 128.3
},
"partition": 39.9
}
}
]
},
{
"group": [
{
"name": "trip_type",
"value": "oneway"
},
{
"name": "flight_type",
"value": "domestic"
}
],
"series": [
{
"period": "2022-06-01",
"value": {
"passengers": {
"confirmed": 123,
"canceled": 63,
"total": 186
},
"days_in_advance": {
"booking": 100.7,
"cancellation": 74.6
},
"partition": 4.5
}
},
{
"period": "2022-07-01",
"value": {
"passengers": {
"confirmed": 122,
"canceled": 11,
"total": 133
},
"days_in_advance": {
"booking": 129.4,
"cancellation": 128.0
},
"partition": 5.3
}
}
]
},
{
"group": [
{
"name": "trip_type",
"value": "round_trip"
},
{
"name": "flight_type",
"value": "domestic"
}
],
"series": [
{
"period": "2022-06-01",
"value": {
"passengers": {
"confirmed": 22,
"canceled": 27,
"total": 49
},
"days_in_advance": {
"booking": 100.3,
"cancellation": 75.0
},
"partition": 0.8
}
},
{
"period": "2022-07-01",
"value": {
"passengers": {
"confirmed": 18,
"canceled": 11,
"total": 29
},
"days_in_advance": {
"booking": 118.7,
"cancellation": 107.0
},
"partition": 0.8
}
}
]
}
],
"paging": {
"last": "/bookings/arrivals/series/grouped?page=1&page_size=25&iata_departure_code=flr&period=month&compare_series_to=2021-07-31&from=2022-02-01&series_from=2022-06-01&group_type=trip_type&group_type=flight_type&to=2022-03-31&compare_series_from=2021-06-01&series_to=2022-07-31",
"first": "/bookings/arrivals/series/grouped?page=1&page_size=25&iata_departure_code=flr&period=month&compare_series_to=2021-07-31&from=2022-02-01&series_from=2022-06-01&group_type=trip_type&group_type=flight_type&to=2022-03-31&compare_series_from=2021-06-01&series_to=2022-07-31",
"prev": null,
"next": null,
"current": "/bookings/arrivals/series/grouped?page=1&page_size=25&iata_departure_code=flr&period=month&compare_series_to=2021-07-31&from=2022-02-01&series_from=2022-06-01&group_type=trip_type&group_type=flight_type&to=2022-03-31&compare_series_from=2021-06-01&series_to=2022-07-31",
"pages": [
{
"number": 1,
"uri": "/bookings/arrivals/series/grouped?page=1&page_size=25&iata_departure_code=flr&period=month&compare_series_to=2021-07-31&from=2022-02-01&series_from=2022-06-01&group_type=trip_type&group_type=flight_type&to=2022-03-31&compare_series_from=2021-06-01&series_to=2022-07-31"
}
],
"elements": [
1,
2,
3,
4
],
"total": 4,
"size": 25
}
}