REST API Adskeeper for advertisers

Contents

The main provisions of REST API

REST API allows you to integrate external applications with Adskeeper online  
advertising system.
API provides the ability to retrieve, add, and modify the data. Practically each  object in Adskeeper (whether it's a client, an advertising company, a teaser, etc.) can  be controlled by API. Adskeeper REST API Request is an HTTP request, which, with  the help of the ways in URL the object to perform the action is specified, and  with the help of parameters the necessary data is passed. Adskeeper API is a "RESTful  Web API". The API uses the following REST commands:
● GET
● PUT
● PATCH
● POST
● DELETE

The query parameters are case sensitive.

These commands correspond to certain actions within the Adskeeper system. Get an item or a collection of items (for example, a list of advertising campaigns):    

Command Action Description
POST Create Description
GET Get (read)    Creates a new element (eg, a teaser)
PUT Update Recreate an existing element or a collection of elements
PATCH Change Change certain properties of an element
DELETE Delete Delete an item or collection of items (eg, move a teaser to recycle bin)
Important!
POST and PUT are not interchangeable. Each of the commands fulfills its specific function.

Adskeeper API URL:
Adskeeper REST API for clients is available at: http://api.adskeeper.co.uk/v1


In general, the query looks like this:
http://api.adskeeper.co.uk/v1/module/controller/action?token=_client's_token_&parameter_1=value_of_parameter_1&parameter_2=value_of_parameter_2&parameter_3=value_of_parameter_3

 

Identification

For identification the Adskeeper REST API uses a unique token consisting of 32  characters which is passed in client's request. To obtain a valid token client  should use a special API function.

Every request sent to the Adskeeper REST API must contain the API token

Adskeeper REST API answer

In response to a requestto the REST API server always returns the HTTP response with a status code , depending on the result of the query. 

 

Answer code Description
200 OK The query has been successfully
processed

The format of the returned data

The returned data can be formatted as JSON, or XML.  The default format is JSON. The request header is used to specify the format in which the data is  
returned. The client sends an Accept header, which indicates desired response format:  

Accept: application / xml  
or  
Accept: application / json

Description of the response format is sent in the response header Content Type. The data returned is the answer is a JSON string (http://json.org/json ru.html), which generally looks as follows:  

{
"element_1" "value_of_element_1"  
"element_2" "value_of_element_2"  
"element_3":  
{
"property_1_of_element_3" "value_of_property_1_of_element_3"  
"property_2_of_element_3":  
[ "value_1_of_property_2_of_element_3"  
"value_2_of_property_2_of_element_3"
]  }   . . . .  }

If an error has occurred during the execution of the query   the description corresponding to the error is returned, such as:

{ "errors": [ "[_error_description_]" ] }

The data in the responses is returned taking into account the time zone of the client.

Working with clients

Getting the current client's token

Method URL
POST api.adskeeper.co.uk/v1/auth/token

Transferred parameters:

Parameter Value
email E-mail of the client, specified at registration in Adskeeper system
password Password of the client, received during registration in Adskeeper system

Returns an answer:

{
 "token":"_current_token_",
 "refreshToken":"_token_for_refresh_"
 "idAuth":"_ID_of_client_account_"
}

_current_token_  is used to identify the client;  
_token_for_refresh_ will be used in future versions to update an overdue current token.

Getting information about the current financial status of the client

Method GET
URL api.adskeeper.co.uk/v1/clients/_identifier_of_client's_account_?token=_client_token_


Returned answer:

{
   "id":_ client's_account_id _,
   "wallet":{
      "balance":_state_of_wallet_,
      "credit":_overdraft_amount_,
      "income":_total_replenish_sum_
   }
}

All refunds are made in cents (0.01$) balance can have both positive and negative value. Available funds are defined as: balance + credit. Funds spent on advertising: income  balance.

Working with client's advertising campaigns

Getting a collection of client's advertising campaigns

Method GET
URL api.adskeeper.co.uk/v1/goodhits/clients/_client's_accont_ID_ / campaigns[_ad_campaign_ID_]

If _ad_campaign_ID_ was not passed, then the method returns a collection of client's advertising campaigns. If the ID has been passed correctly, it returns information only about specific ad campaign.

Transferred parameters (required parameters are marked in red):

Parameter Value
token _client's_token_
Fields array of client's properties, information on which you
need to get.( example: fields=['name','ipsFilter','domainsFilter']).  
If the parameter is not passed, then all properties are returned.The list may include following properties:

  • id - ad campaign id
  • language - ad campaign language id
  • name - ad campaign id  
  • status - ad campaign status
  • ipsFilter- IP filter settings  
  • domainsFilter - domain filter settings  
  • widgetsFilterUid - widget filter settings
  • targets - ad campaign operating systems targeting
limit turns on the pagination, limiting the number of campaigns displayed on the page.
start uses for navigation for pagination pages. The default is 0.

Languages list:

ID NAME LANGUAGE_CODE
1 English en
2 Spanish es
3 French fr
4 German de
5 Vietnamese vi
6 Dutch nl
7 Italian it
8 Portuguese pt
9 Indonesian id
10 Greek el
11 Thai th
12 Hindi hi
13 Khmer km
14 Swedish sv
15 Hungarian hu
16 Malay ms
17 Romanian ro
18 Norwegian no
19 Croatian hr
20 Polish pl
21 Finnish fi
22 Danish da
23 Filipino fil
24 Czech cs
25 Korean ko
26 Bosnian bs
27 Slovak sk
28 Japanese ja
29 Bulgarian bg
30 Slovene sl
31 Macedonian mk
32 Turkish tr
33 Estonian et
34 Armenian hy
35 Serbian sr
36 Lithuanian lt
37 Azerbaijani az
38 Latvian lv
39 Russian ru
40 Urdu ur
41 Arabic ar
42 Hebrew he
43 Chinese zh
44 Georgian ka
45 Nepali ne
46 Albanian sq
47 Bengali bn
48 Sinhalese si
49 Uzbek uz
50 Ukrainian uk
51 Tamil ta
52 Telugu te
53 Persian fa
54 Somali so
55 Tajik tg
56 Kyrgyz ky
57 Lao lo
58 Gujarati gu
59 Marathi mr
60 Malayalam ml
61 Kannada kn
62 Burmese my
63 Kazakh kk
64 Turkmen tk
65 Afrikaans af
66 Punjabi pa
67 Belarusian be
68 Swahili sw
69 Mongolian mn

Answer returned:

{
   "_advertising_campaign_id_":{
      "id":_advertising_campaign_id_,
      "language":_campaign_language_,
      "name":"_advertising_campaign_name_",
      "status":{
         "id":_state_identifier_,
         "name":"_ad_campaign_status_name_",
         "reason":"_campaign_state"
      },
      "domainsFilter":{
         "filterType":"_domain_filter_type_",
         "domainsNames":[
            "_domain_1_",
            "_domain_2_",
            . . . . . . .
         ]
      },
      "ipsFilter":{
         "filterType":"_IP_filter_type_",
         "ips":[
            "IP_adress_1",
            "IP_adress_2",
            . . . . . .
         ]
      },
      "widgetsFilterUid":{
                "filterType":"_widget_filter_type_",
                 "widgets":{
            " _widget_id_1":"[_widget_subid_1]",
            " _widget_id_2":"[_widget_subid_2]",
            " _widget_id_3":"[ _widget_subid_3]",
                     
         }
      },
      "statistics":{
         "clicks":_counted_clicks_amount_for_today_,
         "wages":_funds_spent_for_today_
      }
   },
   ...........
}

Possible errors:

[ERROR_TOO_MANY_CAMPAIGNS_USE_PARAMS_LIMIT_AND_START] - if the user has more than 500 campaigns and the optional limit parameter is not specified

[ERROR_MAX_LIMIT_PER_PAGE_500] - if the additional parameter limit is specified and it is more than 500

Status property indicates current campaign state and status.

Description of status value returned:

id

Description

1

Campaign is blocked due to end date

2

Campaign has reached total budget limit

3

Campaign has reached total clicks limit

4

Campaign is blocked by manager of client

5

Campaign is blocked due to negative balance

6

Campaign is unlimited and active

7

Campaign hasn't reached its daily limit

8

Yesterday campaign has reached its daily clicks or budget limit and is active

9

Campaign has reached its daily budget limit

10

Campaign has reached its daily clicks limit

11

Campaign is paused due to time schedule settings

12

Campaign stopped because the client delayed
13 Campaign stopped by manager
14 Campaign deleted
15 Campaign stopped because the client rejected
17 Campaign stopped due to conversion limit
19 Campaign stopped due to violation of the creativity rules

IpsFilter property displays the IP filter settings of an advertising campaign (teasers of this campaign should not be shown to visitors with this IP). _IP_filter_type_ can take the following values:
off - the filter is disabled
except - "except" filter  
ips - a list of IP address ranges for filtering as an array.  _spent_by_the_client_for_today_ in $

Getting advertising campaign statistics by site

Method GET
URL api.adskeeper.co.uk/v1/goodhits/campaigns/_ad_campaign_ID_/quality-analysis/_uid_?token=_client's_token_

Transfered parameters (required parameters marked in red):

Parameters Values
token _client's_token_
campaignId _ad_campaign_ID_
dateInterval Period for which you need to get statistics. If interval is not specified, returns statistics for 90 days. Valid values are:

  • interval - need to specify startDate/endDate in format yyyy-mm-dd
  • all - all time
  • thisWeek - current week
  • lastWeek - last week
  • thisMonth - current month
  • lastMonth - last month
  • lastSeven - last 7 days
  • today - today
  • yesterday - yesterday
  • last30Days - last 30 days
uid _uid_ If specified, displays information only for this site.

Answer returned:

{  
 "_campaignId_":{
  "_dateInterval_":{  
     "_widgetUid_":{  
        "clicks":"_clicks_",
        "spent":"_spent_",
        "cpc":"_cpc_client_currency_",
        "qualityFactor": "_quality_factor_",
        "buy":"_conversions_at_the_buying_stage_",
        "buyCost":"_price_of_conversions_at_the_buying_stage_",
        "decision":"_conversions_at_the_decision_stage_",
        "decisionCost":"_price_of_conversions_at_the_decision_stage_",
        "interest":"_conversions_at_the_interest_stage_",
        "interestCost":"_price_of_conversions_at_the_interest_stage_",
        "sources": {
            "17": {
                   "clicks":"_clicks_",
                   "spent":"_spent_",
                   "cpc":"_cpc_client_currency_",
                   "qualityFactor": "_quality_factor_",
                   "buy":"_conversions_at_the_buying_stage_",
                   "buyCost":"_price_of_conversions_at_the_buying_stage_",
                   "decision":"_conversions_at_the_decision_stage_",
                   "decisionCost":"_price_of_conversions_at_the_decision_stage_",
                   "interest":"_conversions_at_the_interest_stage_",
                   "interestCost":"_price_of_conversions_at_the_interest_stage_",
            },
            "0": {
                  "clicks":"_clicks_",
                  "spent":"_spent_",
                  "cpc":"_cpc_client_currency_",
                  "qualityFactor": "_quality_factor_",
                  "buy":"_conversions_at_the_buying_stage_",
                  "buyCost":"_price_of_conversions_at_the_buying_stage_",
                  "decision":"_conversions_at_the_decision_stage_",
                  "decisionCost":"_price_of_conversions_at_the_decision_stage_",
                  "interest":"_conversions_at_the_interest_stage_",
                  "interestCost":"_price_of_conversions_at_the_interest_stage_",
            }
        }
     }
  }
}

 

Advertising campaigns detailed daily statistics

Method GET
URL api.adskeeper.co.uk/v1/goodhits/campaigns/_adcampaign_id_/statistics?token=_client's_token_


Transferred parameters (required parameters are marked in red):

Parameters Value
type Statistics type. Values:  byClicksDetailed
date Format date: YYYY-MM-DD


Returned values:
If the request is correctly, it returns an array of data in the next format:

{
   "id":_ad_campaign_ID_,
   "statistics":{
      "summary":{
         "numberOfClicks":_total_number_of_clicks_,
         "numberOfAcceptedClicks":_ enrollment_clicks _,
         "fundsEarned":_spent_clicks _,
         "numberOfRejectedClicks":_not_couted_clicks_,
         "numberOfShows":_total_number_of_shows_
      },
      "acceptedClicks":[
         {
            "time":"_click_time_",
            "ip":"_ip_address_",
            "referer":"_referrer_",
            "teaserId":"_id_teaser_",
            "informerId":"_site_id__",
            "country":"_two_letter_country_code",
            "region":"_region_",
            "price":"_click_price_"
         },
         ….
      ]
   }
}

Advertising campaigns daily statistics

Метод GET
URL api.adskeeper.co.uk/v1/goodhits/clients/{clientId}/campaigns-stat?token={accessToken}

Transferred parameters:

Parameter Value
token client's token
dateInterval

Period for which you need to get statistics. If interval is not specified, returns statistics for 90 days. Valid values are:

  • interval - need to specify startDate/endDate in format yyyy-mm-dd
  • all - all time
  • thisWeek - current week
  • lastWeek - last week
  • thisMonth - current month
  • lastMonth - last month
  • lastSeven - last 7 days
  • today - today
  • yesterday - yesterday
  • last30Days - last 30 days

Answer:

"_campaign_id_":{
   "campaign_id":_campaign_id_,
   "imps":_imps_,
   "clicks":_clicks_,
   "spent":_spent_,
   "avcpc":_average_cpc_
}

If the customer has conversion settings - additional data transferred:

  • buy - quantity of buying conversions
  • buyCost - cost of buying
  • decision - quantity of decision conversions
  • decisionCost - cost of decision
  • interest - quantity of interest conversions
  • interestCost - cost of interest
  • convertionCost - conversions profit
  • revenue - revenue
  • epc - earn per click
  • profit - revenue - spent

If there are some errors:

{"errors":["[_error_]"]}

[THERE_NO_DATA_IN_CHOSEN_PERIOD] - if there is no data in chosen period

[INVALID_VALUE_FOR_INTERVAL] - invalid value for interval

Creating a new ad campaign (with all settings)

Method POST
URL api.adskeeper.co.uk/v1/goodhits/clients/_client_ID_/campaigns?token=_client's_token_

Request example:

api.adskeeper.co.uk/v1/goodhits/clients/123456/campaigns?token=0123456789a&name=api_test&enabledGeoTargetingFlag=1&geoTargets={'method':'set','countries':['RU','UA']}&startDate=2018-11-01&campaignType=product&utm_source=test&utm_campaign=test&utm_medium=test&utm_custom={widget_id}&limitType=clicks_limits&dailyLimit=500&overallLimit=50000&splitDailyLimitEvenly=1&browserTargets=chrome,safari,operamini&osTargets=ios70tablet

Transferred parameters (red - required; blue - required, if parent parameter transferred):

Section 1

Parameters Value
name Campaign name. Must be unique for the client. 128 symbols max.
enabledGeoTargetingFlag Flag on/off GeoTargeting
geoTargets List of countries and cities (regions) for targeting. Example:

{'method':'set','cities':['2'],'countries':['ru']}

startDate Campaign start date YYYY-MM-DD
language ad campaign language_code
campaignType product/content. If campaign_type didn't transfer campaign_type = product

Possible errors for this section:

[ADVERTISE_NAME_EXISTS]
[CAMPAIGN_NAME_TOO_LONG]
[ERROR_PARAMETER_ENABLED_GEO_TARGETING_FLAG_CAN_NOT_BE_EMPTY]
[ERROR_PARAMETER_GEO_TARGETS_CAN_NOT_BE_EMPTY]
[ERROR_INVALID_PARAMETER]
[ERROR_WRONG_DATE_FORMAT]
[ERROR_NOT_VALID_CAMPAIGN_TYPE]

 

Section 2
If at least one of the utm_source, utm_campaign, utm_medium transferred, then all three are required

Parameters Value
utm_source 0, 9, A Z, a z, _ + & = (up to 200 symbols)
utm_campaign 0, 9, A Z, a z, _ + & = (up to 200 symbols)
utm_medium 0, 9, A Z, a z, _ + & = (up to 200 symbols)
utm_custom Macroses: {widget_id}/{teaser_id}/{campaign_id}/{category_id} etc

Possible errors for this section:

[UTM_TAGGING_FIELDS_MUST_NOT_BE_EMPTY]
[UTM_CUSTOM_TOO_LONG_STR]
[WRONG_UTM_CUSTOM_FORMAT]
[UTM_MEDIUM_TOO_LONG_STR]
[UTM_SOURCE_TOO_LONG_STR]
[UTM_CAMPAIGN_TOO_LONG_STR]

 

Section 3
If limitType parameter transferred, then limit type must be specified (day or total)

Parameters Value
limitType

clicks_limits - limit on clicks, budget_limits - limit on budget

dailyLimit

Setting the limit per day.

For clicks_limits  must be an integer value. Min  50. If a value is empty - campaign has no limits.

For budget_limits  The value of 2 characters after the decimal point (up to hundredths).

overallLimit

Setting the limit on the campaign in general.

For clicks_limits – must be an integer value and more than a dailyLimit, if specified. If value is empty - campaign has no limits.

For budget_limits value with 2 characters after the decimal point (up to hundredths). Must be more than a dailyLimit, if specified. If value is empty - campaign has no limits.

splitDailyLimitEvenly Option of evenly daily traffic distribution. 0 - on, 1 - off

Possible errors for this section:

[NOT_ENOUGH_PARAMETERS]
[ERROR_NOT_VALID_TYPE]
[ERROR_GREATER_THAN_LIMIT_PER_DAY]
[MINIMAL_DAILY_BUDGET_LIMIT_ERROR]
[WRONG_USE_FLOATING_LIMIT]
[ERROR_SPLIT_DAILY_LIMIT_EVENLY_IS_AVAILABLE_IF_ONLY_DAILY_LIMIT_SET]

 

Section 4

Parameters Value
browserTargets _browser1_, _browser2_, _browser3_
osTargets _os1_,_os2_,_os3_

Possible errors for this section:

"[ERROR_NO_ENOUGH_PARAMETERS]"

Answer returned:

{
     "id":_campaign_id_,
}

Creating a new ad campaign

Method POST
URL api.adskeeper.co.uk/v1/goodhits/clients/_client_ID_/campaigns?token=_client's_token_

Transferred parameters (required parameters are marked in red):

Parameters Values
name Campaign name. Must be unique for the client. 
enabledGeoTargetingFlag Flag on/off GeoTargeting
geoTargets
List of countries and cities (regions) for
(parameter is required if targeting:
enabledGeoTargetingFlag =1)
{'method':'set','cities':['2'],'countries':['ru']}
language ad campaign language_code
startDate campaign start date YYYY-MM-DD
campaignType product | content. If parameter didn't send campaign_type = product

Answer returned:

{
  "id":_campaign_ID_,
}

If there already exists an ad campaign with the name specified in the request, then new campaign will not be created and system return error:

{
"errors":
[ "[ADVERTISE_NAME_EXISTS]" ]
}

UTM markup settings for ad campaign

Method PUT
URL api.adskeeper.co.uk/v1/goodhits/campaigns/_campaign_ID_/utmtracking/?token=_client's_token

 

Transfered parameters:

Parameters Value
utm_source Standard setting Google Analytics to track traffic source
utm_campaign Standard setting Google Analytics to track purchases traffic campaign
utm_medium Standard setting Google Analytics to track traffic channel
utm_custom Custom markup. Ability to specify custom settings, which
will be added to the links campaign teaser

 

Values for Google Analytics (utm_source, utm_campaign, utm_medium) must be given a single query. If you are using one of the this parameters, other are required. Error if one of values is empty: [UTM_TAGGING_FIELDS_MUST_NOT_BE_EMPTY]  
When you specify the default settings Google Analytics also automatically added utm_content and utm_term . In tag utm_content  automatically substituded ID ads.  utm_term=_site_ID_

Utm_custom , should not exceed 200 characters, or system return error:  [UTM_CUSTOM_TOO_LONG_STR]  

Valid characters are: 0 9, A Z, a z,   _ + & = . And macros: {widget_id},  {teaser_id}, {campaign_id}, {category_id}.  

Or system return error:  [WRONG_UTM_CUSTOM_FORMAT]
If you pass an empty field markup is disabled. If the settings are saved successfully, system return campaign ID:

{"id":_campaign_ID_}

Setting limits on the advertising campaign

 

Method PATCH
URL api.adskeeper.co.uk/v1/goodhits/clients/_client_ID_/campaigns/_campaign_ID_


Transfered parameters (required parameters are marked in red):

Parameters Value
token _client's_token_
limitType clicks_limits - clicks limit

budget_limits - budget limit

dailyLimit Setting the limit per day.

For clicks_limits  must be an integer value. Min  50. If a value is empty - campaign have no limits.

For budget_limits  The value of 2 characters after the decimal point (up to hundredths).

overallLimit Setting the limit on the pampaign in general.

For clicks_limits – must be an integer value and more than a dailyLimit, if specified. If value is empty - campaign have no limits.

For budget_limits value with 2 characters after the decimal point (up to hundredths). Must be more than a dailyLimit, if specified. If value is empty - campaign have no limits.

splitDailyLimitEvenly

Option of evenly daily traffic distribution. 0 - on, 1 - off

  • The daily limit can not be less than $10
  • The total limit can not be less than the daily limit
  • Step limit - 1 cent

A system returns  _campaign_ID_ if  all done:

{"id":_campaign_ID_}

 

Block / unblock the advertising campaign

 

Method PATCH
URL api.adskeeper.co.uk/v1/goodhits/clients/_client_ID_/campaigns/_campaign_ ID_


Transfered parameters (required parameters are marked in red):

Parameters Value
token _token_
whetherToBlockByClient 0 – unlock ad campaign
1 — lock ad campaign
blockByClientReason

(if whetherToBlockByClient=1, then required parameter  )  

_blocking reason_

 

Getting creation date of ad campaign

 

Method GET
URL api.adskeeper.co.uk/v1/goodhits/clients/_client's_accont_ID_/campaigns/_ad_campaign_ID_?token=_clients_token_&fields=['whenAdd']

 

Transferred parameters:

Parameter Value
fields whenAdd

Answer returned:

{
   "id":_ad_campaign_ID_,
   "whenAdd":_campaigns_creation_date_
}

Setting the coefficient of selective auction of an advertising campaign

Method PATCH
URL api.adskeeper.co.uk/v1/goodhits/clients/_clientID_/campaigns/_campaignID_?token=_client's_token_&qualityFactor={"_widgetUid1_s_sourceId1_":_qf1_,"_widgetUid2_s_sourceId2_":_qf2_,…}

Transferred parameters (required parameters marked in red):

Parameters Values
token _client's_token_
clientId _client_ID_
campaignId _ad_campaign_ID_
qualityFactor Contains a widgetUID and a new quality factor on the site. There can be several pairs in json format: {"_widgetUid1_":_qf1_,"_widgetUid2_s_sourceId2_":_qf2_,"_widgetUid3_":_qf3_}

Answer returned:

{ "id":_ad_campaign_ID_"}

Possible errors:

  • ERROR_CAMPAIGN_USES_AUTORETARGETING_CANT_CHANGE_QF- autoretargeting is on
  • ERROR_CAMPAIGN_USES_PRICE_OPTIMIZATION_CANT_CHANGE_QF- autooptimization is on
  • ERROR_CAMPAIGN_IS_DSP_CANT_CHANGE_QF- DSP campaign
  • ERROR_QUALITY_FACTOR_INVALID_FORMAT - wrong data format in parameter qualityFactor
  • ERROR_WIDGETUID_INVALID_FORMAT - wrong data format in parameter _widgetUid2_or _widgetUid2_s_sourceId2_

Setting the coefficient of selective auction to all sub-sources

Method PATCH
URL api.adskeeper.co.uk/v1/goodhits/clients/_clientID_/campaigns/_campaignID_?token=_client's_token_&widgetQualityFactor={"_widgetUid1_":_qf1_,"_widgetUid2_":_qf2_,…}

Transferred parameters (required parameters marked in red):

Parameters Values
token _client's_token_
clientId _client_ID_
campaignId _ad_campaign_ID_
widgetQualityFactor Contains a widgetUID and a new quality factor. Applies a source value to all its sub-sources. There can be several pairs in json format: {"_widgetUid1_":_qf1_,"_widgetUid2_":_qf2_,"_widgetUid3_":_qf3_}

Answer returned:

{  
 "id":_ad_campaign_ID_"
}

Possible errors:

  • ERROR_CAMPAIGN_USES_AUTORETARGETING_CANT_CHANGE_QF- autoretargeting is on
  • ERROR_CAMPAIGN_USES_PRICE_OPTIMIZATION_CANT_CHANGE_QF- autooptimization is on
  • ERROR_CAMPAIGN_IS_DSP_CANT_CHANGE_QF- DSP campaign
  • ERROR_WIDGET_QUALITY_FACTOR_INVALID_FORMAT - wrong data format in parameter widgetQualityFactor
  • ERROR_WIDGETUID_INVALID_FORMAT - wrong data format in parameter _widgetUid2_

 

Advertising campaigns targeting settings

Setting up the geo targeting of advertising campaigns

 

Getting geotargeting settings ad campaign of client:

Method GET
URL api.adskeeper.co.uk/v1/goodhits/campaigns/_campaign_ID_/targetings/geo?token=_client's_token_


Answer returned:

{
   "targets":    {
      "actual":{
         "countries":{
            "_country_code_":{
               "code":"_ country_code _",
                "name":"_country_name_",
                "cities":[
                  "_city_ID_":{
                     "id":_ city_ID _,
                      "name":"_name_of_city",
                      "normalizedName":"_ Latin_letters_name _"                       
                  },
                  .......
               ]
            }            ......
         }
      },
      "requested":{
         "countries":{
            "_country_code_":{
               "code":"_country_code_",
                 "name":"_country_name_",
                 "cities":[
                  "_city_ID_":{
                     "id":_ city_ID _,
                       "name":"_ name_of_city_",
                       "normalizedName":"_ Latin_letters_name_"
                  },
                  .......
               ]
            }
         }
      }
   }
}

 

Section "actual"  contains the current geotargeting.  Section "request"  updated geotargeting settings that will be applied (or in the near future, or from the following day). If geotargeting settings are not used, it returns an answer like:

{
   "targets":{
      "actual":{
         "countries":[

         ]
      },
      "requested":{
         "countries":[

         ]
      }
   }
}

Getting a list of available countries for setting up geo targeting

Method GET
URL api.adskeeper.co.uk/v1/dictionaries/geo?token=_client's_token_


Transferred parameters:

Parameter Value
type countries

 

Returns an array of countries that can be used for setting geotargeting:

[
   {
      "code":"_ two_letter_country_code _",
      "name":"_country_name_"
   },
   .....
]

Getting a list of available regions (cities) for geo targeting settings

 

Method GET
URL api.adskeeper.co.uk/v1/dictionaries/geo?token=_client's_token_


Transferred parameters:

Parameters Value Comments
type cities
countries ['_ two_letter_country_code _', ....] An array of country codes for which you need to get a cities (regions) list.


Returns an array of regions (cities) that can be used for geo targeting:

[
   {
      "id":_city_ID_,
      "name":"_city_name_",
      "normalizedName":"_ name of city_Latin_Letters _",
      "countryCode":"_ two_letter_country_code _"
   },
   ......
]

Editing geo targeting settings for advertising campaign

 

Method PUT
URL api.adskeeper.co.uk/v1/goodhits/campaigns/_campain_ID_/targetings/geo?token=_client's_token_


Transferred parameters:

Parameter Value
targets The list of countries and cities (regions) for targeting:
{ 'method':'set', 'cities': [ _city_ID_, . . . . . ], 'countries':
[ two_letter_country_code _,  . . . . . . ] }
enabledFlag Flag on/off geo targeting(1/0)


If the request is correct, will be returned  ID edited ad campaign:

{ "id":_campaign_ID_}

If you do not specify any parameters or configured incorrectly, the changes  
settings will not be saved and will return an error message:

{ "errors": [ "[ERROR_NO_ENOUGH_PARAMETERS]" ] }

 

 

Editing browser targeting settings for advertising campaign

 

Method PUT
URL api.adskeeper.co.uk/v1/goodhits/campaigns/_ad_campaign_ID_/targetings/browsers?token=_client's_token_


Transferred parameters:

Parameter Value
targets _ editing_method_ , _ browser_,_ browser_.....
enabledFlag 0 – target off, 1 — target on


Possible values for the  _editing_method_ :
include - inclusion of a browser in the list for targeting

 

Possible values for _browser_ :

Name Value
Google Chrome chrome
Safari safari
Opera Mini operamini
Opera Mobile operamoblie
Opera opera
Firefox firefox
Internet Explorer msie
Others others

Upon successful saving settings system returns campaign ID:

{"id":_campaign_ID_}

 

 

Editing the filter settings on the IP addresses for advertising campaign

 

Method PATCH
URL api.adskeeper.co.uk/v1/goodhits/clients/_client_ID_/campaigns/_ad_campain_ID_?token=_client's_token_


Transferred parameters:

Parameter Value
ipsFilter _ editing_methods _ , _filter_type_, IP1,IP2....

Settings:

  • Editing methods:
    • include include an address in the list
    • exclude remove an address from the list
  • Filter type :
    • except  
    • only
    • off – filter off

IP can be specified as single or as subnets (192.168.0.1/24)

Upon successful saving settings system returns campaign ID:

{"id":_campaign_ID_}

 

 

Editing operating system settings  for advertising campaign

Method PUT
URL api.adskeeper.co.uk/v1/goodhits/campaigns/_ad_campaign_ID_/targetings/operatingsystems?token=_client's_token_


Transferred parameters:

Parameter Value
enabledFlag on/off OS targeting,
on=1 off=0
targets _editing_method_,_os_code1_,_os_code2_,_os_code3_

Operating systems:  

id name version os_code
8 Windows OS Other windowsos
9 Mac OS Other macos
10 Other Desktop OS otherdesctop
11 Android 2.2 and lower android22mobile
12 Android 2,3 android23mobile
13 Android 3.хх android3mobile
14 Android 4 android40mobile
15 Android 4,1 android41mobile
16 Android 4,2 android42mobile
17 Android 4,3 android43mobile
18 Android 4,4 android44mobile
19 iOS 4.хх and lower ios4mobile
20 iOS 5.хх ios5mobile
21 iOS 6.хх ios6mobile
22 iOS 7.хх ios7mobile
23 iOS 8.хх ios8mobile
24 Other Mobile OS othermobile
25 Android 2.2 and lower android22tablet
26 Android 2,3 android23tablet
27 Android 3.хх android3tablet
28 Android 4 android40tablet
29 Android 4,1 android41tablet
30 Android 4,2 android42tablet
31 Android 4,3 android43tablet
32 Android 4,4 android44tablet
33 iOS 4.хх and lower ios4tablet
34 iOS 5.хх ios5tablet
35 iOS 6.хх ios6tablet
36 iOS 7.хх ios7tablet
37 iOS 8.хх ios8tablet
38 Other Tablet OS othertablet
39 Android 5.xx android50mobile
40 Android 5.xx android50tablet
41 iOS 9.хх ios9tablet
42 iOS 9.хх ios9mobile
43 Android 6.xx android60mobile
44 Android 6.xx android60tablet
45 iOS 10.хх ios10mobile
46 iOS 10.хх ios70tablet
47 Android 7.xx android70tablet
48 Android 7.xx android70mobile
50 iOS 11.xx ios11mobile
51 iOS 11.xx ios11tablet
53 Android 8.xx android80mobile
54 Android 8.xx android80tablet
55 Android 9.xx android90mobile
56 Android 9.xx android90tablet
57 iOS 12.xx ios12mobile
58 iOS 12.xx ios12tablet
59 Android 10.хх android10mobile
60 Android 10.хх android10tablet
61 iOS 13.хх ios13mobile
62 iOS 13.хх ios13tablet
63 Windows OS 10 windowsos10
64 Windows OS 8,1 windowsos81
65 Windows OS 8 windowsos8
66 Windows OS 7 windowsos7
67 Windows OS Vista windowsosvista
68 Windows OS XP windowsosxp
69 Mac OS 10.12 Sierra macos1012
70 Mac OS 10.13 High Sierra macos1013
71 Mac OS 10.14 Mojave macos1014
72 Mac OS 10.15 Catalina macos1015

Editing methods :

include-   add OS to the list
exclude   remove OS from the list

Upon successful saving settings system returns campaign ID:

{"id":_campaign_ID_}

 

Editing the filter settings on the sites for advertising campaign by UID

 

Method PATCH
URL api.adskeeper.co.uk/v1/goodhits/clients/_client_ID_/campaigns/_ad_campaign_ID_?token=_client's_token_

 

Transfered parameters:

Parameter Value
widgetsFilterUid editing_method, filter_type, uid1,uid2…

you can send sub-source parameters in brackets filter_type, uid1(subid subid sibid),uid2… or through "s" filter_type, UID1sSUBID1...

block-widget-priority

For the edit method include, when it receives a request to add sub_id, it checks whether the source is added to the filter, if added, then the record of the source is ignored. Thus, using this parameter, you can slightly change the query processing logic.

Request example:

api.adskeeper.co.uk/v1/goodhits/clients/{client id}/campaigns/{campaign id}?token={token}&widgetsFilterUid=include, only, {uid id}s{subid id}&block-widget-priority

Editing methods:

  • include - include in list
  • exclude - exclude from the list

Filter types:

  • only
  • except
  • off


On success - returns the identifier of editable ad campaign

{"id":_ad_campaign_ID_}

Example response with errors in the data - sites not transferred:

{"errors":["[WIDGETS_IDS_CANNOT_BE_EMPTY]"]}

Example response with errors in the data - non-existing sites id transferred:

{"errors":["[WIDGETS_WITH_THESE_IDS_DO_NOT_EXIST]"],"data":["1000000001000"]}

Example response with errors in the data - filter parameters not transferred(include|exclude,off|only|except) or transferred in wrong way:

{"errors":["[ERROR_NOT_VALID_FILTER_TYPE]"]}

If transfered valid & non-valid IDs ("widgetsFilter": "include, only, 1000000, 111111, 109") - valid IDs will be written in database, for non-valid will be the answer:

{"id":_ad_campaign_ID_, "errors":"[WIDGETS_WITH_THESE_IDS_DO_NOT_EXIST]","data":["1000000","111111"]}

When sites not passed - it's a non-valid situation.

 

Working with client's teasers

Constants and identifiers in use

 

Teasers categories and category ID:

Currency code to display the price of the product:

Currency ID in Adskeeper system Relevant international three-character code
5 USD
6 EUR
7 GBP
10 CAD
12 INR
22 AUD
24 ZAR
43 AED


Teaser status:

Status Description
onModeration Teaser on moderation
rejected Teaser is rejected
active Teaser is active
new New teaser, don't have CTR yet
goodPerformance Teaser is in shows
badPerformance Teaser have no shows in one or more regions because have low rating. It is necessary to set a higher price per click or replace the teaser on the other, which could provide a higher CTR
blocked Blocked teaser
campaignBlocked Blocked campaign

 

 

 

Getting a list of client teasers

Method GET
URL api.adskeeper.co.uk/v1/goodhits/clients/_client_ID_/teasers[/_teaser_ID_]


If _teaser_ID_ is not passed, then method returns a list of client teasers. If _teaser_ID_ is passed, then method returns information about current teaser.

 

Transferred parameters (required parameters are marked in red):

Parameters Value
token _client's_token_
fields
(optional, use if passed _teaser_ID_)
Array of teaser properties, information
about which  necessary to obtain(for example:
fields=['title','url','statistics']).  If the parameter is not passed, then returns  all  Properties.
campaign Getting a list of client's teasers by campaign ID
limit limiting the number of teasers displayed on the page. If doesn't set - shows all teasers. Possible error when using the option limit: ["[ERROR_MAX_LIMIT_PER_PAGE_{max_allowed_limit}]"]
start sets the position of the element. For example: at the first request start = 0 limit = 700, the next request will be start = 700 limit = 700. Default - 0


Answer returned:

{  
"_teaser_ID_":
        {
         "id":"_teaser_ID_",
         "title":"_teaser_titel_",
         "advertText":"_advertising text teaser_",
         "url":"_ advertising_link_",
         "imageLink":"_link_to_teaser_image_",
         "cropLeft":"_cropping_the_image_on_the_left _",
         "cropTop":"_cropping_the_image_on_top _",
         "cropWidth":"_width_of_cropping_part_",
         "priceOfClickByLocations":                
                [{"locationId":"_geo_group_id_",
                "locationName":"_geo_group_name_",
                "priceOfClick":"_price_of_click_by_geo_group_"},...]

         "goodPrice":_product_price_,
         "goodOldPrice":_ old_product_price _,
         "currency":_ currency_ID_to_display_the_price_of_product_,
         "category":
                 {
                "id":"_category_ID_", "name":"_category_name_"
                },
         "campaignId":_campaign_ID_,
         "status":"_teaser_status_",
         "reason_if_drop_karantin": _reason_rejection_ (displayed if teaser a rejected),
         "statistics":
                 {
                 "clicks":_total_clicks_,
                 "clicks_today": _today_clicks_,
                 "clicks_yesterday": _yesterday_clicks_,  
                 "hits":_total_shows_,
                 "hits_today": _today_shows_,
                 "hits_yesterday": _yesterday_shows_,  
                 "spent":_spent_all_,
                 "spent_today":_spent_today_,
                 "spent_yesterday":_spent_yesterday_,
                 "ctr":"_teaser_CTR_",

         "ctr_by_locations":          
                [{"locationId":"_geo_group_id_",
                "locationName":"_geo_group_name_",
                "ctr":"_ctr_by_geo_group_"},...]

           },

         "conversion":
                {
                "interest_all": _number_of_achievements_interest_stage_ for_all_time_,
                "decision_all":  _number_of_achievements_decision_stage_ for_all_time_,
                "buying_all":  _number_of_achievements_buying_stage_ for_all_time_,
                "interest_yesterday": _number_of_achievements_interest_stage_ for_yesterday_,
                "decision_yesterday": _number_of_achievements_decision_stage_ for_yesterday_,
                "buying_yesterday": _number_of_achievements_buying_stage_ for_yesterday_

         }
        },
"_teaser_ID_2_":
{ . . . . . . },
. . . . . . . . . }

 

Creating a new teaser for ad campaign

 

Method POST
URL api.adskeeper.co.uk/v1/goodhits/clients/_client_ID_/teasers?token=_clients_token_


Transfered parameters (required parameters are marked in red, must be transferred in POST method body)

Parameters Value
url URL advertising links.  It's recommended to use %26 instead of & during parameters transmission
campaignId Campaign ID to which is teaser added
title Teaser title(up to 65 characters)
advertText Advertising text(up to 75 characters)
imageLink Link to teaser image. Minimum size 492x328 pixels
category Category ID of teaser
priceOfClick Price per click, cents, with tenths. As a separator
between the whole number and the fraction can use acomma or period.
cropWidth The size of the square, in pixels, that will be cut from uploaded image (imageLink) for the creation of advertising Image teaser. cropWidth cannot be less than 492px. If cropLeft is filled, then cropWidth cannot be less than cropWidth + cropLeft and cannot be larger than the image width imageLink
cropTop Offset from the top edge, in pixels, of a square to be cut from the loaded image (imageLink) for creation of advertising images teaser. Can be 0, but can not be less than the height of the image imageLink minus 328px
cropLeft Offset from the left edge, in pixels, of a square to be cut from the loaded image (imageLink) for creation of advertising images teaser.  Can be 0cropWidth + cropLeft cannot be larger than the image width ImageLink
cropWidthQuadratic The size of square in pixels, that will be cut from uploaded image (imageLink) for the teaser's image creation. cropWidthQuadratic cannot be less than 328px. If cropLeftQuadratic is filled, then cropWidthQuadratic cannot be less than cropWidthQuadratic + cropLeftQuadratic and cannot be greater than the width of the image imageLink
cropTopQuadratic The offset of square from the top edge in pixels, that will be cut from uploaded image (imageLink) for the teaser's image creation. Can be 0, but can not be less than the height of the image imageLink minus 328px
cropLeftQuadratic The offset of square from the left edge in pixels, that will be cut from uploaded image (imageLink) for the teaser's image creation. Can be 0cropWidthQuadratic + cropLeftQuadratic can not be larger than the image width imageLink
whetherShowGoodPrice Flag display the price of goods (1/0)

If whetherShowGoodPrice = 1 parameters currency, goodPrice, goodOldPrice are required. If whetherShowGoodPrice = 0 then the following parameters will be ignored.

    currency Currency ID to display the price of the product
    goodPrice Price of the goods in a specified currency
    goodOldPrice Old price of the goods.

Categories list:

 

id Name Campaign type
100 Automotive Product
101 Books and Literature Product
103 Events Product
104 Subscriptions Product
105 Casinos and Gambling Product
107 Marriage and Civil Unions Product
108 Dating Product
109 Pick up Product
111 World Cuisines Product
112 Alcoholic Beverages Product
114 Nutrition Product
115 Weight Loss Product
116 Women's Health Product
117 Children's Health Product
118 Fitness and Exercise Product
120 Alternative Medicine Product
121 Smoking Cessation Product
122 Muscle Building Product
123 Brain Booster Product
125 Home Appliances Product
126 Home Security Product
127 Home Improvement Product
128 Gardening Product
131 Sleep Disorders Product
132 Diabetes Product
133 Varicosis Product
134 Bone and Joint Conditions Product
135 Eye and Vision Conditions Product
136 Psoriasis Product
137 Papilloma Product
138 Skin and Dermatology Product
139 Medical Services Product
140 Other Treatment Product
141 Foot Health Product
142 Parasites Product
143 Hemorrhoid Product
144 Prostatitis Product
145 Sexual Health Product
148 Stocks and Bonds Product
149 Options Product
150 Insurance Product
151 Personal Debt Product
152 Financial Assistance Product
153 Retirement Planning Product
154 Real Estate Product
156 For Kids Product
157 Gifts and Souvenirs Product
158 Services Product
159 Couponing Product
161 Sporting Goods Product
162 Fishing Sports Product
165 Makeup and Accesories Product
166 Natural and Organic Beauty Product
167 Skin Care Product
168 Hair Care Product
169 Pefume and Fragrance Product
170 Other Beauty Products Product
172 Oral Care Product
173 Shaving Product
176 Women's Intimates and Sleepwear Product
177 Women's Outfits Product
179 Women's Jewelry and Watches Product
180 Other Women's Accessories Product
181 Women's Shoes and Footwear Product
184 Men's Underwear and Sleepwear Product
185 Men's Outfits Product
187 Men's Jewelry and Watches Product
188 Other Men's Accesories Product
189 Men's Shoes and Footwear Product
190 Children's Clothing Product
193 Laptops Product
194 Desktops Product
195 Computer Peripherals Product
196 Computer Software and Applications Product
198 Smartphones Product
199 Tablets and E-readers Product
200 Cameras and Camcorders Product
201 Wearable Technology Product
202 Energysavers Product
203 Self Defense Product
204 Solar Panels Product
205 Other Electronics Product
206 Travel Product
207 Video Gaming Product
208 Automotive Content
209 Business and Finance Content
210 Careers Content
211 Education Content
212 Events and Attractions Content
214 Society Content
215 Parenting Content
216 Sex Content
217 Fine Art Content
219 Cooking Content
220 Alcoholic Beverages Content
222 Wellness Content
223 Nutrition Content
224 Fitness and Exercise Content
226 Amazing Content
227 Humor Content
228 Interests Content
229 Home and Garden Content
230 Movies Content
231 Music and Audio Content
233 Politics Content
234 Crime Content
235 Disasters Content
236 News Russia Content
237 News Ukraine Content
238 Pets Content
239 Pop Culture Content
240 Real Estate Content
241 Science Content
242 Sports Content
244 Beauty Content
245 Fashion Trends Content
246 Body Art Content
247 Technology and Computing Content
248 Television Content
249 Travel Content
250 Video Gaming Content
251 Pets Product

Answer returned:
Upon successful creation of the teaser response is returned:

{
"id":_new_teaser_ID_,
}

Returns an error name  if try to creating teaser was failure:

{
   "errors":[
      "[_ error_name_ _]"
   ]
}

The list of possible errors returned in the creation an editing teaser of campaign:

_ERROR_NAME_ specification
ERROR_PARAMETER_WHETHERSHOWGOODPRICE_CAN_NOT_BE_EMPTY Not passed a required parameter whetherShowGoodPrice
ERROR_PARAMETER_PRICEOFCLICK_CAN_NOT_BE_EMPTY Not passed a required parameter priceOfClick
ERROR_PARAMETER_CATEGORY_CAN_NOT_BE_EMPTY Not passed a required parameter category
ERROR_ADVERT_TEXT_TOO_LONG Advertising text (parameter advertText) exceeds the maximum allowed length (no more than 75 characters)
ERROR_PARAMETER_TITLE_CAN_NOT_BE_EMPTY Not Transfered teaser title (required parameter title)
ERROR_TITLE_TOO_LONG Title teaser (parameter title) exceeds the maximum allowed length (no more than 65 characters)
ERROR_PARAMETER_IMAGELINK_CAN_NOT_BE_EMPTY Not assigned image link for the teaser (required parameter imageLink)
ERROR_PARAMETER_CAMPAIGNID_CAN_NOT_BE_EMPTY Not transmitted campaign ID that creates teaser (required parameter campaignId)
ERROR_PARAMETER_URL_CAN_NOT_BE_EMPTY Not assigned to an advertising link to the teaser (required parameter url)
ERROR_PARAMETER_CATEGORY_INCORRECT_FOR_THIS_CAMPAIGN_TYPE Improperly selected category for this type of campaign


Editing the ad campaign teaser settings

Method PUT
URL api.adskeeper.co.uk/v1/goodhits/clients/_client_ID_/teasers/_teaser_ID_?token=_client's_token_


 Transfered parameters (required parameters are marked in red):

Parameters Value
url URL advertising links
campaignId Campaign ID to which is teaser added
title Teaser title(up to 65 characters)
advertText Advertising text(up to 75 characters)
imageLink Link to teaser image. Minimum size 492x328 pixels
category Category ID of teaser
priceOfClick Price per click, cents, with tenths. As a separator
between the whole number and the fraction can use acomma or period.
cropWidth The size of the square, in pixels, that will be cut from uploaded image (imageLink) for the creation of advertising Image teaser. (Figure 1.) Can be empty.
cropTop Offset from the top edge, in pixels, of a square to be cut from the loaded image (imageLink) for creation of advertising images teaser. (Figure 1.). Can be empty.
cropLeft Offset from the left edge, in pixels, of a square to be cut from the loaded image (imageLink) for creation of advertising images teaser. (Figure 1.). .). Can be empty.
whetherShowGoodPrice Flag display the price of goods (1/0)

If whetherShowGoodPrice = 1 parameters currency, goodPrice, goodOldPrice are required. If whetherShowGoodPrice = 0 then the following parameters will be ignored.

    currency Currency ID to display the price of the product
    goodPrice Price of the goods in a specified currency
    goodOldPrice Old price of the goods.

If any of the required parameters wasn't passed, system returns error.

For example, not transmitted campaignId :

{
   "errors":[
      "[ERROR_PARAMETER_CAMPAIGNID_CAN_NOT_BE_EMPTY]"
   ]
}

If teaser on moderation, return error.

{
   "errors":[
      "[ERROR_EDITING_TEASER_ON_MODERATION_NOT_PERMITTED]
"
   ]
}

 

Changing advertising campaign teaser's CPC

 

Method PATCH
URL api.adskeeper.co.uk/v1/goodhits/clients/_client_ID_/teasers/_teaser_ID_?token=_clients_token_

 

Transferred parameters:

Parameter Value
priceOfClickByLocation Installed CPC in tenth of cents for all geo groups. Can be used a period or comma as a delimiter.
priceOfClickByLocation_{geo_zones_groups_id} Installed CPC in tenth of cents for for a specific geo group. Can be used a period or comma as a delimiter.

 

geo_zones_groups_id name Country, region, city geo_zones_ids
32 USA
33 The Midwest 197,204,205,207,211,219,220,224,227,231,232,242,316
34 The North-East 195,196,199,200,201,203,214,216,217,315
35 The West 198,212,215,225,229,234,236,237,240,241,243,244,245,318
36 The South 202,206,218,208,209,210,213,221,222,223,226,228,230,233,235,238,239,317
37 Other regions 246,247,248,249,250,4
38 United Kingdom 14,282
39 Australia 31
40 Canada 13
41 New Zealand 50
42 Latin America
43 Argentina 40
44 Bolivarian Republic of Venezuela 88
45 Brazil 41
46 Chile 56
47 Colombia 57
48 Costa Rica 58
49 Dominican Republic 59
50 Ecuador 60
51 Guatemala 61
52 Mexico 42
53 Panama 77
54 Peru 78
55 Plurinational State of Bolivia 55
56 Uruguay 87
57 Other countries 266
58 German-speaking
59 Austria 33
60 Belgium 28
61 Denmark 38
62 Germany 5
63 Liechtenstein 72
64 Luxembourg 74
65 Switzerland 34
66 Europe
67 Albania 53
68 Croatia 62
69 Cyprus 46
70 Estonia 11
71 Finland 22
72 Greece 25
73 Iceland 66
74 Ireland 23
75 Italy 20
76 Latvia 9
77 Lithuania 12
78 Monaco 75
79 Montenegro 273
80 Netherlands 29
81 Norway 30
82 Portugal 32
83 Serbia 81
84 Slovenia 83
85 Sweden 26
86 Spain 17
87 France 18
88 Other countries 267,268
89 Eastern Europe
90 Belarus 8
91 Bulgaria 263
92 Crimea 108,281,314
93 Czech Republic 262
94 Hungary 264
95 Poland 260
96 Romania 261
97 Republic of Moldova 10
98 Russia 3,92,93,94,95,96,98,100,101,102,103,104,106,107,109,110,111,113,114,115,117,118,119,120,121,122,123,124,125,126,127,129,130,131,132,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,151,152,153,154,155,159,161,162,163,164,165,166,167,168,169,170,171,174,177,180,181,183,184,185,186,187,188,194,251,252,254,255,256,257,258,259,274,275,276,277,278,279,280,300,301,302,303,304,305,306,307,308,309
99 Slovakia 265
100 Ukraine 2,97,99,105,112,116,128,133,150,156,157,158,160,172,173,175,176,178,179,182,189,190,191,192,193,253,310,311,312,313
101 Arabic-speaking
102 Egypt 44
103 Iraq 64
104 Jordan 67
105 Kuwai 70
106 Lebanon 71
107 Saudi Arabia 82
108 Syrian Arab Republic 84
109 United Arab Emirates 39
110 Qatar 80
111 Other countries 269,283,284,285,286,287,288,289,290,291,292,293,294,295
112 Asia
113 Bangladesh 54
114 China 24
115 Cambodia 69
116 Hong Kong 89
117 India 47
118 Indonesia 63
119 Japan 37
120 Malaysia 48
121 Pakistan 52
122 Philippines 79
123 Republic of Korea 35
124 Sri Lanka 73
125 Singapore 90
126 Taiwan 86
127 Thailand 49
128 Viet Nam 45
129 Other countries 270
130 Western Asia
131 Armenia 27
132 Azerbaijan 16
133 Islamic Republic of Iran 65
134 Israel 7
135 Georgia 15
136 Kazakhstan 6
137 Kyrgyzstan 36
138 Tajikistan 43
139 Turkey 19
140 Turkmenistan 85
141 Uzbekistan 21
143 Africa
144 Kenya 68
145 Nigeria 76
146 South Africa 51
147 Other countries 272
148 Other countries 0,1

Answer returned.
If all done correctly, system return an answer:

{"id":_teaser_ID_,}

Some errors:
● if the parameter CPCs not specified or incorrect:

{"errors":["[ERROR_NOT_ENOUGH_PARAMETERS]"]}

● if the price is not indicated or specified is not a valid value:

{"errors":["[VALIDATION_NOT_FLOAT]","[VALIDATION_NOT_FLOAT]","[VALIDATION_NOT_FLOAT]","[VALIDATION_NOT_FLOAT]","[VALIDATION_NOT_FLOAT]","[VALIDATION_NOT_FLOAT]"

● if the price is less than minimum:

{"id":"2443113","messages":{"notice":"[TEASER_PRICE_WAS_AUTO_CORRECTED]"}}

● if the price is higher than  maximum:

{"errors":["[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']","[LS_CAB_'51'_MORE_THAN_'50']"]}

● if teaser on moderation:

{"errors":["[EDIT_PRICE_FORBIDDEN_FOR_TEASER_ON_MODERATION]"]}

 

 

 

Block / unblock a teaser for the advertising campaign

Method PATCH
URL api.adskeeper.co.uk/v1/goodhits/clients/_client_ID_/teasers/_teaser_ID_?token=_client's_token_


Transferred parameters:

Parameters Value
whetherToBlockByClient 1 — block, 0 — unblock

Answer returned.
If the operation is successful, it returns teaser ID:

{"id":"_teaser_ID_"}



 

Removing teaser (move to bin)  

Method DELETE
URL api.adskeeper.co.uk/v1/goodhits/clients/_client_ID_/teasers/_teaser_ID_?token=_client's_token_


Transferred parameters:

Parameters Value
reason A reason of Deleting. Max 225 symbol

Answer returned.
If the operation is successful, it returns teaser ID which was moved to bin:

{"id":"_teaser_ID_"}

If a teaser with the specified ID does not exist in the system or have already been
moved to the bin, then the message will be returned:

[ERROR_RESOURCE_NOT_FOUND]

Related posts