Shareable link sparklines
const url = 'https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/studio/analytics/shares/transactional-url/sparklines?period=LAST_7_DAYS';const options = { method: 'GET', headers: {'Wink-Version': '2.0', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Managing entity identifier (UUID)
Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69Query Parameters
Section titled “Query Parameters”Window a single link’s analytics is read over: the last 7, 30 or 90 days, today included.
The window: LAST_7_DAYS, LAST_30_DAYS or LAST_90_DAYS
Example
LAST_7_DAYSHeader Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”The daily clicks of each link that had any over the window
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
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
End of the window (UTC): the moment the figures were read, during the last day.
The window the series cover.
Start of the window (UTC): midnight of the first day, which is the first point of every series.
Example
{ "period": "LAST_7_DAYS"}The period is not one of LAST_7_DAYS, LAST_30_DAYS or LAST_90_DAYS
object
object
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
object
object
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
object
object
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
object
object
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
object
object
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
object
object
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
object
object
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
object
object
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
object
object
Example generated
{ "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }, "status": 1, "title": "example", "type": "https://example.com"}