Get Campaign Capping List

Get the list of Cappings for the given Campaign.

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

Error codes:

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

Response sample:

200 OK
{"cappings":[{"amount":2,"period":1,"periodType":"DAY","flat":false,
"readOnly":false,"subject":"USER","id":208,"cappingType":"CAMPAIGN_FREQUENCY",
"cappingTypeStr":"Frequency Capping","cappingInMs":86400000},

{"amount":1,"period":1,"periodType":"HOUR","flat":false,"readOnly":false,
"subject":"USER","id":168,"cappingType":"CAMPAIGN_ACTIONS",
"cappingTypeStr":"Action Capping","cappingInMs":3600000},

{"amount":0,"period":1,"periodType":"HOUR","flat":false,"readOnly":false,
"subject":"USER","id":171,"cappingType":"CAMPAIGN_CLICKS",
"cappingTypeStr":"Click Capping","cappingInMs":3600000}],"success":true}

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 Capping by ID

Updates Capping by its ID.

URL: /rest-api/capping/{cappingId}.do
Method: POST
Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

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

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.
  • type – capping type. Available values: CAMPAIGN_FREQUENCY, CAMPAIGN_CLICKS, CAMPAIGN_ACTIONS, BANNER_FREQUENCY, BANNER_CLICKS, BANNER_ACTIONS, PLACEMENT_FREQUENCY, PLACEMENT_CLICKS, PLACEMENT_ACTIONS, ADVERTISER_FREQUENCY.
  • amount – amount of Capping.
  • period – Capping period.
  • periodType – type of Capping period: MINUTE, HOUR, DAY, WEEK, MONTH, YEAR.
  • flat – true/false. Defines whether Capping amount will be distributed evenly during the defined period.
  • subject – Capping subject type. Available values: USER, IP, LES_IP.

Remove Capping by ID

Removes the Capping by its ID.

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

Error codes:

  • 400 Bad Request – wrong request format. Capping with given ID not found.
  • 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.
  • ids – array of string pairs:
    {capping_id:capping_type}

    Example:
    id= "72:CAMPAIGN_FREQUENCY","456:PLACEMENT_CLICKS","13:BANNER_ACTIONS"

Action Capping

Get Action Capping

Get the Campaign Action Capping information by Campaign ID.

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

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Campaign with the given ID is not 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 in hash generation.
  • username – the given username.
  • campaignId – the given Campaign ID.

Set Action Capping

Sets the Campaign Action Capping values by Campaign ID (or enables if it was disabled).

URL: /rest-api/campaign/{campaignId}/actionCapping/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.
  • 404 Not Found – Campaign with the given ID is not 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 in hash generation.
  • username – the given username.
  • campaignId – the given Campaign ID.
  • amount – amount of Capping.
  • period – period for Capping.
  • periodType – period type, available values: HOUR, DAY, WEEK, MONTH, YEAR.
  • evenDistribution – value for even distribution (true/false).

Update Action Capping

Sets the Campaign Action Capping values by Campaign ID (or enables if it was disabled).

URL: /rest-api/campaign/{campaignId}/actionCapping/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 – Campaign with the given ID not 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 in hash generation.
  • username – the given username.
  • id – ID of the Capping record to update.
  • campaignId – the given Campaign ID.
  • amount – amount of Capping.
  • period – period for Capping.
  • periodType – period type, available values: HOUR, DAY, WEEK, MONTH, YEAR.
  • evenDistribution – value for even distribution (true/false).

Remove Action Capping

Removes the Campaign Action Capping by Campaign ID.

URL: /rest-api/campaign/{campaignId}/actionCapping.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.

Click Capping

Get Click Capping

Get the Click Capping information by Campaign ID.

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

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Campaign with given ID not found.

Response sample:
200 OK
{id: 1, paymentModel: "CPM", price: 0.03, countries: [{country: "US", price: 0.02}, {country: "UK", price: 0.025}, ... }

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 Click Capping

Sets Click Capping values by Campaign ID (and enables if it was disabled).

URL: /rest-api/campaign/{campaignId}/clickCapping/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.
  • 404 Not Found – Campaign not 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 in hash generation.
  • username – the given username.
  • campaignId – the given Campaign ID.
  • amount – amount of Capping.
  • period – period for Capping.
  • periodType – period type, available values: HOUR, DAY, WEEK, MONTH, YEAR.
  • evenDistribution – value for even distribution (true/false).

Update Click Capping

Sets the Click Capping values by Campaign ID (and enables if it was disabled) .

URL: /rest-api/campaign/{campaignId}/clickCapping/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 – Campaign not 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 in hash generation.
  • username – the given username.
  • id – ID of the Capping record to update.
  • campaignId – the given Campaign ID.
  • amount – amount of Capping.
  • period – period for Capping.
  • periodType – period type, available values: HOUR, DAY, WEEK, MONTH, YEAR.
  • evenDistribution – value for even distribution (true/false).

Remove Click Capping

Removes the Click Capping by Campaign ID.

URL: /rest-api/campaign/{campaignId}/clickCapping.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.

Frequency Capping

Get Frequency Capping

Get the Frequency Capping information by Campaign ID.

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

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.
  • 404 Not Found – Campaign with given ID not found.

Response sample:
200 OK
{id: 1, paymentModel: "CPM", price: 0.03, countries: [{country: "US", price: 0.02}, {country: "UK", price: 0.025}, ... }

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 Frequency Capping

Sets Frequency Capping values by Campaign ID (and enables if it was disabled) .

URL: /rest-api/campaign/{campaignId}/frequencyCapping/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.
  • 404 Not Found – Campaign not 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 in hash generation.
  • username – the given username.
  • campaignId – the given Campaign ID.
  • amount – amount of Capping.
  • period – period for Capping.
  • periodType – period type, available values: HOUR, DAY, WEEK, MONTH, YEAR.
  • evenDistribution – value for even distribution (true/false).

Update Frequency Capping

Sets the Frequency Capping values by Campaign ID (and enables if was disabled).

URL: /rest-api/campaign/{campaignId}/frequencyCapping/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 – Campaign not 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 in hash generation.
  • username – the given username.
  • id – ID of the Capping record to update.
  • campaignId – the given Campaign ID.
  • amount – amount of Capping.
  • period – period for Capping.
  • periodType – period type, available values: HOUR, DAY, WEEK, MONTH, YEAR.
  • evenDistribution – value for even distribution (true/false).

Remove Frequency Capping

Removes the Frequency Capping by Campaign ID.

URL: /rest-api/campaign/{campaignId}/frequencyCapping.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.

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.