Get Site Pricing

Get Pricing summary for a given Site.

Requires ENABLED or READONLY level of SITE_PAYMENT_MODEL permission.

URL: /rest-api/sites/{siteId}/pricing.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

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.

Set Site Pricing

Set pricing model for a given Site.

Requires ENABLED level on SITE_PAYMENT_MODEL permission.

URL: /rest-api/sites/{siteId}/pricing.do

Method: POST

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

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.
  • paymentModel – one of the following JSON parameters: FIXED_CPM, FIXED_CPC.
    Example:
    {"paymentModel":"FIXED_PRICE","pricingType":"CPM","price":1.0,"countryPricing":[{"US":2.0},{"UK":2.0},{"UA":2.0}]}{"paymentModel":"FIXED_PRICE","pricingType":"CPM","price":2.0}{"revenueShare":80}

Remove Country Pricing for given Site

Requires ENABLED level on SITE_PAYMENT_MODEL permission.

URL: /rest-api/sites/{siteId}/pricing/{countryCode}.do

Method: DELETE

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters, Banner or Country does not exist, or Pricing is disabled for the given Banner.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Request parameters:

  • siteId – ID of Site.
  • countryCode – ISO Country code. To pass multiple Country codes use: "UK, US, CA".
  • actionId – Action ID or null.

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.

Update Country Pricing for given Site

Requires ENABLED level on SITE_PAYMENT_MODEL permission.

URL: /rest-api/sites/{siteId}/pricing/{countryCode}.do

Method: POST

Response format: application/json

Error codes:

  • 400 Bad Request – wrong request format. E.g., wrong types for parameters, Banner or Country does not exist, or Pricing is disabled for the given Banner.
  • 401 Unauthorized – authentication error.
  • 403 Forbidden – not enough permissions.

Response sample:
200 OK

Request parameters:

  • siteId – ID of Site.
  • countryCode – ISO Country code. To pass multiple Country codes use: "UK, US, CA".
  • actionId – Action ID or null.
  • price – Banner price as a double.

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.

Get Site CPM Threshold Summary

Get a CPM threshold summary for a given Site.

It requires ENABLED or READONLY level on MANAGE_PRICING permission and ENABLED level on CPM_PAYMENT_MODEL permission.

URL: /rest-api/sites/{siteId}/cpm-thresholds.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

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.

Set Site CPM Thresholds

Set CPM thresholds for a given Site.

Requires ENABLED level on MANAGE_PRICING permission and ENABLED level on CPM_PAYMENT_MODEL permission.

URL: /rest-api/sites/{siteId}/cpm-thresholds.do

Method: POST

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

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.
  • cpmThreshold – default CPM threshold value for Site.
  • siteCountryCPMThresholds – list of ISO Country codes for CPM threshold mapping.

Delete Site CPM Threshold

Deletes CPM thresholds for a given Site.

Requires ENABLED level of the MANAGE_PRICING permission and ENABLED level of the CPM_PAYMENT_MODEL permission.

URL: /rest-api/sites/{siteId}/cpm–thresholds/delete.do

Method: POST

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

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.

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.