Retrieve Ads
Contents |
Communications
The communication will be done using the HTTP protocol.
End Point
Service end point:
POST:
Request
• The request is sent via an HTTP POST to the following URL: http://ad.taptica.com/aff_ad
• The content type of the request is application/x-www-form-urlencoded.
• The body of the POST contains URL encoded key/value pairs separated by "&".
Example: Post to: http://ad.taptica.com/aff_ad
Body: v=w&t=2&a=8a7e5381-f568-4331-a30d-3b01c8f98dec&uid=84cb5500-d2a5-c788-740d-91bcc70f9342&r=320x48&i=50.57.113.223&sr=1280x800&u=Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7
Request parameters
Parameter | Name In Request | Description | Example | Required? |
User agent | u | The browser user agent of the device making the request | u= Mozilla/5.0 (Linux;U; Android 2.1-update1;iw-il; HTC LegendBuild/ERE27) | Yes |
Application id | a | The id of the applications, as registered in Taptica's AdCore servers. | a=C20DC50B-65B9-4B11-8F62-79F9286896B7 | Yes |
UDID OR IMEI | uid | The id of the device | uid=dc1816eac806878e8d1d5a8ee9406a3f71407895 | Yes |
Andoid id | tt_deviceid2 | The device Android id | tt_deviceid2=aa54c9b9cad7d37 | Yes |
IDFA | tt_deviceid3 | The device IDFA | tt_deviceid3=dc1816eac80686a3f7140789578e8d1d5a8ee940 | Yes |
Mac Address | tt_deviceid4 | The Android/iOS device mac address | tt_deviceid4=44:2A:60:G5:GE:G5 | Yes |
IP Address | i | Client IP Address | i=84.103.57.1 | Yes |
Localization | loc | The localization (Language & Country) that is currently chosen for the device ,following the standards of ISO 639-1,ISO 3166-1. | loc=en_GB | No |
Network type | nt | The type of network the device is currently connected to ("wifi" or "carrier") | nt=carrier | No, |
Marital status | marital | Marital status of the user. options are: "single", "divorced", "engaged", "relationship", or "swinger" | marital=single | No |
Income | income | Annual income (in USD) , e.g. 10000. | income=10000 | No |
Interests | interests | a comma separated list of keywords denoting user's area of interests. | interests=cars,sports,F1,stocks | No |
Education | edu | Education level of the user ("UG" or "PG") | edu=UG | No |
Resolution | r | Resolution of the ad request | r=320x50 | Yes |
Ad Type | t | Ad type - Text (1), Banner (2), Html (3), All (0), Video (5) | t=2 | Yes |
Gender | gender | Gender, Male, Female, All | gender=male | No |
Age | age | Age of the user | age=27 | No |
Date Of Birth | dob | User's Date of birth(Format: yyyyMMdd) | dob=19820211 | No |
Latitude | lat | Location by latitudes lines | lat=40.714353 | No |
Longitude | lon | Location by longitude lines | lon=-74.005973 | No |
Response Type | rt | JSON=0, XML=1, XHTML=2, types of response | rt=0 | No |
Category Name | cat | Specified the offer category (spaces should be replace with %20) | cat=Games,Travel%20and%20Local, | No |
Category List
The optional categories names are:
Games |
Communications |
Entertainment |
Financial Services |
Health and Fitness |
Shopping and Retail |
Social |
Sports |
Travel and Local |
Multimedia |
Automotive |
Books and Reference |
Lifestyle |
Kids |
Gambling |
Education |
News and weather |
Response
The data is returned in a JSON format.
• The JSON returned by Taptica AdCore servers is a single object, composed of simple fields of JSON Type String, described in the section below.
Example:
{
adyxAdRequestGuid: "1017dda4-44e9-4742-af51-9625028117e0"
adType: "banner"
imageUrl: "http://media.go2speed.org/brand/files/taptica/3062/ayakashi_FullScreen_320x480_25k_1.jpg"
imageAltText: null
adUrl: "http://tracking.taptica.com/aff_ic?tt_cid=1017dda444e94742af519625028117e0&el= GbtixRMFpAr%2boJEVHfprXTgVAQ3Ld8jjq6x3iEWyaxx3ae%2fHmYxDjyU5hPL3ZH4lY669HnHrK9GMIKGCmdMa%2bzitGfRMafdLptjdtGDAzVXRUO%2bR6G5ZIipe ZYB61pXGfLT7Slu5x40dL5PCbrf9bVF%2bTc8xR1Tzb3es2RdhzszKKcnhkYeW11Jt5b9%2bKI%2bS8sXo8RY9VbB4aXc0r%2bdpm3mBGZzdyfTeKLzIAYPkKvh13qEb ZoD5ZOCmyc5rH48FEMcqQfS1%2b8iR9CHjfcx1FX5FtNUbGQJ8fbbu56NKwuYqgdUnfl6CSpr%2buul5rr7EuOLm91y7hJCoWbHxVGQtyDRKttK7KuS5cOjVyiNsmZ9j zBbhLTEE6QRKtKWoK5eft7LJ%2bm7G2%2fn2%2bV3jRDt3892wz2vunELw%2fR9jyfnS9IOUAaMkA8aedn25CrzO3D9DH4uY6vG0rErtYUXwOCmsww%3d%3d"
impUrl: "http://ad.taptica.com/aff_i?tt_cid=1017dda444e94742af519625028117e0&el= GbtixRMFpAr%2boJEVHfprXTgVAQ3Ld8jjq6x3iEWyaxx3ae%2fHmYxDjyU5hPL3ZH4lY669HnHrK9GMIKGCmdMa%2bzitGfRMafdLptjdtGDAzVXRUO%2bR6G5ZIipe ZYB61pXGfLT7Slu5x40dL5PCbrf9bVF%2bTc8xR1Tzb3es2RdhzszKKcnhkYeW11Jt5b9%2bKI%2bS8sXo8RY9VbB4aXc0r%2bdpm3mBGZzdyfTeKLzIAYPkKvh13qEb ZoD5ZOCmyc5rH48FEMcqQfS1%2b8iR9CHjfcx1FX5FtNUbGQJ8fbbu56NKwuYqgdUnfl6CSpr%2buul5rr7EuOLm91y7hJCoWbHxVGQtyDRKttK7KuS5cOjVyiNsmZ9j zBbhLTEE6QRKtKWoK5eft7LJ%2bm7G2%2fn2%2bV3jRDt3892wz2vunELw%2fR9jyfnS9IOUAaMkA8aedn25CrzO3D9DH4uY6vG0rErtYUXwOCmsww%3d%3d"
urlType: "web"
beacon: null
adInterval: "10"
advAppId: "528404229"
storeUrl: null
payout: "3.85000"
}
* Note: Not in use for API (urlType, beacon, adInterval)
• The response type can be either: Textual ad, Graphical Ad or an Error Message.
The JSON of each response type is described below.
Textual Ads
Parameter | Description | Example |
adyxAdRequestGuid | Unique identifier of an ad request | "{21EC2020-3AEA-1069-A2DD-08002B30309D}" |
adType | The type of an ad. Must have the value "text" | "text" |
adText | The text to be displayed on the ad | "Click here! The best offer you can ever get" |
adUrl | A URL to which the user should be redirected upon clicking on the ad | "http://www.taptica.com" |
Graphical Ads
Parameter | Description | Example |
adyxAdRequestGuid | Unique identifier of an ad request | "{21EC2020-3AEA-1069-A2DD-08002B30309D}" |
adType | The type of an ad. Must have the value "banner" | "banner" |
imageURL | A URL from which the graphical ad image should be retrieved | "http://ad.taptica.com/images/file1.jpg" |
impURL | A URL from which the impression should be sent to the server | "http://ad.taptica.com/aff_i..." |
adUrl | A URL to which the user should be redirected upon clicking on the ad | "http://ad.taptica.com/..." |
Html Ads
Parameter | Description | Example |
AdRequestGuid | Unique identifier of an ad request | "{21EC2020-3AEA-1069-A2DD-08002B30309D}" |
adType | The type of an ad. Must have the value "html" | "html" |
adUrl | A URL to which the user should be redirected to (usually Html Page) | "http://www.taptica.com" |
Error Message
Parameter | Description | Example |
errorId | The identifier of the error that occurred. If needed, extra text describing the error will be written into the errorText. | "5" |
errorText | Contains additional information regarding the retrieved error. | "The error had happened due to the following unexpected reason: unsupported client" |
List of errors
errorID | Description |
-1 | Unknown error. In this case, the errorText parameter will include the information that describes the error. |
0 | Server overload |
1 | Server could not find an appropriate ad (because of age restriction , for example) |
2 | Application id is missing |
3 | Application id wasn't found on database |
4 | User agent is missing |
5 | User agent is not supported |
6 | Test mode value is not supported |
7 | Resolution size and/or density are not supported |
8 | Resolution size and/or density are in the wrong format |
9 | Postal code is in wrong format |
10 | Area code is in wrong format |
11 | Location is in wrong format |
12 | Birth date is in wrong format or is invalid |
13 | Gender is in wrong format |
14 | Unique Identifier is missing |
15 | Unique Identifier value is in wrong format or is invalid |
16 | Localization is missing |
17 | Localization value is in wrong format or is invalid |
18 | Net type value is in wrong format or is invalid |
19 | Marital status value is not supported |
20 | Income value is in wrong format or is invalid |