Skip to content

Leaderboard by owner

POST
/api/analytics/leaderboard
curl --request POST \
--url https://api.wink.travel/api/analytics/leaderboard \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Wink-Version: 2.0' \
--data '{ "currencyCode": "USD", "ownerIdentifier": "d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69" }'

Return the single leaderboard entry for one specific affiliate owner.

Wink-Version
string
default: 2.0.0
Allowed values: 2.0

Owner identifier used to look up the specific affiliate’s leaderboard entry

Media typeapplication/json

Request to retrieve the leaderboard position for a specific managing entity, displaying values in the specified currency.

object
currencyCode
required

Display leaderboard values in this currency

string
default: USD >= 1 characters /^[A-Z]{3}$/

Example

USD
ownerIdentifier
required

Managing entity identifier to track on a leaderboard

string format: uuid
>= 1 characters

Example

d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69

Example

{
"currencyCode": "USD",
"ownerIdentifier": "d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69"
}

Leaderboard entry for the specified affiliate owner

Media typeapplication/json

A single entry on the booking leaderboard, representing a managing entity’s booking performance including volume and revenue metrics.

object
averageBookingAmount
required

Average booking value in the display currency.

number
bookings
required

Total number of bookings for this entity.

integer format: int64
city

City of the managing entity.

string
cityGeoNameId

GeoName ID for the city.

string
continent

Continent of the managing entity.

string
country

Country of the managing entity.

string
countryGeoNameId

GeoName ID for the country.

string
currencyCode
required

Currency code for the monetary amounts.

string
/^[A-Z]{3}$/
ownerIdentifier
required

Unique identifier of the managing entity (owner) on the leaderboard.

string format: uuid
ownerName
required

Display name of the managing entity.

string
totalPriceAmount
required

Total revenue from bookings in the display currency.

number

Example

{
"averageBookingAmount": 1500,
"bookings": 42,
"city": "Bangkok",
"cityGeoNameId": "1609350",
"continent": "Asia",
"country": "Thailand",
"countryGeoNameId": "1605651",
"currencyCode": "THB",
"ownerIdentifier": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51",
"ownerName": "The Siam Residences",
"totalPriceAmount": 63000
}

Bad Request — missing or invalid request parameter or body

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

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Unauthorized — authentication is required or the session has expired

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

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Forbidden — authenticated but lacking the required permission or scope

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

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Not Found — the requested resource does not exist

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

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

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

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

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Conflict — the resource was modified by someone else since you read it; re-read it and retry with the new version

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

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Unsupported Media Type — use application/json

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

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Internal Server Error — an unexpected failure occurred on the server

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

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Service Unavailable — a downstream dependency is unreachable

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

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}