Booking Metrics
const url = 'https://api.wink.travel/api/analytics/booking/grid';const options = { method: 'POST', headers: {'Wink-Version': '2.0', 'Content-Type': 'application/json'}, body: '{"skip":0,"take":30,"sort":"","filter":"","group":""}'};
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/analytics/booking/grid \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data '{ "skip": 0, "take": 30, "sort": "", "filter": "", "group": "" }'Show paginated analytics.
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”object
Number of records to be skipped by the pager.
Example
0Number of records to take.
Example
10Descriptors used for sorting result set.
object
Descriptors used for sorting result set
Example
ascData set field to sort on
Example
hotel.nameDescriptors used for filtering result set
object
Whether to filter inclusively or exclusively
Example
andDescriptors used for filtering the result set
object
Field name to filter on
Example
hotel.nameFilter operator to use on field
Example
startsWithValue to filter dataset against
Example
Happy ResMake filter comparison case insensitive. Default: Case sensitive
Example
trueDescriptors to group result sets by.
object
Field to group data set on
Example
createdDateGroup sort direction
Example
ascPrimitive aggregate data points
object
Field to run aggregate function on
Example
hotel.bookingsAggregate function
Example
countResponses
Section titled “ Responses ”OK
object
object
Unique line chart identifier
The configuration options for the chart title
object
The configuration options for the chart legend.
object
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.
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.
object
The category names. The Chart creates a category for every item of the array.
object
object
object
Example
{ "content": [ { "identifier": "", "title": "", "legend": "", "series": "", "xAxis": "", "xaxis": { "data": "" } } ]}Bad Request
object
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}object
object
object
object
object
object
object
object
Unauthorized
object
object
Forbidden
object
object
Internal Server Error
object
Example generated
{}