Campaign Pricing API
Get Campaign Pricing
Get the Pricing information by Campaign ID.
URL: /rest-api/campaign/{campaignId}/pricing.do
Method: GET
Response format: application/json
Error codes:
- 401 Unauthorized – authentication error.
- 403 Forbidden – not enough permissions.
- 404 Not Found – no Pricing for 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
Update Campaign Pricing
Updates the Pricing information by Campaign ID.
URL: /rest-api/campaign/{campaignId}/pricing.do
Method: POST
Response format: application/json
Error codes:
- 400 Bad Request – wrong request format. E.g., wrong types for parameters or Campaign ID doesn't exist.
- 401 Unauthorized – authentication error.
- 403 Forbidden – not enough permissions.
Request Parameters:
- price – Campaign Pricing as a double (required).
- paymentModel – FIXED_PRICE (required).
- pricingType – CPM, CPC or CPA (required).
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.
- estimatedCtr – Estimated CTR value as a double. Should be bigger than 0.
- estimatedConversionRate – Estimated I2C value as a double. Shouldn't be less than 0.
- burnUpPeriod – Burn-up period value as an integer. Shouldn't be less than 0.
- minConversions – Minimal Conversions value as a long. Shouldn't be less than 0.
- minClicks – Minimal Clicks value as a long. Shouldn't be less than 0.
- startUpPeriod – Start-up period value as an integer. Shouldn't be less than 0.
Update Campaign Pricing for Country
Updates the Country Pricing record for the given Campaign by its ID.
URL: /rest-api/campaign/{campaignId}/pricing/{countryCode}.do
Method: POST
Response format: application/json
Error codes:
- 400 Bad Request – wrong request format. E.g., wrong types for parameters, given Campaign or Country do not exist.
- 401 Unauthorized – authentication error.
- 403 Forbidden – not enough permissions.
Request Parameters:
price – Campaign Pricing as a double.
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".
Batch update of Country Pricing
Update the Country Pricing information by Campaign ID from csv pricing file.
URL: /rest-api/campaign/{campaignId}/pricing/batch.do
Method: POST
Response format: application/json
Error codes:
- 400 Bad Request – wrong request format. E.g. wrong types for parameters, Campaign doesn't exist, or Campaign Pricing is disabled.
- 401 Unauthorized – authentication error.
- 403 Forbidden – not enough permissions.
Request Parameters:
countryPricing – csv formatted file with country prices.
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.
- countryPrices – csv formatted file with country prices.
Update Pricing for CPA/CPC Campaign
URL: /rest-api/campaign/{campaignId}/campaignPricing/actionPricing.do
Method: POST
Response format: application/json
Error codes:
- 400 Bad Request – wrong request format. E.g., wrong types for parameters or Campaign ID doesn't exist.
- 401 Unauthorized – authentication error.
- 403 Forbidden – not enough permissions.
Response sample:
200 OK
Request parameters:
- price – Campaign Pricing as a double.
- actionName – name of an existing action in specified Campaign as a String.
- actionKey – key of an existing action in specified Campaign as a String.
Parameters:
- hash – a MD5 digest of concatenated username's MD5 password and the given timestamp.
- timestamp – UNIX timestamp in milliseconds used in hash generation.
- username – the given username.
- campaignId – the given Campaign ID.
Disable Campaign Pricing for Country
Disable the Country Pricing record for the given Campaign by its ID.
URL: /rest-api/campaign/{campaignId}/pricing/{countryCode}.do
Method: DELETE
Response format: application/json
Error codes:
- 400 Bad Request – wrong request format. E.g., wrong types for parameters, given Campaign or Country do not 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".
Disable Pricing for the Campaign
Disables Campaign Pricing.
URL: /rest-api/campaign/{campaignId}/pricing.do
Method: DELETE
Response format: application/json
Error codes:
- 400 Bad Request – wrong request format. E.g., Campaign 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.
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.