API methods

campaign_update

POST /

Updates (creates, if don’t exist) campaign data, including banners.

Please note:

  • the params attribute contains a list of CampaignObject.
  • time_end needs to be larger than the time of select request (banner-select) method. Otherwise it will not be returned (the campaign has expired).

Example request:

POST / HTTP/1.1
Host: example.com

{
 "jsonrpc": "2.0",
 "method": "campaign_update",
 "id": 2,
 "params": [
      {
      "time_start": 1543326642,
      "time_end": 1643326642,
      "campaign_id": "BXfmBKBdsQdDOdNbCtxd",
      "filters": {
                  "require": {
                              "age": ["18--30"],
                              "interest": ["cars"],
                              "movies": ["action", "horror", "thriller"]
                              },
                  "exclude": {"country": ["DE"]}
                  },
      "keywords": {},
      "banners": [
          {
              "keywords": {"movies": "horror"},
              "banner_id": "ZBOGqlCqaqjDICNWHRnT",
              "banner_size": "100x400"
          },
          {
              "keywords": {"movies": "action"},
              "banner_id": "FcNMkMibdAZMSdqugKvb",
              "banner_size": "100x400"
          }
      ]
  }
  ]
 }

Example success response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "jsonrpc": "2.0",
    "result": "True",
    "id": 2
}
Response Headers:
 
Status Codes:

campaign_delete

POST /

Removes campaign data (including banners) from AdSelect database.

Example request:

POST / HTTP/1.1
Host: example.com

{
 "jsonrpc": "2.0",
 "method": "campaign_delete",
 "id": 2,
 "params": [
            "432gfdxhs",
            "3wr42trse",
            "fsdsafsw4"
           ]
 }

Example success response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "jsonrpc": "2.0",
    "result": "True",
    "id": 2
}
Response Headers:
 
Status Codes:

impression_add

POST /

Add information about impressions to AdSelect.

Example request:

POST / HTTP/1.1
Host: example.com

{
 "jsonrpc": "2.0",
 "method": "impression_add",
 "id": 2,
 "params": [
            {
              "event_id": "nalpVedsadJUgt"
              "keywords": {"movies": "horror"},
              "publisher_id": "SnalpVeRjxGSUWsGPRQl",
              "banner_id": "vsbbPLCnckRzPUZtMXXU",
              "user_id": "tLCCzlEJUgtJyMyqqJFn"
          }
          ]
 }

Example success response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "jsonrpc": "2.0",
    "result": "True",
    "id": 2
}
Response Headers:
 
Status Codes:

impression_payment_add

POST /

Add information about impressions to AdSelect.

Example request:

POST / HTTP/1.1
Host: example.com

{
 "jsonrpc": "2.0",
 "method": "impression_payment_add",
 "id": 2,
 "params": [
            {
              "event_id": "nalpVedsadJUgt"
              "keywords": {"movies": "horror"},
              "publisher_id": "SnalpVeRjxGSUWsGPRQl",
              "banner_id": "vsbbPLCnckRzPUZtMXXU",
              "user_id": "tLCCzlEJUgtJyMyqqJFn",
              "paid_amount": 0.277
          }
          ]
 }

Example success response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "jsonrpc": "2.0",
    "result": "True",
    "id": 2
}
Response Headers:
 
Status Codes: