Skip to content

Search charts

POST
/api/analytics/booking/grid
curl --request POST \
--url https://api.wink.travel/api/analytics/booking/grid \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Wink-Version: 2.0' \
--data null

Returns a paginated, filterable grid of the caller’s saved booking line charts.

Wink-Version
string
default: 2.0.0
Allowed values: 2.0

Grid filter and sort state for paginating booking analytics line charts

Media type application/json

Pagination, sorting, filtering, and grouping state used to query a paged result set.

object
skip

Number of records to be skipped by the pager.

integer format: int32
0
Example
0
take

Number of records to take.

integer format: int32
default: 30 >= 1 <= 180
Example
10
sort

Descriptors used for sorting result set.

Array<object>
""

Descriptor that defines the sort direction and field for ordering a result set.

object
dir

Descriptors used for sorting result set

string
""
Allowed values: asc desc
Example
asc
field

Data set field to sort on

string
""
Example
hotel.name
Example
{
"dir": "asc",
"field": "hotel.name"
}
filter

Descriptors used for filtering result set

object
logic

Whether to filter inclusively or exclusively

string
""
Allowed values: and or
Example
and
filters

Descriptors used for filtering the result set

Array<object>

A single field-level filter criterion that specifies what to match and how to compare it.

object
field
required

Field name to filter on

string
"" >= 1 characters
Example
hotel.name
operator
required

Filter operator to use on field

string
""
Allowed values: neq eq contains doesnotcontain isnull isnotnull isempty isnotempty startswith endswith gte lte gt lt in nin
Example
startsWith
value

Value to filter dataset against

""
Example
Happy Res
ignoreCase

Make filter comparison case insensitive. Default: Case sensitive

boolean
Example
true
Example
{
"field": "hotel.name",
"operator": "startsWith",
"value": "Happy Res",
"ignoreCase": true
}
Example
{
"logic": "and",
"filters": [
{
"field": "hotel.name",
"operator": "startsWith",
"value": "Happy Res",
"ignoreCase": true
}
]
}
group

Descriptors to group result sets by.

Array<object>
""

Descriptor that defines how a result set should be grouped, including sort direction and optional aggregate calculations.

object
field

Field to group data set on

string
""
Example
createdDate
dir

Group sort direction

string
""
Allowed values: asc desc
Example
asc
aggregates

Primitive aggregate data points

Array<object>

Descriptor that defines an aggregate function to apply to a specific field in a grouped result set.

object
field

Field to run aggregate function on

string
""
Example
hotel.bookings
aggregate

Aggregate function

string
""
Allowed values: count sum average min max
Example
count
Example
{
"field": "hotel.bookings",
"aggregate": "count"
}
Example
{
"field": "createdDate",
"dir": "asc",
"aggregates": [
{
"field": "hotel.bookings",
"aggregate": "count"
}
]
}
Example
{
"skip": 0,
"take": 10,
"sort": [
{
"dir": "asc",
"field": "hotel.name"
}
],
"filter": {
"logic": "and",
"filters": [
{
"field": "hotel.name",
"operator": "startsWith",
"value": "Happy Res",
"ignoreCase": true
}
]
},
"group": [
{
"field": "createdDate",
"dir": "asc",
"aggregates": [
{
"field": "hotel.bookings",
"aggregate": "count"
}
]
}
]
}

Paginated list of matching line charts. Pagination metadata (total, page, size) is in the Page wrapper.

Media type application/json

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
{
"identifier": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51",
"title": {
"text": "Monthly Booking Revenue"
},
"legend": {
"data": [
"Revenue",
"Refunds"
]
},
"series": [
{
"name": "Revenue",
"data": [
120000,
95000,
148000,
210000,
175000,
230000
]
},
{
"name": "Refunds",
"data": [
5000,
3200,
7800,
4100,
6500,
2900
]
}
],
"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