Skip to main content
api

Sponsored Ads API

active
Audience: developerUpdated 2026-07-28

Exhaustive reference for the Sponsored Ads API — every field of the request and the response. Retail media services use it to request sponsored advertisements from the Binoban platform, tailored to specific products, categories, or keywords.

For the step-by-step integration, see Request and render Sponsored Ads.

Endpoint

POST {rtbPath}/api/rtb/sponsoredAd

rtbPath is the host URL from your connection. This endpoint takes no authentication — do not send an Authorization header.

Headers:

  • accept: */*
  • Content-Type: application/json

Request body

FieldDescriptionTypeConstraintsMandatory
productIdID of the product to show related ads for (e.g., when user is on a product page)StringmaxLength: 255No
categoryIdID of the category to show related ads for (e.g., when user is on a category page)StringmaxLength: 255No
keywordSearch keyword to show related ads for (e.g., based on user’s search query)StringmaxLength: 255No
idUnique UUID to identify the requestStringUUID formatYes
adSlotIdsArray of ad slot IDs for ad placements, predefined in Binoban’s back-office (contact Binoban team for setup)Array[Integer]$int32Yes
mediaSourceDetails of the media source sending the requestObject-No
mediaSource.typeType of the media source (e.g., app or website)StringEnum: APP, SITEYes
mediaSource.pageFull URL of the page being viewedStringmaxLength: 512No
mediaSource.versionVersion of the application (if applicable)StringmaxLength: 100No
mediaSource.propertiesAdditional key-value pairs for future useObjectArbitrary key-value pairsNo
deviceDevice information for the requestObject-No
device.userAgentUser agent of the deviceStringmaxLength: 512No
device.ipIP address of the deviceStringmaxLength: 45No
device.modelDevice model (e.g., iPhone 14)StringmaxLength: 100No
device.widthScreen width in pixelsInteger$int32No
device.heightScreen height in pixelsInteger$int32No
device.operatingSystemOperating system of the deviceStringEnum: ANDROID, IOS, IPOD, LINUX, WINDOWS, MACNo
device.browserBrowser used by the deviceStringEnum: CHROME, SAFARI, EDGE, INTERNET_EXPLORER, FIREFOX, CHROMIUM, FACEBOOK_IN_APP_BROWSER, WEBVIEW, SAMSUNG_BROWSER, GOOGLE_SEARCH_APP, ANDROID_APP, OPERA, MIUI_BROWSER, AMAZON_SILK, UC_BROWSER, YANDEX, APPLE_IN_APP_BROWSERNo
device.deviceTypeType of the deviceStringEnum: MOBILE, TABLET, DESKTOP, TV, CONNECTED_DEVICE, SET_TOP_BOXNo
userUser information for the requestObject-No¹
user.idDevice identifier (from Binoban SDK), critical for conversion tracking; recommended to include for accurate attributionStringmaxLength: 255No¹
user.userIdID of the logged-in userStringmaxLength: 255No¹
timeoutRequest timeout in milliseconds (default: 200ms for ad networks)Number-No

¹ The user (user.id or user.userId or both) field is highly recommended for conversion tracking to ensure accurate attribution, ideally sourced from the Binoban SDK. See Web SDK reference → Identity for complete details.

Example request

{
"productId": "shoe123",
"categoryId": "cat456",
"keyword": "sneakers",
"id": "550e8400-e29b-41d4-a716-446655440000",
"adSlotIds": [
1073741824
],
"mediaSource": {
"id": "source789",
"name": "Sneaker Store Homepage",
"domain": "example.com",
"type": "SITE",
"page": "https://www.example.com/home",
"version": "1.0.0",
"properties": {
"theme": "dark",
"region": "US"
}
},
"device": {
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1",
"ip": "192.168.1.1",
"model": "iPhone 14",
"width": 1170,
"height": 2532,
"operatingSystem": "IOS",
"browser": "SAFARI",
"deviceType": "MOBILE"
},
"user": {
"id": "device123",
"userId": "user789"
},
"timeout": 200
}

Response body (200 OK)

FieldDescriptionTypeConstraints
adsArray of advertisements for the requested ad slotsArray[Object]-
ads[].adSlotIdID of the ad slot this ad is forInteger$int32
ads[].typeType of the advertisementStringEnum: BRAND, DISPLAY_BANNER, DISPLAY_NATIVE, PRODUCT
ads[].brandName of the brand (for BRAND type)StringmaxLength: 255
ads[].productsList of products (for BRAND and PRODUCT types)Array[Object]-
ads[].products[].idProduct ID in the marketplaceStringmaxLength: 255
ads[].products[].bidIdUnique ID of the ad for tracking and analyticsStringUUID format
ads[].products[].sellerIdID of the seller for the productStringmaxLength: 255
ads[].products[].variantIdID of the product variantStringmaxLength: 255
ads[].products[].urlProduct url on websiteStringmaxLength: 255
ads[].products[].variantUrlSpecific Url for this variant and sellerStringmaxLength: 255
ads[].bannerURL of the banner image (for DISPLAY_BANNER type)StringmaxLength: 512
ads[].widthWidth of the banner in pixels (for DISPLAY_BANNER type)Integer$int32
ads[].heightHeight of the banner in pixels (for DISPLAY_BANNER type)Integer$int32
ads[].landing_urlURL where the user lands after clicking the ad (for DISPLAY_BANNER and DISPLAY_NATIVE types)StringmaxLength: 512
ads[].bidIdUnique ID of the ad for tracking and analytics (for DISPLAY_BANNER and DISPLAY_NATIVE types)StringUUID format
ads[].nativesList of native ad components (for DISPLAY_NATIVE type)Array[Object]-
ads[].natives[].imageURL of the main image for the native adStringmaxLength: 512
ads[].natives[].titleTitle of the native adStringmaxLength: 255
ads[].natives[].logoURL of the logo (e.g., ad network, marketplace, or advertiser logo)StringmaxLength: 512
ads[].natives[].iconURL of the icon for the native adStringmaxLength: 512
ads[].natives[].ctaCall to Action button text (e.g., "Shop Now", "Learn More") to drive user interactionStringmaxLength: 100
ads[].natives[].landing_urlURL where the user lands after clicking the native adStringmaxLength: 512
ads[].natives[].bidIdUnique ID of the native ad for tracking and analyticsStringUUID format

Example response (200 OK)

{
"ads": [
{
"adSlotId": 1073741824,
"brand": "Nike",
"products": [
{
"id": "shoe123",
"bidId": "550e8400-e29b-41d4-a716-446655440001",
"sellerId": "seller789",
"variantId": "var123"
}
],
"type": "BRAND"
},
{
"adSlotId": 1073741824,
"banner": "https://cdn.example.com/ads/banner.jpg",
"width": 300,
"height": 250,
"landing_url": "https://www.example.com/products/sneakers",
"bidId": "550e8400-e29b-41d4-a716-446655440002",
"type": "DISPLAY_BANNER"
},
{
"adSlotId": 1073741824,
"natives": [
{
"image": "https://cdn.example.com/ads/native-image.jpg",
"title": "Explore New Sneakers",
"logo": "https://cdn.example.com/ads/nike-logo.png",
"icon": "https://cdn.example.com/ads/icon.png",
"cta": "Shop Now",
"landing_url": "https://www.example.com/products/sneakers",
"bidId": "550e8400-e29b-41d4-a716-446655440003"
}
],
"type": "DISPLAY_NATIVE"
},
{
"adSlotId": 1073741824,
"products": [
{
"id": "shoe456",
"bidId": "550e8400-e29b-41d4-a716-446655440004",
"sellerId": "seller456",
"variantId": "var456"
}
],
"type": "PRODUCT"
}
]
}

Notes

  • At least one of productId, categoryId, or keyword should be provided to determine the context of the ads (product page, category page, or search results).
  • Request Processing Priority: The processing of requests follows this priority order for the provided context fields:
    1. productId: If productId is provided, it takes the highest priority, and categoryId is ignored. You may omit categoryId in this case, as it will not be considered.
    2. categoryId: If no productId is provided, categoryId is used to determine the ad context.
    3. keyword: If neither productId nor categoryId is provided, keyword is used to tailor the ads.
  • Ad Slot Context: Sponsored ad requests are processed based on the context of the adSlotIds provided in the request. Each ad slot has a predefined context, as outlined in Ad Slots & Formats. This context determines how the ad slot is filled. For example:
    • If the ad slot’s context is a product listing page, the ad slot is filled exclusively with campaigns using promotion targeting, and the provided productId, categoryId, or keyword fields are ignored. In this case, the products displayed may belong to different categories and are selected based on the promotion context rather than the provided input fields.
  • The adSlotIds field is mandatory and must contain valid slot IDs predefined in Binoban’s back-office. Contact the Binoban team to configure ad slots.
  • The mediaSource object requires only the type field (APP or SITE). Other fields (name, domain, etc.) are optional.
  • The user field is highly recommended for conversion tracking to ensure accurate attribution, ideally sourced from the Binoban SDK.
  • The timeout field specifies the maximum time to wait for a response in milliseconds (default: 200ms for ad networks).
  • The ads array in the response contains advertisements tailored to the requested adSlotIds. Each ad slot has a specific type (BRAND, DISPLAY_BANNER, DISPLAY_NATIVE, PRODUCT) with corresponding fields.
  • For DISPLAY_NATIVE ads, the cta field (Call to Action) is a button text (e.g., "Shop Now", "Learn More", "Buy Now") designed to drive user interaction, making the ad more engaging and aligned with the publisher’s site style. Native ads blend seamlessly with a platform's content, matching its style for higher engagement (e.g., sponsored posts in feeds). OpenRTB, an IAB standard, supports Native ads since version 2.3 via a Native Object, enabling SSPs to request assets (e.g., Title, Image, CTA) and DSPs to respond with tailored ads in real-time auctions. This ensures scalable, engaging ad delivery with minimal disruption.
  • All bidId fields in the response (products[].bidId, bidId, natives[].bidId) would be in UUID format for tracking and analytics.
landing_url vs landingUrl

This API's native/banner destination field is landing_url (snake_case) — different from the Ad Request API's landingUrl / targetUrl (camelCase). This is a pre-existing, intentional difference between the two endpoints; don't "fix" one to match the other.