Skip to content

Shareable link sparklines

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

Returns the daily clicks of every shareable link the managing entity owns over the last 7, 30 or 90 days, keyed by link, in one response so a list of links needs one request, not one per link. Each series has one point per day of the window, oldest first, zero on a day without a click. A link with no click in the window is absent: draw it flat. Shares and views are not counted. Requires ANALYTICS:READ permission.

managingEntityIdentifier
required
string

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_7_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_7_DAYS
Wink-Version
string
default: 2.0.0
Allowed values: 2.0

The daily clicks of each link that had any over the window

Media typeapplication/json

The daily clicks of every link an owner has over a window, keyed by link. A link with no clicks in the window is absent.

object
clicksByLink
required

Clicks per UTC day for each link that had any, keyed by the link’s entity identifier (the TransactionalUrl id). Every series has one point per day of the window, oldest first, zero on a day without a click.

object
key
additional properties
Array<integer>
endDate
required

End of the window (UTC): the moment the figures were read, during the last day.

string format: date-time
period
required

The window the series cover.

string
Allowed values: LAST_7_DAYS LAST_30_DAYS LAST_90_DAYS
startDate
required

Start of the window (UTC): midnight of the first day, which is the first point of every series.

string format: date-time

Example

{
"period": "LAST_7_DAYS"
}

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