Enable Targeting

Enables Targeting for given Site.

URL: /rest-api/s/site/{siteId}/targeting/enable.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Targeting with given ID not found for the given Site.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Get Site Targetings

Get all the Targetings by Site ID.

URL: /rest-api/site/{siteId}/targetings.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Get Site Targeting

Get Site Targeting by Targeting ID and Site ID.

URL: /rest-api/site/{siteId}/targeting/{targetId}.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Targeting with given ID not found for the given Site.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • targetId – ID of the given Targeting.

Get Site Targeting Types

Get the Site Targeting types by Site ID.

URL: /rest-api/site/{siteId}/targeting/types.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Targeting with given ID not found for the given Site.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Create Mobile Carrier Targeting

Create Mobile Carrier Targeting by Site ID.

URL: /rest-api/site/{siteId}/targeting/mobilecarrier/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • rule – INCLUDE or EXCLUDE.
  • mobileCarriers – – array of Mobile Carrier names.

Get Mobile Carriers for Mobile Carrier Targeting

Get available Mobile Carrier names for Mobile Carrier Targeting type.

URL: /rest-api/site/{siteId}/targeting/mobilecarriers/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Targeting with given ID not found for the given Site.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Create Browser Targeting

Creates the Browser Targeting by Site ID (and enables if it was disabled).

URL: /rest-api/site/{siteId}/targeting/browser/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • rule – INCLUDE or EXCLUDE.
  • browser – Browser name. To get all available Browsers, please use the Get Browsers for Browser Targeting method.
  • browserVersion – version of the Browser.
  • relation – available values: LOWER, GREATER, LOWER_EQUAL, GREATER_EQUAL, EQUAL.
  • siteId – ID of the given Site.

Get Browsers for Browser Targeting

Get available Browsers values for Browser Targeting type.

URL: /rest-api/site/{siteId}/targeting/browsers/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Targeting with given ID not found for the given Site.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Get Firefox Browser versions for Browser Targeting

Get available Firefox Browser version values for Browser Targeting type.

URL: /rest-api/site/{siteId}/targeting/browsers/firefox/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Site with such ID doesn't exist.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Get Chrome Browser versions for Browser Targeting

Get available Chrome Browser Version values for Browser Targeting type.

URL: /rest-api/site/{siteId}/targeting/browsers/chrome/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Site with such ID doesn't exist.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Get Safari Browser versions for Browser Targeting

Get available Safari Browser Version values for Browser Targeting type.

URL: /rest-api/site/{siteId}/targeting/browsers/safari/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Site with such ID doesn't exist.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Get IE Browser versions for Browser Targeting

Get available Internet Explorer Browser Version values for Browser Targeting type.

URL: /rest-api/site/{siteId}/targeting/browsers/ie/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Site with such ID doesn't exist.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Create OS Targeting

Creates Operating System Targeting by Site ID.

URL: /rest-api/site/{siteId}/targeting/os/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • operatingSystem – Operating System.
  • version – a version value from the list /rest-api/site/{siteId}/targeting/os/{osName}/versions.do
  • relation – available values: LOWER, GREATER, LOWER_EQUAL, GREATER_EQUAL, EQUAL.
  • rule – INCLUDE or EXCLUDE.

Get Operating Systems for OS Targeting

Get Operating Systems values for OS Targeting type.

URL: /rest-api/site/{siteId}/targeting/os/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Site with such ID doesn't exist.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Get OS versions for OS Targeting

Get available values of version of Operating Systems for Operating System Targeting type.

URL: /rest-api/site/{siteId}/targeting/os/{osName}/versions.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Site with such ID doesn't exist.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • osName – the name of Operation System.

Create Device Targeting

Creates Device Targeting by Site ID (and enables if it was disabled).

URL: /rest-api/site/{siteId}/targeting/deviceformat/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • deviceFormat – device format.
  • rule – INCLUDE or EXCLUDE.

Get Device Formats for Device Format Targeting

Get available Device Format values for Device Format Targeting type.

URL: /rest-api/site/{siteId}/targeting/device/format/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Site with such ID doesn't exist.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Create Device Vendor Targeting

Creates Device Vendor Targeting by Site ID (and enables if it was disabled).

URL: /rest-api/site/{siteId}/targeting/devicevendor/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • deviceVendor – device vendor name.
  • rule – INCLUDE or EXCLUDE.

Get Device Vendors for Device Vendor Targeting

Get available Device Vendor values for Device Vendor Targeting type.

URL: /rest-api/site/{siteId}/targeting/device/vendor/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Site with such ID doesn't exist.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Create Screen Resolution Targeting

Creates the Screen Resolution Targeting by Site ID.

URL: /rest-api/site/{siteId}/targeting/resolution/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • relation – available values: LOWER, GREATER, LOWER_EQUAL, GREATER_EQUAL, EQUAL.
  • screenWidth – – Width of the screen.
  • screenHeight – – Height of the screen.
  • rule – INCLUDE or EXCLUDE.

Get resolutions for Screen Resolution Targeting

Get available screen resolutions values for Screen Resolution Targeting type.

URL: /rest-api/site/{siteId}/targeting/resolution/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Site with such ID doesn't exist.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Create Location Targeting

Creates Location Targeting by Site ID.

URL: /rest-api/site/{siteId}/targeting/location/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – the given Site ID.
  • countryCode – ISO Country code. To pass multiple Country codes use: "UK, US, CA".
  • regionName – name of the region.
  • cityName – name of the city (optional).
  • rule – INCLUDE or EXCLUDE.

Create Country Targeting

Creates Country Targeting by Site ID (and enables if it was disabled).

URL: /rest-api/site/{siteId}/targeting/country/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Campaign with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • countryCode – ISO Country code.
  • rule – INCLUDE or EXCLUDE.

Get Regions for Country Targeting

Get available regions for Country Targeting type.

URL: /rest-api/site/{siteId}/targeting/country/region/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Site with such ID doesn't exist.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • countryCode – ISO Country code. To pass multiple Country codes use: "UK, US, CA".

Get Cities for Country Region

Get available cities for given country region.

URL: /rest-api/site/{siteId}/targeting/country/region/city/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Site with such ID doesn't exist.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • countryCode – ISO Country code. To pass multiple Country codes use: "UK, US, CA".
  • regionName – the given region name.

Create Language Targeting

Creates Language Targeting by Site ID (and enables if it was disabled).

URL: /rest-api/site/{siteId}/targeting/language/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • languageCode – – language code.
  • rule – INCLUDE or EXCLUDE.

Get languages for Language Targeting

Get available languages for Language Targeting type.

URL: /rest-api/site/{siteId}/targeting/language/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Site with such ID doesn't exist.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Create Cookie Targeting

Creates Site Cookie value Targeting by Site ID (and enables if it was disabled).

URL: /rest-api/site/{siteId}/targeting/cookie/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – the given Site ID.
  • cookieName – Cookie name.
  • cookieValue – Cookie value.
  • rule – INCLUDE or EXCLUDE.

Create Domain Targeting

Creates the referrer Domain Targeting by Site ID (and enables if it was disabled).

URL: /rest-api/site/{siteId}/targeting/domain/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • domain – referrer domain name.
  • rule – EXCLUDE or INCLUDE.

Create Preset Domain Group Targeting

Creates the Preset Domain Group Targeting by Site ID (and enables if it was disabled).

URL: /rest-api/site/{siteId}/targeting/preset-domain/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • domainGroupId – ID of the Domain Group.
  • rule – EXCLUDE or INCLUDE.

Create Channel Targeting

Creates Channel Targeting by Site ID.

URL: /rest-api/site/{siteId}/targeting/channel/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • channel – Channel value.
  • rule – INCLUDE or EXCLUDE.

Create WiFi Traffic Targeting

Creates the WiFi Traffic Targeting by Site ID.

URL: /rest-api/site/{siteId}/targeting/wifi/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • rule – INCLUDE or EXCLUDE.

Create Day of the Week Targeting

Creates Targeting by day of the week for the given Site ID.

URL: /rest-api/site/{siteId}/targeting/dayofweek/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • rule – INCLUDE or EXCLUDE.
  • dayOfWeek – – available values: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.

Create Custom Parameter Targeting

Creates Custom Parameter Targeting by Site ID.

URL: /rest-api/site/{siteId}/targeting/custom/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • rule – INCLUDE or EXCLUDE.
  • customType – the type of Custom Targeting: EXPRESSION, VALUE, ONE_OF, SUBSTRING.
  • customValue – the value of Custom Parameter(s).
  • operation – the applied operation: EQUALS, NOT_EQUALS (for VALUE type); IN, NOT_IN (for ONE_OF type); CONTAINS, NON_CONTAINS (for SUBSTRING type).
  • parameter – Custom Parameter name (for VALUE, ONE_OF and SUBSTRING types).
note Reporting
Note!

Please note that for EXPRESSION type both the name and value of Custom Parameter should be passed via the customValue parameter. The Custom Parameter name should always be preceded by $ symbol. Sample of valid Custom Parameter names and values for EXPRESSION type: ($p1==1 || $p1=='a') && ($p2>=12 && $p2<=22) ).


Create IP Targeting

Creates IP range Targeting by Site ID.
Params – Valid IP range (Sample: from 194.222.012.001 to 194.223.07.01)

URL: /rest-api/site/{siteId}/targeting/iprange/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Campaign with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • ipFrom – starting IP for the range.
  • ipTo – ending IP for the range.
  • rule – INCLUDE or EXCLUDE.

Create Time Range Targeting

Creates Time Range Targeting by Site ID.

URL: /rest-api/site/{siteId}/targeting/timerange/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Campaign with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • timeFrom – String in 'hh:MM' format (24–hour).
  • timeFrom – String in 'hh:MM' format (24–hour).
  • rule – INCLUDE or EXCLUDE.

Create Protocol Targeting by Site ID

Creates Protocol Targeting by Site ID.

URL: /rest-api/site/{siteId}/targeting/protocol/create.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types of parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Site with such ID doesn't exist.

Response sample:
200 OK

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – a given username.
  • siteId – the given Site ID.
  • rule – EXCLUDE or INCLUDE.
  • protocol – protocol in upper case. Available values: HTTP or HTTPS.

Create Preset IP Ranges Targeting

Creates (and enables if was disabled) the site Preset IP-Ranges targeting by site id.

URL: /rest-api/site/{siteId}/targeting/preset-ip-ranges/create.do
Method: POST
Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used in hash generation.
  • username – the given username.
  • siteId – the given Site ID.
  • ipRangesGroupId – ranges group id
  • rule – EXCLUDE or INCLUDE.

Remove Targeting

Removes Targeting by Targeting ID and Site ID.

URL: /rest-api/site/{siteId}/targeting/{targetId}/delete.do

Method: DELETE

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Targeting with given ID not found for the given Site.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.
  • targetId – the given Targeting ID.

Disable Targeting

Disables Targeting for given Site.

URL: /rest-api//site/{siteId}/targeting/disable.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Site with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Targeting with given ID not found for the given Site.

Response sample:
200 OK

Parameters:

  • hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – the given username.
  • siteId – ID of the given Site.

Need more help?

Should you require any additional help with our solutions, do not hesitate to contact Epom technical support at support@epom.com. Our support managers are dedicated to resolving any issues and providing you with solutions and support if you face difficulties or have questions.