Leaderboard by owner
const url = 'https://api.wink.travel/api/analytics/leaderboard';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/analytics/leaderboard \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data nullReturn the single leaderboard entry for one specific affiliate owner.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”Owner identifier used to look up the specific affiliate’s leaderboard entry
Request to retrieve the leaderboard position for a specific managing entity, displaying values in the specified currency.
object
Display leaderboard values in this currency
Example
USDManaging entity identifier to track on a leaderboard
Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69Example
{ "currencyCode": "USD", "ownerIdentifier": "d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69"}Responses
Section titled “ Responses ”Leaderboard entry for the specified affiliate owner
A single entry on the booking leaderboard, representing a managing entity’s booking performance including volume and revenue metrics.
object
Unique identifier of the managing entity (owner) on the leaderboard.
Display name of the managing entity.
Continent of the managing entity.
Country of the managing entity.
GeoName ID for the country.
City of the managing entity.
GeoName ID for the city.
Total number of bookings for this entity.
Total revenue from bookings in the display currency.
Average booking value in the display currency.
Currency code for the monetary amounts.
Example
{ "ownerIdentifier": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51", "ownerName": "The Siam Residences", "continent": "Asia", "country": "Thailand", "countryGeoNameId": "1605651", "city": "Bangkok", "cityGeoNameId": "1609350", "bookings": 42, "totalPriceAmount": 63000, "averageBookingAmount": 1500, "currencyCode": "THB"}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