Skip to main content

Ad request

What your backend sends for one page view: the placements to fill and the page context.

Fields​

FieldTypeRequiredDescription
domain_idintegerYesYour domain id: the number of your market on GoWit. GoWit shares it with your host and keys. Stage and production use their own values.
session_idstringYesThe shopper's session id. Keep it stable for the whole attribution window: impressions, clicks and sales are matched to ads by it.
placementsobject[]YesThe slots on this page that should be filled. Each is answered in order.
placements[].placement_idintegerYesThe key of the placement, set when the placement was created. See Placements.
placements[].placement_identifierstringNoYour own label for the slot. It is echoed back on the response so you can route ads to the right slot.
placements[].max_adsintegerNoAsk for fewer ads than the placement allows. It can never raise the placement maximum. A negative value asks for no ads.
placements[].filtersarrayNoProduct label filters. Groups are combined with AND, values inside a group with OR. Example: [["brand:acme"],["color:red","color:blue"]].
productsobject[]When listing pagesThe products listed organically on the page, in page order, each with its category. GoWit uses them for relevance. On a product detail page put the viewed product first. Leave it out when the page lists no products (e.g. a homepage).
products[].idstringYesThe product id you sent in the catalog push. Not the sku.
products[].categorystringNoThe product category as a text path, the same way it appears in retailer_taxonomy, e.g. Outdoor>Footwear. Used for relevance.
products[].categoriesstring[]NoSeveral category paths for a product listed in more than one category.
searchstringWhen on search pagesThe shopper's search query. Drives keyword targeting.
categorystringWhen on category pagesThe exact category path of the page, e.g. Outdoor>Footwear.
category_idstringNoYour own category code, accepted in place of category. When the code is unknown, category is used.
page_numberintegerNoResults page, starting at 0. Lets ads continue in ranked order on page 2, 3, … Default 0.
max_adsintegerNoDefault max_ads for every placement in this request.
region_idstringWhen on multi-region marketsRegion of the shopper, for region targeting. Required when your market is set up per region.
city_idstringWhen on multi-city marketsCity of the shopper. Required when your market is set up per city (or send customer.city).
location_idstringNoStore code. Stock and price are read for that store (see multi-location stock).
languagestringNoISO 639-1 language code of the page, e.g. en. Several codes may be separated by commas.
customerobjectNoShopper context. Every field is optional and a bad value is dropped, never refused.
customer.customer_idstringNoYour pseudonymous shopper id. Used for audience targeting and to attribute sales across sessions. Never send an e-mail address or phone number: values shaped like one are discarded. Placeholder values such as 0 or anonymous are ignored.
customer.device_typestringNoDevice of the shopper, for markets with app or device rules.
customer.environment_typestringNoEnvironment of the shopper (e.g. app or web), for markets with app rules.
customer.citystringNoShopper city. Can stand in for city_id on city-based markets.
customer.user_agentstringNoThe shopper browser user agent. Known crawlers get no ad.
customer.is_botbooleanNoSend true when your own bot detection flags the visit. The request gets no ad (204).

Shape​

{
"domain_id": 1001,
"session_id": "ec07083a-8bf812",
"placements": [
{
"placement_id": 1,
"placement_identifier": "<placement_identifier>",
"max_ads": 0,
"filters": "<filters>"
}
],
"products": [
{
"id": "P30001",
"category": "Outdoor>Footwear",
"categories": []
}
],
"search": "hiking boots",
"category": "Outdoor>Footwear",
"category_id": "<category_id>",
"page_number": 0,
"max_ads": 0,
"region_id": "<region_id>",
"city_id": "<city_id>",
"location_id": "<location_id>",
"language": "<language>",
"customer": {
"customer_id": "<customer_id>",
"device_type": "<device_type>",
"environment_type": "<environment_type>",
"city": "<city>",
"user_agent": "<user_agent>",
"is_bot": true
}
}