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: w&t=2&a=8a7e5381-f568-4331-a30d-3b01c8f98dec&tt_idfa=84cb5500-d2a5-c788-740d-91bcc70f9342&tt_mac_md5=80efe2256d548c85ca2f2d18de241a80&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 |
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 |
Taptica Device Keys
Parameter | Name In Request | Description | Example | Daynamic? |
IMEI | tt_imei | Use for send Taptica Plain IMEI or when you don’t know what is the format of IMEI you have. | tt_imei=86453214567892 | Yes |
IMEI SHA1 | tt_imei_sha1 | Use for send Taptica IMEI in SHA1 format | tt_imei_sha1=35eb6d1fc48b502e239b6449e9df534e415cad95 | Yes |
IMEI MD5 | tt_imei_md5 | Use for send Taptica IMEI in MD5 format | tt_imei_md5=946cc1baf8bcaec827bb1828cc6d9a94 | Yes |
Android ID | tt_android_id | Use for send Taptica Plain Android ID or when you don’t know what is the format of Android ID you have. | tt_android_id=3ee0149b4ccef71b | Yes |
Android ID SHA1 | tt_android_id_sha1 | Use for send Taptica Android ID in SHA1 format | tt_android_id_sha1=4f2e52e8157fcb729d799d1ca69160df2edf0cd4 | Yes |
Android ID MD5 | tt_android_id_md5 | Use for send Taptica Android ID in MD5 format | tt_android_id_md5=155551c45efa667f9b470629ae9c0365 | Yes |
Mac Address | tt_mac | Use for send Taptica Plain Mac Address or when you don’t know what is the format of the Mac Address you have. (upper case with colon) | tt_mac=44:2A:60:G5:GE:G5 | Yes |
Mac Address SHA1 | tt_imei_sha1 | Use for send Taptica Mac Address in SHA1 format (upper case with colon) | tt_mac_sha1=fa6bb084ae52461328eb9f06039be222ef287246 | Yes |
Mac Address MD5 | tt_mac_md5 | Use for send Taptica Mac Address in MD5 format (upper case with colon) | tt_mac_md5=80efe2256d548c85ca2f2d18de241a80 | Yes |
IDFA | tt_idfa | Use for send Taptica Plain IDFA or when you don’t know what is the format of IDFA you have. | tt_idfa=771468523E3346ABAA04E207BBAF094B | Yes |
IDFA SHA1 | tt_idfa_sha1 | Use for send Taptica IDFA in SHA1 format | tt_idfa_sha1=ee5c19f8cf370b5978f4b9f33343a5e79c58df9a | Yes |
IDFA MD5 | tt_idfa_md5 | Use for send Taptica IDFA in MD5 format | tt_idfa_md5=bb1e0285fbb97ba83fdb4e72514d62f5 | Yes |
UDID | tt_udid | Use for send Taptica Plain UDID or when you don’t know what is the format of UDID you have. | tt_udid=dc1816eac806878e8d1d5a8ee9406a3f71452c80 | Yes |
UDID SHA1 | tt_udid_sha1 | Use for send Taptica UDID in SHA1 format | tt_udid_sha1=1ddfad5e4377b8694b5fea2a4c4556e2add9605b | Yes |
UDID MD5 | tt_udid_md5 | Use for send Taptica IMEI in MD5 format | tt_udid_md5=20fbe500c99939adabb4d06600eb4ee7 | 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: "16e3738a-d8de-42eb-b2b2-717f05439d20" adType: "html" adUrl: "http://tracking.taptica.com/aff_ic? tt_cid=16e3738ad8de42ebb2b2717f05439d20&el=GbtixRMFpAr%2boJEVHfprXTgVAQ3Ld8jjq6x3iEWyaxw0xNkGtmnnjJwNwe44qM0tjC81iuD%2fY2OP%2flWMG4HvDojnhFFT vD6GjipHEVRrNZoBeU5KegCKluTbYLTH1YVt51xNRO2ol6vDbQZ08GhGAoaDDJVtOCueNjYpuRrvCKJuNZLMRlKjlfkUx%2fO6Rlqax5KBBEaOchzJ5CXUoXK2aw%2blgcWmhzU%2ftjQKs0nqY60AeJ%2f2Zi1ZJAKTgqii4exPXrSu4iHeoOh9w80a1wkFC0s%2bjcFHe0EaDyAyp3zhkV6yrmd0bK%2flHPvR7yDpjOHKXjcEyfhZ%2b5oVMSoFyPhs%2bmM3p%2b5QCuliYboOs 4qCgrXlgS4s3BqS4ysSVMm7nteZ7Xwc89OoX3l73UN2m09BeeQsEWipt6cJdkocIgZpXS7tnJQaP2T8utWEVUiD9v6z50O1ogVrMyCoKrTXGO2iBbYAOQUhhvqxtOKRymKAqHLWLMsTnTfqkkRDgAnL791q" impUrl: "http://ad.taptica.com/aff_i? tt_cid=16e3738ad8de42ebb2b2717f05439d20&el=GbtixRMFpAr%2boJEVHfprXTgVAQ3Ld8jjq6x3iEWyaxw0xNkGtmnnjJwNwe44qM0tjC81iuD%2fY2OP%2flWMG4HvDojnhFFTv D6GjipHEVRrNZoBeU5KegCKluTbYLTH1YVt51xNRO2ol6vDbQZ08GhGAoaDDJVtOCueNjYpuRrvCKJuNZLMRlKjlfkUx%2fO6Rlqax5KBBEaOchzJ5CXUoXK2aw%2blgcWmhzU%2ftjQKs0nqY60AeJ%2f2Zi1ZJAKTgqii4exPXrSu4iHeoOh9w80a1wkFC0s%2bjcFHe0EaDyAyp3zhkV6yrmd0bK%2flHPvR7yDpjOHKXjcEyfhZ%2b5oVMSoFyPhs%2bmM3p%2b5QCuliYboOs4 qCgrXlgS4s3BqS4ysSVMm7nteZ7Xwc89OoX3l73UN2m09BeeQsEWipt6cJdkocIgZpXS7tnJQaP2T8utWEVUiD9v6z50O1ogVrMyCoKrTXGO2iBbYAOQUhhvqxtOKRymKAqHLWLMsTnTfqk kRDgAnL791q" urlType: "web" htmlUrl: "http://media.go2speed.org/brand/files/taptica/4328/CandyCrush_playnow_fullscreen_320x480.jpg" adInterval: "10" htmlAdType: 2 advAppId: "553834731" storeUrl: null payout: "2.60000" }
* 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 |