Skip to content

Shareable link analytics

GET
/api/managing-entity/{managingEntityIdentifier}/studio/analytics/shares/transactional-url/{transactionalUrlIdentifier}
curl --request GET \
--url 'https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/studio/analytics/shares/transactional-url/b7e4c1a2-3f5d-4e8a-9c21-6f0b5d8e3a47?period=LAST_30_DAYS' \
--header 'Authorization: Bearer <token>' \
--header 'Wink-Version: 2.0'

Returns one shareable link’s clicks and shares over the last 7, 30 or 90 days: totals, a daily chart, shares by platform, and the top referrers and countries; requires ANALYTICS:READ permission. Events are matched to the managing entity as well as the link, so another account’s link reads as empty. Views are not included: a link opened directly records a click and no view, so the two cannot be compared. Clicks and shares recorded before links were tracked individually are not attributed to any link.

managingEntityIdentifier
required
string

Managing entity identifier (UUID)

Example

d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69
transactionalUrlIdentifier
required
string

Shareable link (TransactionalUrl) identifier (UUID)

Example

b7e4c1a2-3f5d-4e8a-9c21-6f0b5d8e3a47
period

Window a single link’s analytics is read over: the last 7, 30 or 90 days, today included.

string
default: LAST_30_DAYS
Allowed values: LAST_7_DAYS LAST_30_DAYS LAST_90_DAYS

The window: LAST_7_DAYS, LAST_30_DAYS or LAST_90_DAYS

Example

LAST_30_DAYS
Wink-Version
string
default: 2.0.0
Allowed values: 2.0

The link’s clicks and shares over the window

Media typeapplication/json

One link’s clicks, shares and bookings over a window: totals, a daily chart and the top platforms, referrers and countries.

object
attributionSince

When bookings started carrying a source (the analytics.booking-source.tracking-since setting); earlier bookings are not attributed. Null only when source tracking is off.

string format: date-time
bookingRevenue
required

Revenue of the attributed bookings. Test bookings are excluded.

object
amount
required

The amount, two decimals.

number
currency
required

ISO 4217 currency code.

string
bookings
required

Bookings attributed to the link. Test bookings are excluded. Bookings made through this link, not guaranteed de-duplicated if a booking event is redelivered.

integer format: int64
cancellations
required

Attributed bookings that were cancelled. Test bookings are excluded. Counted in the window the cancellation happened, so a window’s bookings minus cancellations can be negative; derive no rate from them.

integer format: int64
cancelledRevenue
required

Revenue of the attributed bookings that were cancelled. Test bookings are excluded. Counted in the window the cancellation happened, so a window’s bookings minus cancellations can be negative; derive no rate from them.

object
amount
required

The amount, two decimals.

number
currency
required

ISO 4217 currency code.

string
chart
required

Daily clicks and shares across the window.

object
currencyCode

ISO 4217 currency of the money values plotted on this chart. Null on charts that plot only counts. A chart that mixes money and count series carries the currency for its money series only.

string | null
/^[A-Z]{3}$/
identifier
required

Unique line chart identifier

string format: uuid
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
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>
name
required

The name of the Chart series which is visible in the legend.

string
title
required

The configuration options for the chart title

object
text
required

The text content of the chart title.

string
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>
clicks
required

Clicks in the window.

integer format: int64
countries
required

Top visitor countries by clicks plus shares.

Array<object>

One row of a link’s clicks and shares broken down by a dimension (platform, referrer or country).

object
clicks
required

Clicks in this row.

integer format: int64
key
required

The dimension value: a platform name, a referrer, or a country GeoName id. unknown for events that recorded none; the client translates it.

string
label
required

Display name for the key; the key itself when the dimension has no separate name.

string
shares
required

Shares in this row.

integer format: int64
endDate
required

End of the window (UTC).

string format: date-time
entityIdentifier
required

The entity the link points at (the TransactionalUrl id).

string format: uuid
period
required

The window the figures cover.

string
Allowed values: LAST_7_DAYS LAST_30_DAYS LAST_90_DAYS
platforms
required

Shares by platform, most first.

Array<object>

One row of a link’s clicks and shares broken down by a dimension (platform, referrer or country).

object
clicks
required

Clicks in this row.

integer format: int64
key
required

The dimension value: a platform name, a referrer, or a country GeoName id. unknown for events that recorded none; the client translates it.

string
label
required

Display name for the key; the key itself when the dimension has no separate name.

string
shares
required

Shares in this row.

integer format: int64
referrers
required

Top referrers by clicks plus shares.

Array<object>

One row of a link’s clicks and shares broken down by a dimension (platform, referrer or country).

object
clicks
required

Clicks in this row.

integer format: int64
key
required

The dimension value: a platform name, a referrer, or a country GeoName id. unknown for events that recorded none; the client translates it.

string
label
required

Display name for the key; the key itself when the dimension has no separate name.

string
shares
required

Shares in this row.

integer format: int64
shares
required

Shares in the window.

integer format: int64
startDate
required

Start of the window (UTC).

string format: date-time
views
required

Views of the link’s page.

integer format: int64
visits
required

Visits that reached the booking engine through the link.

integer format: int64

Example

{
"bookingRevenue": {
"amount": 1805,
"currency": "USD"
},
"bookings": 5,
"cancellations": 1,
"cancelledRevenue": {
"amount": 1805,
"currency": "USD"
},
"chart": {
"currencyCode": "THB",
"identifier": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51",
"legend": {
"data": [
"Revenue",
"Refunds"
]
},
"series": [
{
"data": [
120000,
95000,
148000,
210000,
175000,
230000
],
"name": "Revenue"
},
{
"data": [
5000,
3200,
7800,
4100,
6500,
2900
],
"name": "Refunds"
}
],
"title": {
"text": "Monthly Booking Revenue"
},
"xAxis": {
"data": [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun"
]
}
},
"clicks": 120,
"countries": [
{
"clicks": 12,
"key": "facebook",
"label": "facebook",
"shares": 3
}
],
"platforms": [
{
"clicks": 12,
"key": "facebook",
"label": "facebook",
"shares": 3
}
],
"referrers": [
{
"clicks": 12,
"key": "facebook",
"label": "facebook",
"shares": 3
}
],
"shares": 14,
"views": 0,
"visits": 80
}

The period is not one of LAST_7_DAYS, LAST_30_DAYS or LAST_90_DAYS

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"
}