Enable Targeting

Enables Targeting for the given Campaign.

URL: /rest-api/campaign/{campaignId}/targeting/enable.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.
  • 404 Not Found – Targeting with the given ID was not found for the given Campaign.

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.
  • campaignId – the given Campaign ID.

Get Targeting

Get the Campaign Targeting by ID and by Campaign ID.

URL: /rest-api/campaign/{campaignId}/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 was not found for the given Campaign.

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.
  • campaignId – the given Campaign ID.

Get All Targetings

Get all Campaign Targetings by Campaign ID.

URL: /rest-api/campaign/{campaignId}/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.
  • campaignId – the given Campaign ID.

Get Targeting Types

Get the Campaign Targeting types by Campaign ID.

URL: /rest-api/campaign/{campaignId}/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 was not found for the given Campaign.

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.
  • campaignId – the given Campaign ID.

Remove Targeting

Removes Targeting by Targeting ID and Campaign ID.

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

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

Disable Targeting

Disables Targeting for the given Campaign completely.

URL: /rest-api/campaign/{campaignId}/targeting/disable.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.
  • 404 Not Found – Targeting with the given ID was not found for the given Campaign.

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.
  • campaignId – the given Campaign ID.

Set Browser Targeting

Sets the Browser Targeting for the given Campaign ID (and enables if it was disabled).

URL: /rest-api/campaign/{campaignId}/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 Campaign 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.
  • campaignId – the given Campaign ID.
  • rule – EXCLUDE or INCLUDE.
  • browser – user's Browser.
  • relation – values are LOWER, GREATER, LOWER_EQUAL, GREATER_EQUAL, or EQUAL.
  • browserVersion – version of the user's Browser.

Set Channel Targeting

Sets the Channel Targeting by Campaign ID.

URL: /rest-api/campaign/{campaignId}/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 Campaign 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.
  • campaignId – the given Campaign ID.
  • channel – Targeting Channel name.
  • rule – EXCLUDE or INCLUDE.

Set Cookie Targeting

Sets the Cookie Value Targeting by Campaign ID (and enables if it was disabled).

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

Set Country Targeting

Sets the Country Targeting by Campaign ID (and enables if it was disabled).

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

Set Custom Parameter Targeting

Sets Custom Parameter Targeting by Campaign ID.

URL: /rest-api/campaign/{campaignId}/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 Campaign 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.
  • campaignId – the given Campaign ID.
  • rule – EXCLUDE or INCLUDE.
  • expression – – valid expression (Sample: ($p1==1 || $p1=='a') && ($p2>=12 && $p2<=22) )

Set Targeting by Day of the Week

Sets Day of the Week Targeting by Campaign ID.

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

Set Targeting by Device Format

Sets the Device Type Targeting by Campaign ID (and enables if it was disabled).

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

Set Device Vendor Targeting

Sets the Targeting by device for the given Campaign ID (and enables if it was disabled).

URL: /rest-api/campaign/{campaignId}/targeting/device/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 – 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.
  • campaignId – the given Campaign ID.
  • deviceVendor – Device Vendor.
  • rule – EXCLUDE or INCLUDE.

Set Domain Targeting

Sets the referrer Domain Targeting by Campaign ID (and enables if it was disabled).

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

Set Preset Domain Group Targeting

Sets the Preset Domain Group targeting by Campaign ID (and enables if it was disabled).

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

Set Targeting by IP range

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

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

Set Targeting by Location

Sets Location Targeting by Campaign ID.

URL: /rest-api/campaign/{campaignId}/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 Campaign 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.
  • campaignId – the given Campaign 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.

Set Targeting by Language

Sets the Language Targeting by Campaign ID (and enables if it was disabled).

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

Set Mobile Carrier Targeting

Sets the Mobile Carrier Targeting by Campaign ID.

URL: /rest-api/campaign/{campaignId}/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 Campaign 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.
  • campaignId – the given Campaign ID.
  • rule – EXCLUDE or INCLUDE.
  • mobileCarriers – array of mobile carrier names.

Set Targeting by OS

Sets Operating System Targeting by Campaign ID.

URL: /rest-api/campaign/{campaignId}/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 Campaign 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.
  • campaignId – the given Campaign ID.
  • operatingSystem – OS name.
  • rule – EXCLUDE or INCLUDE.
  • version – version value from the list: /rest-api/campaign/{campaignId}/targeting/os/{osName}/versions.do
  • relation – relation, available values: LOWER, GREATER, LOWER_EQUAL, GREATER_EQUAL, EQUAL.

Get available values for OS Targeting

Get available Operating System values for OS Targeting type

URL: /rest-api/targeting/os/values.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – no banner found.

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.

Get OS versions for OS Targeting

Get available values of OS versions for Operating System Targeting type.

URL: /rest-api/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 – no banner found.

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.
  • osName – the name of Operation System from list of available OS values.

Set Targeting by Screen Resolution.

Sets the Screen Resolution Targeting by Campaign ID.

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

Set Targeting by Time Range

Sets Targeting by Time Range for Campaign.

URL: /rest-api/campaign/{campaignId}/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 – 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.
  • campaignId – the given Campaign ID.
  • timeFrom – Starting time string in 24h format (hh:MM).
  • timeTo – Ending time string in 24h format (hh:MM).
  • rule – EXCLUDE or INCLUDE.

Set WiFi traffic Targeting

Sets the Campaign WiFi traffic Targeting by Campaign ID.

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

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.