Skip to content

Bookings by source

GET
/api/managing-entity/{managingEntityIdentifier}/studio/analytics/bookings/by-source
curl --request GET \
--url 'https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/studio/analytics/bookings/by-source?period=LAST_30_DAYS' \
--header 'Authorization: Bearer <token>' \
--header 'Wink-Version: 2.0'

Returns visits, bookings, cancellations and revenue per booking source (LINK, BOOK_NOW_LINK, EMBED_REDIRECT, EMBED_MODAL, MCP_AGENT, WINKLINKS) over the last 7, 30 or 90 days; requires ANALYTICS:READ permission. The path managing entity is the source owner, and what that means differs per source: the link’s owner for LINK, the account for BOOK_NOW_LINK, the hotel’s managing entity for EMBED_REDIRECT, the customization’s owner for EMBED_MODAL and MCP_AGENT, and the WinkLinks page’s account for WINKLINKS. Only attributed sources are listed: DIRECT and unstamped bookings carry no source owner and cannot be reached per owner without a full scan, so a screen compares the attributed total with the existing booking analytics total. The figures are a floor and unverified, because a source claim is unauthenticated within a hotel. The window is capped at 90 days and revenue is in USD. attributionSince is the moment bookings started carrying a source; it is null when tracking is off, and earlier bookings are not attributed.

managingEntityIdentifier
required
string

Source owner (managing entity) identifier (UUID)

Example

d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69
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 owner’s attributed bookings per source over the window

Media typeapplication/json

An account’s bookings over a window, split by the source they came through.

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
endDate
required

End of the window (UTC).

string format: date-time
period
required

The window the figures cover.

string
Allowed values: LAST_7_DAYS LAST_30_DAYS LAST_90_DAYS
sources
required

Totals per booking source.

Array<object>

Visits, bookings, cancellations and their revenue for one booking source.

object
bookingRevenue
required

Revenue of the bookings made. Test bookings are excluded.

object
amount
required

The amount, two decimals.

number
currency
required

ISO 4217 currency code.

string
bookings
required

Bookings made through this source. Test bookings are excluded. Bookings recorded, not guaranteed de-duplicated if a booking event is redelivered.

integer format: int64
cancellations
required

Bookings through this source 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 bookings 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
source
required

The channel the bookings came through.

string
Allowed values: LINK BOOK_NOW_LINK EMBED_REDIRECT EMBED_MODAL MCP_AGENT DIRECT WINKLINKS
visits
required

Visits that reached the booking engine through this source.

integer format: int64
startDate
required

Start of the window (UTC).

string format: date-time

Example

{
"sources": [
{
"bookingRevenue": {
"amount": 1805,
"currency": "USD"
},
"bookings": 12,
"cancellations": 2,
"cancelledRevenue": {
"amount": 1805,
"currency": "USD"
},
"visits": 300
}
]
}

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