curl --request POST \
--url https://api.topsort.com/v2/auctions/sponsored-brand \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auctions": [
{
"winners": 2,
"placementId": "some-placement",
"triggers": {
"products": {
"ids": [
"vanilla_yogurt"
]
}
}
}
]
}
'{
"results": [
{
"resultType": "brand",
"winners": [
{
"rank": 1,
"type": "product",
"id": "brand-123",
"resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"content": {
"headline": "Topsort Rocks",
"brandName": "Topsort Brand"
}
}
],
"error": false
}
]
}curl --request POST \
--url https://api.topsort.com/v2/auctions/sponsored-brand \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auctions": [
{
"winners": 2,
"placementId": "some-placement",
"triggers": {
"products": {
"ids": [
"vanilla_yogurt"
]
}
}
}
]
}
'{
"results": [
{
"resultType": "brand",
"winners": [
{
"rank": 1,
"type": "product",
"id": "brand-123",
"resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"content": {
"headline": "Topsort Rocks",
"brandName": "Topsort Brand"
}
}
],
"error": false
}
]
}A valid API key generated in Topsort's UI.
The information describing what will be auctioned. Topsort will run an auction for each batched auction request, for which products bids will compete against each other.
1 - 5 elementsShow child attributes
Specifies the maximum number of auction winners that should be returned.
1 <= x <= 40Triggers provide the context for an ad auction. For Sponsored Brands, the trigger must be one of the following: a product category, a set of specific products, or a search query.
A trigger based on a product category.
The opaque user ID is an anonymized unique identifier that maps to the original user ID without revealing the original value. This identifier allows Topsort to correlate user activity between auctions and user interactions, independent of the user's logged-in status. For apps or sites where users might interact while logged out, we recommend generating a random identifier (UUIDv7) on the first load, storing it on local storage (cookie, local storage, etc), and letting it live for at least a year. Otherwise, if your users are always logged in for interactions, you may use a hash of your customer ID. Correct purchase attribution requires long-lived opaque user IDs consistent between auction and event requests.
Information about the page where an auction or event occurs.
[
{
"winners": 2,
"placementId": "some-placement",
"triggers": { "products": { "ids": ["vanilla_yogurt"] } }
}
]The sponsored brand auction results. The list of winners will contain at most winners entries per auction. It may contain fewer or no entries at all if there aren't enough products with usable bids, that is, a bid amount greater than the reserve price and belonging to a campaign with enough remaining budget. Bids become unusable if campaign budget is exhausted, the bid is disqualified to preserve spend pacing, etc.
1 - 5 elementsShow child attributes
Array of winner objects in order from highest to lowest bid. It will be empty if there were no qualifying bids or if there was an error.
Show child attributes
Where the product's bid ranked in the auction. One-based, so the product with rank 1 won the auction. In an auction response, the winners array is sorted so rank will match the entry's index.
x >= 1The target type of the winning bid.
product, url The marketplace's ID of the winning entity, depending on the target of the campaign.
An opaque Topsort ID to be used when this item is interacted with.
A flexible JSON object with key-value pairs that map to the asset's filled content template. The template can be customized by the marketplace.
An optional title for the sponsored brand selected when creating the campaign.
The ID of the vendor associated with this sponsored brand winner.
List of product IDs associated with the sponsored brand winning campaign.
A boolean indicating whether this auction was resolved successfully.
[
{
"resultType": "brand",
"winners": [],
"error": false
}
]Was this page helpful?