Aggregate bookings
const url = 'https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/studio/booking/analytics';const options = { method: 'POST', headers: { 'Wink-Version': '2.0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: 'null'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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 nullComputes comprehensive booking and revenue analytics aggregated across all of the affiliate company’s properties over the specified period.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Affiliate/company identifier (UUID)
Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”Analysis period and filters
Request parameters for generating a booking overview analytics time series.
object
The type of time series that should be used
Example
MONTHHow many units of the timeseries type should be used
Example
12Example
{ "type": "MONTH", "units": 12}Responses
Section titled “ Responses ”Booking analytics aggregated across all properties of the affiliate company
Analytics data for a property’s bookings, containing chart series for visualizing booking trends.
object
Interesting property-level chart data overview
A line chart data structure containing an identifier, title, legend, one or more series of data points, and category axis configuration.
object
Unique line chart identifier
The configuration options for the chart title
object
The text content of the chart title.
The configuration options for the chart legend.
object
The legend labels, one entry per series.
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.
A named data series for a chart, pairing a display name with its array of numeric data points.
object
The name of the Chart series which is visible in the legend.
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, orwaterfall. 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.
The configuration options of the category axis.
object
The category names. The Chart creates a category for every item of the array.
Configuration options for the category (X) axis of the chart, including the list of category names.
object
The category names. The Chart creates a category for every item of the array.
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
object
object
Example
Unauthorized — authentication is required or the session has expired
object
object
Example
Forbidden — authenticated but lacking the required permission or scope
object
object
Example
Not Found — the requested resource does not exist
object
object
Example
Method Not Allowed — the HTTP verb is not supported on this endpoint
object
object
Example
Unsupported Media Type — use application/json
object
object
Example
Internal Server Error — an unexpected failure occurred on the server
object
object
Example
Service Unavailable — a downstream dependency is unreachable