{"__v":7,"_id":"54d309f42ce0e00d00751632","category":{"__v":2,"_id":"54d309955616470d0013cc55","pages":["54d309f42ce0e00d00751632","56b36ff3ce8e5a1700f7c3e0"],"project":"542998547a6b69080076806e","version":"542998547a6b690800768071","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-02-05T06:11:33.180Z","from_sync":false,"order":9999,"slug":"api-access","title":"API Access"},"editedParams":true,"editedParams2":true,"parentDoc":null,"project":"542998547a6b69080076806e","user":"542998207a6b690800768069","version":{"__v":9,"_id":"542998547a6b690800768071","project":"542998547a6b69080076806e","createdAt":"2014-09-29T17:35:16.249Z","releaseDate":"2014-09-29T17:35:16.249Z","categories":["542998547a6b690800768072","5433027990d63b1c0030c0f1","5433028190d63b1c0030c0f2","5433028d9a2b451a00ad4508","5433055790d63b1c0030c10a","5461417d37e5bc200049e1e4","54624066ddd31b0800a58db4","54625de66d1f1010002f3901","54d309955616470d0013cc55"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":["561bba43c89cc30d008215e7","561bbb71f619210d00a85c80","563d0ce48894d20d00014f29","57811a019a9ff80e0051bf22","5781286d6f4c1d200064e0c6"],"next":{"pages":[],"description":""},"createdAt":"2015-02-05T06:13:08.980Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"name":"","code":"","language":"text"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"Public\":\t[\n    {\n      \"OfferID\":162836,\n      \"OfferType\":\"free\",\n      \"Title\":\"VIP Voice\",\n      \"Description\":\"Take Surveys. Get Rewarded!\",\n      \"Steps\":\"Credits awarded upon completing full registration and completing one or more surveys.\",\n      \"Logo\":\"http:\\/\\/assets.superrewards-offers.com\\/assets\\/54cc1bb8efa6c.jpg\",\n      \"EarnPoints\":75,\n      \"EarnText\":\"75 credits\",\n      \"PointsLabel\":\"credits\",\n      \"ClickURL\":\"\\/super\\/go?h=rylsgzpgamykmmhjylbjzgqpnloxbnorpxpjdhacmfkohpjkcoismzmsjpjkplqrnjpgauyzxyhxd.543241745786&r=&cs=76&sl=4\",\n      \"CommitmentLevel\":1,\n      \"CommitmentLevelText\":\"No purchase required to receive 75 credits\",\n      \"CommitmentShortText\":\"Free\",\n      \"CommitmentEnglish\":\"free\",\n      \"CompletedCount\":351,\n      \"TimeToCompletion\":\"Credits within <b>15 minutes<\\/b>\",\n    }\n  ],\n  \"ErrorCode\":\"\",\n  \"ErrorMessage\":\"\",\n  \"HTTPResponseCode\":200\n}","name":""},{"status":400,"language":"json","code":"{\n    \"Offers\": [],\n    \"ErrorCode\": \"400v0\",\n    \"ErrorMessage\": \"INVALID REQUEST: No arguments passed\",\n    \"HTTPResponseCode\": 400\n}","name":""}]},"settings":"","auth":"never","params":[{"_id":"54d309f42ce0e00d00751633","ref":"","in":"query","required":true,"desc":"App hash","default":"icfb","type":"string","name":"h"},{"_id":"54d30e03d0b2871900cda6b9","ref":"","in":"query","required":true,"desc":"Unique User ID in your system.","default":"12340987","type":"int","name":"uid"},{"_id":"561458cf79fdd00d0085b1fb","ref":"","in":"query","required":true,"desc":"The user's IP address, so we can determine which offers to fetch based on geographic location","default":"","type":"string","name":"ip"},{"_id":"54d309f42ce0e00d00751635","ref":"","in":"query","required":false,"desc":"What offers to show","default":"all","type":"string","name":"mode"},{"_id":"54d30e03d0b2871900cda6b8","ref":"","in":"query","required":false,"desc":"The number of offers to return (per tab). Defaults to 30.","default":"30","type":"int","name":"n_offers"},{"_id":"54d309f42ce0e00d00751634","ref":"","in":"query","required":false,"desc":"When requesting paginated results, set to the page number you are requesting. 0 based. Defaults to 0 if not specified.","default":"0","type":"int","name":"page"},{"_id":"54d30e03d0b2871900cda6b7","ref":"","in":"query","required":false,"desc":"The 2 character language code of the user. This is normally detected, but you may pass this value to override the language or if acting as a proxy. See: http://en.wikipedia.org/wiki/IETF_language_tag","default":"en","type":"string","name":"lang"},{"_id":"54d30e03d0b2871900cda6b6","ref":"","in":"query","required":false,"desc":"Users age in years.","default":"","type":"int","name":"age"},{"_id":"54d30e03d0b2871900cda6b5","ref":"","in":"query","required":false,"desc":"The users gender (m or f)","default":"","type":"string","name":"gender"},{"_id":"54d30e03d0b2871900cda6b4","ref":"","in":"query","required":false,"desc":"List of comma separated tags to use to use as a filter for offers.","default":"","type":"string","name":"tags"},{"_id":"54d30e03d0b2871900cda6b3","ref":"","in":"query","required":false,"desc":"Client supplied custom parameters. Specify any parameter you require (starting with \"custom_\"). These custom parameters are passed back to your server postback endpoint upon successfull completion.","default":"","type":"string","name":"custom_MYVALUE"},{"_id":"54d30e03d0b2871900cda6b2","ref":"","in":"query","required":false,"desc":"Sets the minimum VC points filter (must be used with \"to\" parameter).","default":"","type":"int","name":"from"},{"_id":"54d30e03d0b2871900cda6b1","ref":"","in":"query","required":false,"desc":"Sets the maximum VC points filter (must be used with \"from\" parameter).","default":"","type":"int","name":"to"}],"url":"/Public"},"isReference":false,"order":0,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"This exposes the same API we use to display our offer wall if you [use our iFrame integration](doc:getting-started) so that you can incorporate offers into your own user experience, in the best times and places for your users.\",\n  \"title\": \"Customize Your Experience\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Required Fields\"\n}\n[/block]\n\nWhile it has options that allow a lot of flexibility, you only need two fields:\n* `h`: the app hash for your app, generated by our system and available in your [Dashboard](https://pub.superrewards.com).  For more info see [Foundation: Hashes and Keys](doc:foundation-app-hashes-keys-and-signing).\n* `uid`: a unique ID for the user, either numeric or text. Check out our [Notes on UIDs](doc:notes-on-uids). \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Filtering By Mode\"\n}\n[/block]\nThe `mode` field determines what type of offer you are requesting.  Possible values are:\n* `all`\n* `paid`\n* `free`\n* `survey`\n* `video`\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Using The Results\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/224kuMssSh6wzB651gkI_skitch.png\",\n        \"skitch.png\",\n        \"972\",\n        \"331\",\n        \"#ed5aae\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"An Easy Test\",\n  \"body\": \"To try out the live tool below, use these values to get one offer back from the server:\\n* `h`: `icfb` (this is one of our test apps)\\n* `uid`: `9876541` (a fake user ID)\\n* `mode`: `all`\\n* `n_offers`: `1`\"\n}\n[/block]","excerpt":"","slug":"native-offers-api","type":"get","title":"Native Offers API"}

getNative Offers API


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

h:
required
stringicfb
App hash
uid:
required
integer12340987
Unique User ID in your system.
ip:
required
string
The user's IP address, so we can determine which offers to fetch based on geographic location
mode:
stringall
What offers to show
n_offers:
integer30
The number of offers to return (per tab). Defaults to 30.
page:
integer0
When requesting paginated results, set to the page number you are requesting. 0 based. Defaults to 0 if not specified.
lang:
stringen
The 2 character language code of the user. This is normally detected, but you may pass this value to override the language or if acting as a proxy. See: http://en.wikipedia.org/wiki/IETF_language_tag
age:
integer
Users age in years.
gender:
string
The users gender (m or f)
tags:
string
List of comma separated tags to use to use as a filter for offers.
custom_MYVALUE:
string
Client supplied custom parameters. Specify any parameter you require (starting with "custom_"). These custom parameters are passed back to your server postback endpoint upon successfull completion.
from:
integer
Sets the minimum VC points filter (must be used with "to" parameter).
to:
integer
Sets the maximum VC points filter (must be used with "from" parameter).

Result Format


Documentation

[block:callout] { "type": "success", "body": "This exposes the same API we use to display our offer wall if you [use our iFrame integration](doc:getting-started) so that you can incorporate offers into your own user experience, in the best times and places for your users.", "title": "Customize Your Experience" } [/block] [block:api-header] { "type": "basic", "title": "Required Fields" } [/block] While it has options that allow a lot of flexibility, you only need two fields: * `h`: the app hash for your app, generated by our system and available in your [Dashboard](https://pub.superrewards.com). For more info see [Foundation: Hashes and Keys](doc:foundation-app-hashes-keys-and-signing). * `uid`: a unique ID for the user, either numeric or text. Check out our [Notes on UIDs](doc:notes-on-uids). [block:api-header] { "type": "basic", "title": "Filtering By Mode" } [/block] The `mode` field determines what type of offer you are requesting. Possible values are: * `all` * `paid` * `free` * `survey` * `video` [block:api-header] { "type": "basic", "title": "Using The Results" } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/224kuMssSh6wzB651gkI_skitch.png", "skitch.png", "972", "331", "#ed5aae", "" ] } ] } [/block] [block:callout] { "type": "success", "title": "An Easy Test", "body": "To try out the live tool below, use these values to get one offer back from the server:\n* `h`: `icfb` (this is one of our test apps)\n* `uid`: `9876541` (a fake user ID)\n* `mode`: `all`\n* `n_offers`: `1`" } [/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 }}