Recommendations Response

When LiteSwitch returns recommendations, it does so by listing the Buyers that were passed in the request and a Yes/No answer whether to send the bid request to each.

Important

While it is possible to ignore the recommendation and send all requests to Buyers, it is strongly recommended that you follow the recommendations.

Impressions Array of Objects

Value

Type

Description

imp

array of objects

(Required) Returns an array of objects that match the ad slots in the original request. Each imp.id is returned with a list of matching Buyer recommendations.

learning

integer

(Required) Indicates whether the recommendation is learning traffic. 1 for Yes and 0 for No.

Learning traffic is random traffic and used to detect changes in buying preferences. If a Buyer starts buying more from a specific traffic segment, then LiteSwitch recommends more traffic from that segment. This also works vice-versa, if a Buyer stops buying from a particular traffic segment, LiteSwitch recommends less traffic of that type.

bc

string

(Required) Returns the bid context to be used as part of Yes-bid data sync call, e.g. "YmFzZTY0IGluc2lkZSBiYXNlNjQ=". This string should be passed exactly as returned as part of any futher data syncs.

Impression Object

Impression Object Properties

Value

Type

Description

id

str

(Required) Returns the impression ID to which the recommendation applies.

recs

object

(Required) Returns Yes/No recommendation for the seat for which the request is being assessed.

Recommendation Object

Note

The rec field highlighted with bold has a specific format: the numeric value of this field is mapped to the wseat request field value. For better understanding please refer to the example below and the Recommendation Request section of this spec

Recs Object Properties

Value

Type

Description

seat

str

(Required) Returns the seat ID to which the recommendation applies.

rec

int

(Required) Returns a recommendation whether to send the Buyer seat this impression opportunity, 1 for yes, 0 for no.

Recommendations Example

You can also download the recommendation response JSON schema for validation.

{
  "imp": [
    {
      "id": "1",
      "recs": {
        "68": 0,
        "99": 1,
        "145": 0
      }
    },
    {
      "id": "2",
      "recs": {
        "68": 1,
        "99": 1,
        "145": 0
      }
    }
  ],
  "learning": 1,
  "bc": "eyJpbXAiOlt7ImlkIjoiMSIsInJlY3MiOlt7InNlYXQiOiI2OCIsInJlYyI6MH0seyJzZWF0IjoiOTkiLCJyZWMiOjF9LHsic2VhdCI6IjE0NSIsInJlYyI6MH1dfV0sImxlYXJuaW5nIjowLCJiYyI6IlltRnpaVFkwSUdsdWMybGtaU0JpWVhObE5qUT0ifQ=="
}