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

array of objects

(Required) Returns an array of Yes/No recommendations for each seat for which the request is being assessed.

Recommendation Object

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": [
        {
          "seat": "68",
          "rec": 0
        },
        {
          "seat": "99",
          "rec": 1
        },
        {
          "seat": "145",
          "rec": 0
        }
      ]
    },
    {
      "id": "2",
      "recs": [
        {
          "seat": "68",
          "rec": 1
        },
        {
          "seat": "99",
          "rec": 1
        },
        {
          "seat": "145",
          "rec": 0
        }
      ]
    }
  ],
  "learning": 1,
  "bc": "eyJpbXAiOlt7ImlkIjoiMSIsInJlY3MiOlt7InNlYXQiOiI2OCIsInJlYyI6MH0seyJzZWF0IjoiOTkiLCJyZWMiOjF9LHsic2VhdCI6IjE0NSIsInJlYyI6MH1dfV0sImxlYXJuaW5nIjowLCJiYyI6IlltRnpaVFkwSUdsdWMybGtaU0JpWVhObE5qUT0ifQ=="
}