Skip to content

Aggregate bookings

POST
/api/managing-entity/{managingEntityIdentifier}/studio/booking/analytics
curl --request POST \
--url https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/studio/booking/analytics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Wink-Version: 2.0' \
--data null

Computes comprehensive booking and revenue analytics aggregated across all of the affiliate company’s properties over the specified period.

managingEntityIdentifier
required
string
""

Affiliate/company identifier (UUID)

Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69
Wink-Version
string
default: 2.0.0
Allowed values: 2.0

Analysis period and filters

Media type application/json

Request parameters for generating a booking overview analytics time series.

object
type
required

The type of time series that should be used

string
""
Allowed values: HOUR DAY MONTH YEAR
Example
MONTH
units

How many units of the timeseries type should be used

integer format: int64
""
Example
12
Example
{
"type": "MONTH",
"units": 12
}

Booking analytics aggregated across all properties of the affiliate company

Media type application/json

Analytics data for a property’s bookings, containing chart series for visualizing booking trends.

object
charts
required

Interesting property-level chart data overview

Array<object>
""

A line chart data structure containing an identifier, title, legend, one or more series of data points, and category axis configuration.

object
identifier
required

Unique line chart identifier

string format: uuid
""
title
required

The configuration options for the chart title

object
text
required

The text content of the chart title.

string
""
legend
required

The configuration options for the chart legend.

object
data
required

The legend labels, one entry per series.

Array<string>
series
required

The configuration of the chart series. The series type is determined by the value of the type field. If a type value is missing, the chart renders the type that is specified in seriesDefaults. Some options accept functions as arguments. These arguments are evaluated for each point which is supplied as a parameter. If no value is returned, the chart uses the theme or seriesDefaults values.

Array<object>

A named data series for a chart, pairing a display name with its array of numeric data points.

object
name
required

The name of the Chart series which is visible in the legend.

string
""
data
required

The array of data items which represent the series data.

You can set it to:

  • Array of numbers. Supported when the series.type option is set to area, bar, column, donut, pie, line, or waterfall. The Bubble series need arrays of three values—X value, Y value, and Size value—for example, [1, 1, 10]. The Scatter and ScatterLine series need arrays of two values—X value and Y value. The OHLC and Candlestick series need arrays of four values—open, high, low, and close. The RangeBar and RangeArea series need arrays of two values—the from and to value.
Array<number>
xAxis
required
Category axis

The configuration options of the category axis.

object
data
required

The category names. The Chart creates a category for every item of the array.

Array<string>
xaxis

Configuration options for the category (X) axis of the chart, including the list of category names.

object
data
required

The category names. The Chart creates a category for every item of the array.

Array<string>
key
additional properties
""
Example
{
"charts": [
{
"identifier": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51",
"title": {
"text": "Monthly Bookings"
},
"legend": {
"data": [
"Bookings"
]
},
"series": [
{
"name": "Bookings",
"data": [
12,
18,
25,
30,
22,
40
]
}
],
"xAxis": {
"data": [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun"
]
}
}
]
}

Bad Request — missing or invalid request parameter or body

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Unauthorized — authentication is required or the session has expired

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Forbidden — authenticated but lacking the required permission or scope

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Not Found — the requested resource does not exist

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Method Not Allowed — the HTTP verb is not supported on this endpoint

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Unsupported Media Type — use application/json

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Internal Server Error — an unexpected failure occurred on the server

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Service Unavailable — a downstream dependency is unreachable

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example