Create Capping for Placement

Creates Capping for the given Placement.

URL: /rest-api/placement/capping/{placementId}.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.
  • placementId – ID of the Placement.
  • type – capping type. Available values: PLACEMENT_FREQUENCY, PLACEMENT_CLICKS, PLACEMENT_ACTIONS, PLACEMENT_REQUEST.
  • amount – amount of Capping.
  • period – Capping period.
  • periodType – type of period (MINUTE, HOUR, DAY, WEEK, MONTH, YEAR).
  • flat – Flat identifier (i.e.: even distribution of the Capping): true/false.
  • subject – Capping subject type. Available values: USER, IP, LES_IP.

Get Placement Capping List

Get the list of Cappings for the given Placement.

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

Error codes:

  • 401 Unauthorized – authentication error.

Response sample:

200 OK
{"cappings":[{"amount":1,"period":1,"periodType":"HOUR","flat":false,
"readOnly":false,"subject":"USER","id":103,"cappingType":"PLACEMENT_CLICKS",
"cappingTypeStr":"Click Capping","cappingInMs":3600000},

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

{"amount":0,"period":1,"periodType":"HOUR","flat":false,"readOnly":false,
"subject":"USER","id":103,"cappingType":"PLACEMENT_REQUEST",
"cappingTypeStr":"Request Capping","cappingInMs":3600000},

{"amount":0,"period":1,"periodType":"HOUR","flat":false,"readOnly":false,
"subject":"USER","id":120,"cappingType":"PLACEMENT_FREQUENCY",
"cappingTypeStr":"Frequency 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.
  • placementId – ID of the Placement.

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: PLACEMENT_FREQUENCY, PLACEMENT_CLICKS, PLACEMENT_ACTIONS, PLACEMENT_REQUEST.
  • 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:PLACEMENT_FREQUENCY","456:PLACEMENT_CLICKS","13:PLACEMENT_ACTIONS", "145:PLACEMENT_REQUEST"

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.