Create saved chart
const url = 'https://api.wink.travel/api/chart';const options = { method: 'POST', headers: { 'Wink-Version': '2.0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"name":"","sort":-1,"details":""}'};
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/chart \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data '{ "name": "", "sort": -1, "details": "" }'Creates and persists a new analytics chart owned by the authenticated user with the specified name, sort priority, and visualization configuration.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”object
Display name for this analytics view
Example
The Siam Residences - Monthly Revenue TrendsSort priority for organizing saved charts. Lower values appear first.
Example
0Chart visualization configuration and filters
object
Time series granularity for data aggregation
Example
MONTHNumber of time-series units to visualize (e.g., last 12 months). Required if startDate and endDate are not provided.
Example
12Inclusive start of the analysis period. Required if timeSeriesUnits is not provided.
Example
2026-01-14T09:30:00Inclusive end of the analysis period. Required if timeSeriesUnits is not provided.
Example
2026-02-03T16:45:12Filter analytics to a single property by identifier and name
object
The value that should be persisted.
Example
id-1English readable text of the value.
Example
Readable text labelFilter by affiliate channel type (e.g., direct booking engine, OTA, travel agent)
Example
APPLICATIONFilter by affiliate/seller identifier and name
object
The value that should be persisted.
Example
id-1English readable text of the value.
Example
Readable text labelFilter by the customization’s origin country (GeoName ID and name)
object
The value that should be persisted.
Example
id-1English readable text of the value.
Example
Readable text labelFilter by the customization’s origin city (GeoName ID and name)
object
The value that should be persisted.
Example
id-1English readable text of the value.
Example
Readable text labelFilter by the customization’s origin continent
object
The value that should be persisted.
Example
id-1English readable text of the value.
Example
Readable text labelFilter by a specific customization/booking engine (identifier and name)
object
The value that should be persisted.
Example
id-1English readable text of the value.
Example
Readable text labelFilter by booker’s country of origin (GeoName ID and name)
object
The value that should be persisted.
Example
id-1English readable text of the value.
Example
Readable text labelFilter by booker’s city of origin (GeoName ID and name)
object
The value that should be persisted.
Example
id-1English readable text of the value.
Example
Readable text labelFilter by booker’s continent of origin
object
The value that should be persisted.
Example
id-1English readable text of the value.
Example
Readable text labelFilter to a specific authenticated booker by user identifier
object
The value that should be persisted.
Example
id-1English readable text of the value.
Example
Readable text labelInclude property page view count in results
Example
trueInclude map marker interaction count in results
Example
trueInclude property card interaction count in results
Example
falseInclude booking count metric in results
Example
trueInclude cancellation count metric in results
Example
falseInclude total room nights booked in results
Example
trueInclude meeting room booking count in results
Example
falseInclude meeting room revenue in results
Example
falseInclude restaurant booking count in results
Example
falseInclude restaurant revenue in results
Example
falseInclude spa booking count in results
Example
falseInclude spa revenue in results
Example
falseInclude activity booking count in results
Example
falseInclude activity revenue in results
Example
falseInclude attraction booking count in results
Example
trueInclude attraction revenue in results
Example
trueInclude place booking count in results
Example
falseInclude place revenue in results
Example
falseInclude room package count in results
Example
falseInclude room package revenue in results
Example
falseInclude add-on item count in results
Example
falseInclude add-on revenue in results
Example
falseInclude total room/lodging revenue in results
Example
trueInclude average room rate (revenue per room night) in results
Example
falseInclude combined ancillary revenue (packages and add-ons) in results
Example
falseInclude total net revenue (room + ancillaries after commissions) in results
Example
trueInclude cancelled room night count in results
Example
falseInclude cancelled meeting room count in results
Example
falseInclude cancelled meeting room revenue in results
Example
falseInclude cancelled restaurant count in results
Example
falseInclude cancelled restaurant revenue in results
Example
falseInclude cancelled spa count in results
Example
falseInclude cancelled spa revenue in results
Example
falseInclude cancelled activity count in results
Example
falseInclude cancelled activity revenue in results
Example
falseInclude cancelled attraction count in results
Example
falseInclude cancelled attraction revenue in results
Example
falseInclude cancelled place count in results
Example
falseInclude cancelled place revenue in results
Example
falseInclude cancelled package count in results
Example
falseInclude cancelled package revenue in results
Example
falseInclude cancelled add-on count in results
Example
falseInclude cancelled add-on revenue in results
Example
falseInclude cancelled lodging revenue in results
Example
falseInclude combined cancelled ancillary revenue in results
Example
falseInclude total cancelled net revenue in results
Example
falseGroup results by affiliate channel type (e.g., direct vs. OTA)
Example
falseGroup results by affiliate/seller
Example
trueGroup results by customization’s origin country
Example
falseGroup results by customization’s origin city
Example
falseGroup results by customization’s origin continent
Example
falseGroup results by specific customization/booking engine
Example
falseGroup results by booker’s country of origin
Example
falseGroup results by booker’s city of origin
Example
falseGroup results by booker’s continent of origin
Example
falseGroup results by property
Example
falseGroup results by individual booker
Example
falseCurrency code for revenue display (e.g., USD, EUR, GBP, THB)
Example
USDResponses
Section titled “ Responses ”Created
object
Document UUID
Datetime this record was first created
Datetime this record was last updated
Version property that shows how many times this document has been persisted. Document will not persist if the version property is less than current version property in the system. Result in an optimistic locking exception.
Owner of this chart
Chart name as named by creator
Sort a list of charts by this sort value.
Chart settings
object
Time series granularity for data aggregation
Number of time-series units to visualize (e.g., last 12 months). Required if startDate and endDate are not provided.
Inclusive start of the analysis period. Required if timeSeriesUnits is not provided.
Inclusive end of the analysis period. Required if timeSeriesUnits is not provided.
Filter analytics to a single property by identifier and name
object
The value that should be persisted.
English readable text of the value.
Filter by affiliate channel type (e.g., direct booking engine, OTA, travel agent)
Filter by affiliate/seller identifier and name
object
The value that should be persisted.
English readable text of the value.
Filter by the customization’s origin country (GeoName ID and name)
object
The value that should be persisted.
English readable text of the value.
Filter by the customization’s origin city (GeoName ID and name)
object
The value that should be persisted.
English readable text of the value.
Filter by the customization’s origin continent
object
The value that should be persisted.
English readable text of the value.
Filter by a specific customization/booking engine (identifier and name)
object
The value that should be persisted.
English readable text of the value.
Filter by booker’s country of origin (GeoName ID and name)
object
The value that should be persisted.
English readable text of the value.
Filter by booker’s city of origin (GeoName ID and name)
object
The value that should be persisted.
English readable text of the value.
Filter by booker’s continent of origin
object
The value that should be persisted.
English readable text of the value.
Filter to a specific authenticated booker by user identifier
object
The value that should be persisted.
English readable text of the value.
Include property page view count in results
Include map marker interaction count in results
Include property card interaction count in results
Include booking count metric in results
Include cancellation count metric in results
Include total room nights booked in results
Include meeting room booking count in results
Include meeting room revenue in results
Include restaurant booking count in results
Include restaurant revenue in results
Include spa booking count in results
Include spa revenue in results
Include activity booking count in results
Include activity revenue in results
Include attraction booking count in results
Include attraction revenue in results
Include place booking count in results
Include place revenue in results
Include room package count in results
Include room package revenue in results
Include add-on item count in results
Include add-on revenue in results
Include total room/lodging revenue in results
Include average room rate (revenue per room night) in results
Include combined ancillary revenue (packages and add-ons) in results
Include total net revenue (room + ancillaries after commissions) in results
Include cancelled room night count in results
Include cancelled meeting room count in results
Include cancelled meeting room revenue in results
Include cancelled restaurant count in results
Include cancelled restaurant revenue in results
Include cancelled spa count in results
Include cancelled spa revenue in results
Include cancelled activity count in results
Include cancelled activity revenue in results
Include cancelled attraction count in results
Include cancelled attraction revenue in results
Include cancelled place count in results
Include cancelled place revenue in results
Include cancelled package count in results
Include cancelled package revenue in results
Include cancelled add-on count in results
Include cancelled add-on revenue in results
Include cancelled lodging revenue in results
Include combined cancelled ancillary revenue in results
Include total cancelled net revenue in results
Group results by affiliate channel type (e.g., direct vs. OTA)
Group results by affiliate/seller
Group results by customization’s origin country
Group results by customization’s origin city
Group results by customization’s origin continent
Group results by specific customization/booking engine
Group results by booker’s country of origin
Group results by booker’s city of origin
Group results by booker’s continent of origin
Group results by property
Group results by individual booker
Currency code for revenue display (e.g., USD, EUR, GBP, THB)
Example
{ "id": "", "createdDate": "", "lastUpdate": "", "version": "", "ownerIdentifier": "", "name": "", "sort": -1, "details": ""}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
{}