{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/cuidRevenue","auth":"required","examples":{"codes":[{"language":"ruby","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)"}]},"method":"get","params":[{"name":"period","type":"string","default":"none","desc":"The time period of the report. Values can be \"day\", \"week\", or \"month\".  *Required","required":false,"in":"query","ref":"","_id":"56f424767ea0091700f63ac7"},{"name":"lastDate","type":"string","default":"none","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","required":false,"in":"query","ref":"","_id":"56f4252054c3ff2000533fd4"},{"name":"secret","type":"string","default":"none","desc":"Used for authentication, this is the “secret key” found on your account page.  *Required","required":false,"in":"query","ref":"","_id":"56f4252054c3ff2000533fd3"}],"results":{"codes":[{"status":200,"language":"json","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}","name":""}]},"settings":"56f422f83d35720e00ba97f2"},"next":{"description":"","pages":[]},"title":"CUID Revenue Tracking API","type":"endpoint","slug":"cuid-revenue-tracking","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.","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]","updates":[],"order":1,"isReference":false,"hidden":true,"sync_unique":"","link_url":"","link_external":false,"_id":"56f42457e2d47b0e005fe8db","githubsync":"","parentDoc":null,"__v":3,"project":"568af724176a6c0d00a29ec4","editedParams":true,"editedParams2":true,"user":"568af6d197d8960d0012ab7d","version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["568af725176a6c0d00a29ec8","56d9d397337fd11300d6a3e3","56d9d4287222d50b0070160b","56f424307ea0091700f63ac5","56f45babcb0dce29005a8e85","5739e5836c5ba134007a197d","57717aee3dd24019004c9122","5771b5d8c755ca0e00617d7d","579639964913990e001a5911","57e57e7df3d7fc0e009c5119","587569b6f4483a0f00d2e6b8","5ca3c2274439e800149daf96"],"_id":"568af725176a6c0d00a29ec7","project":"568af724176a6c0d00a29ec4","releaseDate":"2016-01-04T22:50:13.289Z","__v":12,"createdAt":"2016-01-04T22:50:13.289Z"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Advanced Revenue Tracking","slug":"advanced-revenue-tracking","order":6,"from_sync":false,"reference":false,"_id":"56f424307ea0091700f63ac5","version":"568af725176a6c0d00a29ec7","project":"568af724176a6c0d00a29ec4","createdAt":"2016-03-24T17:30:24.236Z","__v":0},"createdAt":"2016-03-24T17:31:03.106Z"}

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