Enable Targeting

Enables targeting for given banner.

URL: /rest-api/banner/{bannerId}/targeting/enable.do
Method: POST
Response format: application/json

Error codes:

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

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.
  • bannerId – the given Banner ID.

Create Browser Targeting

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

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • rule – EXCLUDE or INCLUDE.
  • browser – user's Browser. To get all available Browsers, please use the Get Browsers for Browser Targeting method.
  • relation – available values LOWER, GREATER, LOWER_EQUAL, GREATER_EQUAL, EQUAL.
  • browserVersion – version of the user's Browser.

Get Browsers for Browser Targeting

Get available Browsers values for Browser Targeting type.

URL: /rest-api/banner/{bannerId}/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 – 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.
  • bannerId – the given Banner ID.

Create Channel Targeting

Creates the Channel Targeting by Banner ID.

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • channel – Epom Channel.
  • rule – EXCLUDE or INCLUDE.

Create Cookie Value Targeting

Creates the Cookie Targeting by Banner ID (and enables if it was disabled).

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • cookieName – Cookie name.
  • cookieValue – Cookie value.
  • rule – EXCLUDE or INCLUDE.

Create Country Targeting

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

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • countryCode – ISO Country code. To pass multiple Country codes use: "UK, US, CA".
  • rule – EXCLUDE or INCLUDE.

Create Custom Parameter Targeting

Creates Custom Parameter Targeting by Banner ID.

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • rule – EXCLUDE or INCLUDE.
  • 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 and ONE_OF types), CONTAINS, NON_CONTAINS (for SUBSTRING type only)
  • 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 Day Of Week Targeting

Creates Targeting by Day of the week for Banner.

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • rule – EXCLUDE or INCLUDE.
  • dayOfWeek – available values are MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.

Create Device Format Targeting

Creates the Device Format Targeting by Banner ID (and enables if it was disabled). Applicable only to Mobile Banner type.

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • deviceFormat – device type (Desktop, Tablet, Mobile, Smart TV).
  • rule – EXCLUDE or INCLUDE.

Create Device Vendor Targeting

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

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • deviceVendor – Device Vendor name.
  • rule – EXCLUDE or INCLUDE.

Create Domain Targeting

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

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • domain – Domain name.
  • rule – EXCLUDE or INCLUDE.

Create Preset Domain Targeting

Creates the Preset Domain Group targeting by Banner ID.

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • domainGroupId – ID of the Domain Group.
  • rule – EXCLUDE or INCLUDE.

Create IP Range Targeting

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

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • ipFrom – first valid IP from the range.
  • ipTo – last valid IP of the range.
  • rule – EXCLUDE or INCLUDE.

Create Language Targeting

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

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • languageCode – language code.
  • rule – EXCLUDE or INCLUDE.

Create Location Targeting

Creates Location Targeting by Banner ID.

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • countryCode – ISO Country code. To pass multiple Country codes use: "UK, US, CA".
  • regionName – State or region name (optional).
  • cityName – City name (optional).
  • rule – EXCLUDE or INCLUDE.

Create Mobile Carrier Targeting

Creates the Mobile Carrier Targeting by Banner ID.

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • mobileCarriers – array of Mobile Carrier names.
  • rule – EXCLUDE or INCLUDE.

Create OS Targeting

Creates Operating System Targeting by Banner ID.

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • operatingSystem – user's operating system.
  • rule – EXCLUDE or INCLUDE.

Create Screen Resolution Targeting

Creates the Targeting by Screen Resolution for the given Banner.

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • relation – available values: LOWER, GREATER, LOWER_EQUAL, GREATER_EQUAL, EQUAL.
  • screenWidth
  • screenHeight
  • rule – EXCLUDE or INCLUDE.

Create Time Range Targeting

Creates Targeting by Time Range for given Banner.

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • timeFrom – String in format 24h format hh:MM , where hh – hours, MM – minutes.
  • timeTo – String in format 24h format hh:MM , where hh – hours, MM – minutes.
  • rule – EXCLUDE or INCLUDE.

Create WiFi Traffic Targeting

Creates the WiFi traffic targeting by Banner ID (banners for Mobile Site Placement only).

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • rule – EXCLUDE or INCLUDE.

Create Preset IP Ranges Targeting

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

URL: /rest-api/banner/{bannerId}/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 Banner 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.
  • bannerId – the given Banner ID.
  • ipRangesGroupId – ranges group id
  • rule – EXCLUDE or INCLUDE.

Block Placement for Banner

Blocks Placement(s) for a given Banner.

URL: /rest-api/banner/{bannerId}/targeting/placement/create.do
Method: POST
Response format: application/json

Error codes:

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

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.
  • placementId – Placement ID(s) as a string; comma-delimited. I.e.: "id1,id2,id3".
  • rule – the Targeting rule. Use: EXCLUDE.

Disable Targeting

Disables Targeting for given Banner.

URL: /rest-api/banner/{bannerId}/targeting/disable.do
Method: POST
Response format: application/json

Error codes:

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

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.
  • bannerId – the given Banner ID.

Remove Targeting

Removes Targeting by Targeting ID and Banner ID.

URL: /rest-api/banner/{bannerId}/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 Banner with such ID doesn't exist.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Targeting with the given ID is not set for the given Banner.

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.
  • bannerId – the given Banner ID.
  • targetId – the given Targeting ID.

Get Targeting

Get the Targeting by Targeting ID and Banner ID.

URL: /rest-api/banner/{bannerId}/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 the given ID is not set for the given Banner.

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.
  • bannerId – the given Banner ID.

Get All Targetings

Get all Targetings by Banner ID.

URL: /rest-api/banner/{bannerId}/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 – 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.
  • bannerId – the given Banner ID.

Get Targeting Types

Get the Targeting types by Banner ID.

URL: /rest-api/banner/{bannerId}/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 the given ID is not set for the given Banner.

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.
  • bannerId – the given Banner ID.

Get Mobile Carriers by Country

Get Mobile Carrier List sorted by Country.

URL: /rest-api/targeting/mobilecarriers/bycountry/values.do
Method: GET
Response format: application/json

Error codes:

  • 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.
  • country – ISO Country code to get the response for a specific Country.

Create Protocol Targeting

Creates protocol targeting by banner id.

URL: /rest-api/banner/{bannerId}/targeting/protocol/create.do
Method: POST
Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters or Banner 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.
  • bannerId – the given Banner ID.
  • rule – EXCLUDE or INCLUDE.
  • protocol – available values are HTTP, HTTPS.

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.