Set Limits

Set the Campaign Limits information by Campaign ID.

URL: /rest-api/campaign/{campaignId}/limits/set.do
Method: POST
Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. No Campaign or Pricing is not enabled for the given Campaign.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Request Parameters:

  • Long totalImpressionsLimit; Long totalClicksLimit; Double totalBudgetLimit; Long dailyImpressionsLimit; Long dailyClicksLimit; Double dailyBudgetLimit; Long totalImpressions; Long totalClicks; Double totalBudget; Long dailyImpressions; Long dailyClicks; Double dailyBudget.
  • startDate – limit start, "yyyy–MM–dd–HH–mm".
  • endDate – limit end, "yyyy–MM–dd–HH–mm".
  • useLocalTime - value for using the Local Time for the Date & Time Limits, true/false.
  • timezoneOffset - sets the user's timezone offset in minutes; integer. Required if useLocalTime value is set to true. To get user's timezone, run the following JS code: new Date().getTimezoneOffset()/-1
  • evenPacing – value for Even Pacing option; true/false.
  • totalImpressionsLimit – limit for Impressions.
  • totalClicksLimit – limit for Clicks.
  • totalBudgetLimit – limit for budget.
  • dailyImpressionsLimit – daily limit for Impressions.
  • dailyClicksLimit – daily limit for Clicks.
  • dailyBudgetLimit – daily limit for budget.
  • totalImpressions – current value for Impressions.
  • totalClicks – current value for Clicks.
  • totalBudget – current value for budget.
  • dailyImpressions – value for Impressions for current day.
  • dailyClicks – value for Clicks for current day.
  • dailyBudget – value for budget for current day.

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.

Update Limits

Updates the Campaign Limits information by Campaign ID.

URL: /rest-api/campaign/{campaignId}/limits/update.do
Method: POST
Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. No Campaign or Pricing is not enabled for the given Campaign.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – no Limits enabled or Campaign not found.

Request Parameters:

  • Long totalImpressionsLimit; Long totalClicksLimit; Double totalBudgetLimit; Long dailyImpressionsLimit; Long dailyClicksLimit; Double dailyBudgetLimit; Long totalImpressions; Long totalClicks; Double totalBudget; Long dailyImpressions; Long dailyClicks; Double dailyBudget.
  • startDate – limit start, "yyyy–MM–dd–HH–mm".
  • endDate – limit end, "yyyy–MM–dd–HH–mm".
  • totalImpressionsLimit – limit for Impressions.
  • totalClicksLimit – limit for Clicks.
  • totalBudgetLimit – limit for budget.
  • dailyImpressionsLimit – daily limit for Impressions.
  • dailyClicksLimit – daily limit for Clicks.
  • dailyBudgetLimit – daily limit for budget.
  • totalImpressions – current value for Impressions.
  • totalClicks – current value for Clicks.
  • totalBudget – current value for budget.
  • dailyImpressions – value for Impressions for current day.
  • dailyClicks – value for Clicks for current day.
  • dailyBudget – value for budget for current day.
  • removeStartDateLimit - remove start date limit, true/false.
  • removeEndDateLimit - remove end limit, true/false.

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 Limits

Get the Campaign Limits information by Campaign ID.

URL: /rest-api/campaign/{campaignId}/limits.do
Method: GET
Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – no Limits set for the 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.

Reset Limits

Resets the Campaign Limits counter values by Campaign ID and counter type.

URL: /rest-api/campaign/{campaignId}/limits/reset.do
Method: DELETE
Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. No Campaign or Pricing is not enabled for the given campaign.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – no Limits set for the 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.
  • limitCounters – list of counters to reset, available values: TOTAL_IMPRESSIONS, TOTAL_CLICKS, TOTAL_REVENUE, DAILY_IMPRESSIONS, DAILY_CLICKS, DAILY_REVENUE.

Disable Limits

Disables Campaign Limits.

URL: /rest-api/campaign/{campaignId}/limits.do
Method: DELETE
Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. No Campaign or Pricing is not enabled for the given Campaign.
  • 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 Campaign Per-action Limits

Returns Per-action Limits for the given Campaign ID.

URL: /rest-api/per-action/limits/CAMPAIGN/{campaignId}.do
Method: GET
Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. Some of provided parameters are invalid.
  • 401 Unauthorized – authentication error.

Response sample:
200 OK
{actionLimits:[
{id:"1", entityId:"1", totalConversionsLimit:"2", totalConversions:"1", dailyConversionsLimit:"1", dailyConversionsLimit:"1"}
,...]}

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.

Add Per-action Limit

Adds Per-action Limit for the given Campaign and Action.

URL: /rest-api/per-action/add/limit/CAMPAIGN/{campaignId}.do
Method: POST
Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. Some of provided parameters are invalid.
  • 401 Unauthorized – authentication error.

Response sample:
200 OK
{success:"true"}

Parameters:

  • actionId – ID of an Action that should be limited.
  • totalConversionsLimit – a value of Total Per-action Limit.
  • dailyConversionsLimit – a value of Daily Per-action Limit.
  • 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.

Update Per-action Limit

Updates Per-action Limit for the given Campaign and Action.

URL: /rest-api/per-action/update/limit/CAMPAIGN/{campaignId}.do
Method: POST
Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. Some of provided parameters are invalid.
  • 401 Unauthorized – authentication error.

Response sample:
200 OK
{success:"true"}

Parameters:

  • actionId – ID of an Action that should be limited.
  • totalConversionsLimit – a value of Total Per-action Limit.
  • dailyConversionsLimit – a value of Daily Per-action Limit.
  • 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.

Delete Per-action Limit

Deletes Per-action Limit for the given Campaign and Action.

URL: /rest-api/per-action/delete.do
Method: POST
Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. Some of provided parameters are invalid.
  • 401 Unauthorized – authentication error.

Response sample:
200 OK
{success:"true"}

Parameters:

  • entityId – id of a Campaign.
  • ids – comma separated per-action limits ids that should be deleted.
  • type – entity type. Should equal to CAMPAIGN.
  • 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.

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.