{"_id":"56f42457e2d47b0e005fe8db","parentDoc":null,"__v":2,"project":"568af724176a6c0d00a29ec4","editedParams":true,"editedParams2":true,"user":"568af6d197d8960d0012ab7d","version":{"_id":"568af725176a6c0d00a29ec7","project":"568af724176a6c0d00a29ec4","__v":11,"createdAt":"2016-01-04T22:50:13.289Z","releaseDate":"2016-01-04T22:50:13.289Z","categories":["568af725176a6c0d00a29ec8","56d9d397337fd11300d6a3e3","56d9d4287222d50b0070160b","56f424307ea0091700f63ac5","56f45babcb0dce29005a8e85","5739e5836c5ba134007a197d","57717aee3dd24019004c9122","5771b5d8c755ca0e00617d7d","579639964913990e001a5911","57e57e7df3d7fc0e009c5119","587569b6f4483a0f00d2e6b8"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"56f424307ea0091700f63ac5","version":"568af725176a6c0d00a29ec7","project":"568af724176a6c0d00a29ec4","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-03-24T17:30:24.236Z","from_sync":false,"order":6,"slug":"advanced-revenue-tracking","title":"Advanced Revenue Tracking"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-03-24T17:31:03.106Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"require 'httparty'\nparams = {\n  period: \"week\"\n  lastDate: \"2016/03/08\"\n  secret: \"<secret key>\"\n }\n\nurl = \"https://www.viglink.com/service/v1/cuidRevenue\"\n\n\nresponse = HTTParty.get(url, query: params)","language":"ruby"}]},"method":"get","results":{"codes":[{"name":"","code":"{\n    \"2016/03/08\": [\n        {\n            \"IRbKRLnYfU8CgRdHMvDENA\": 19.9125\n        },\n        {}\n    ],\n    \"2016/03/02\": [\n        {\n            \"IRbKRLnYfU8CgRdHMvDENA\": 29.25\n        },\n        {}\n    ],\n    \"2016/03/03\": [\n        {\n            \"IRbKRLnYfU8CgRdHMvDENA\": 30.15\n        },\n        {}\n    ],\n    \"2016/03/07\": [\n        {\n            \"IRbKRLnYfU8CgRdHMvDENA\": 11.6175\n        },\n        {}\n    ],\n    \"2016/03/04\": [\n        {\n            \"y79uR15x8mcHa8NwZjzvbw\": 2.46,\n            \"IRbKRLnYfU8CgRdHMvDENA\": 11.475\n        },\n        {}\n    ],\n    \"2016/03/05\": [\n        {\n            \"IRbKRLnYfU8CgRdHMvDENA\": 0\n        },\n        {}\n    ]\n}","language":"json","status":200}]},"settings":"56f422f83d35720e00ba97f2","auth":"required","params":[{"_id":"56f424767ea0091700f63ac7","ref":"","in":"query","required":false,"desc":"The time period of the report. Values can be \"day\", \"week\", or \"month\".  *Required","default":"none","type":"string","name":"period"},{"_id":"56f4252054c3ff2000533fd4","ref":"","in":"query","required":false,"desc":"The last date for which data should be returned. lastDate is compared to revenue posting date rather than click or transaction - YYYY/MM/DD  *Required","default":"none","type":"string","name":"lastDate"},{"_id":"56f4252054c3ff2000533fd3","ref":"","in":"query","required":false,"desc":"Used for authentication, this is the “secret key” found on your account page.  *Required","default":"none","type":"string","name":"secret"}],"url":"/cuidRevenue"},"isReference":false,"order":1,"body":"##**Documentation**\nAll Viglink Link Monetization API requests start with \"https://www.viglink.com/service/v1/cuidRevenue\"\n\n##**Rate Limit**\nThere is no rate limit at the moment.\n\n##**Authorization**\nThere is no additional authorization needed besides including your Secret key as a query parameter. When logged into your dashboard, go to manage >> [account](https://publishers.viglink.com/account). Under the My Campaigns sub-heading, copy the Secret Key: \n\n##  **Sample call:**\n\n**Command Line**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ curl -D - 'https://www.viglink.com/service/v1/cuidRevenue?lastDate=2016%2F03%2F02&period=week&secret={SECRET KEY}'\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n**Ruby (Using HTTParty Gem)**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"require 'httparty'\\nparams = {\\n  period = \\\"week\\\"\\n\\tlastDate = \\\"2016/03/08\\\"\\n\\tsecret = \\\"<SECRET KEY>\\\"\\n }\\n\\nurl = \\\"https://www.viglink.com/service/v1/cuidRevenue\\\"\\n\\n\\nresponse = HTTParty.get(url, query: params)\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\n##  **Sample Response:**\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"2016/03/08\\\": [\\n        {\\n            \\\"IRbKRLnYfU8CgRdHMvDENA\\\": 19.9125\\n        },\\n        {}\\n    ],\\n    \\\"2016/03/02\\\": [\\n        {\\n            \\\"IRbKRLnYfU8CgRdHMvDENA\\\": 29.25\\n        },\\n        {}\\n    ],\\n    \\\"2016/03/03\\\": [\\n        {\\n            \\\"IRbKRLnYfU8CgRdHMvDENA\\\": 30.15\\n        },\\n        {}\\n    ],\\n    \\\"2016/03/07\\\": [\\n        {\\n            \\\"IRbKRLnYfU8CgRdHMvDENA\\\": 11.6175\\n        },\\n        {}\\n    ],\\n    \\\"2016/03/04\\\": [\\n        {\\n            \\\"y79uR15x8mcHa8NwZjzvbw\\\": 2.46,\\n            \\\"IRbKRLnYfU8CgRdHMvDENA\\\": 11.475\\n        },\\n        {}\\n    ],\\n    \\\"2016/03/05\\\": [\\n        {\\n            \\\"IRbKRLnYfU8CgRdHMvDENA\\\": 0\\n        },\\n        {}\\n    ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"VigLink's CUID (Customer Unique Identifier) API allows you to identify the clicker; the page the link is on; the campaign; or the click itself.","slug":"cuid-revenue-tracking","type":"endpoint","title":"CUID Revenue Tracking API"}

getCUID Revenue Tracking API

VigLink's CUID (Customer Unique Identifier) API allows you to identify the clicker; the page the link is on; the campaign; or the click itself.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

period:
stringnone
The time period of the report. Values can be "day", "week", or "month". *Required
lastDate:
stringnone
The last date for which data should be returned. lastDate is compared to revenue posting date rather than click or transaction - YYYY/MM/DD *Required
secret:
stringnone
Used for authentication, this is the “secret key” found on your account page. *Required

Examples


Result Format


Documentation

##**Documentation** All Viglink Link Monetization API requests start with "https://www.viglink.com/service/v1/cuidRevenue" ##**Rate Limit** There is no rate limit at the moment. ##**Authorization** There is no additional authorization needed besides including your Secret key as a query parameter. When logged into your dashboard, go to manage >> [account](https://publishers.viglink.com/account). Under the My Campaigns sub-heading, copy the Secret Key: ## **Sample call:** **Command Line** [block:code] { "codes": [ { "code": "$ curl -D - 'https://www.viglink.com/service/v1/cuidRevenue?lastDate=2016%2F03%2F02&period=week&secret={SECRET KEY}'", "language": "curl" } ] } [/block] **Ruby (Using HTTParty Gem)** [block:code] { "codes": [ { "code": "require 'httparty'\nparams = {\n period = \"week\"\n\tlastDate = \"2016/03/08\"\n\tsecret = \"<SECRET KEY>\"\n }\n\nurl = \"https://www.viglink.com/service/v1/cuidRevenue\"\n\n\nresponse = HTTParty.get(url, query: params)", "language": "ruby" } ] } [/block] ## **Sample Response:** [block:code] { "codes": [ { "code": "{\n \"2016/03/08\": [\n {\n \"IRbKRLnYfU8CgRdHMvDENA\": 19.9125\n },\n {}\n ],\n \"2016/03/02\": [\n {\n \"IRbKRLnYfU8CgRdHMvDENA\": 29.25\n },\n {}\n ],\n \"2016/03/03\": [\n {\n \"IRbKRLnYfU8CgRdHMvDENA\": 30.15\n },\n {}\n ],\n \"2016/03/07\": [\n {\n \"IRbKRLnYfU8CgRdHMvDENA\": 11.6175\n },\n {}\n ],\n \"2016/03/04\": [\n {\n \"y79uR15x8mcHa8NwZjzvbw\": 2.46,\n \"IRbKRLnYfU8CgRdHMvDENA\": 11.475\n },\n {}\n ],\n \"2016/03/05\": [\n {\n \"IRbKRLnYfU8CgRdHMvDENA\": 0\n },\n {}\n ]\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}