Auction examples
- Running auctions
- Sponsored listings
- Sponsored banners
- Sponsored brands
Asset examples
Webhook examples
Assets API
Billing API
Campaign API
- GETGet Campaigns
- POSTCreate Campaign
- GETGet Campaign By Id
- DELDelete Campaign By Id
- PATCHUpdate Campaign By Id
- GETGet Campaign Bids
- POSTCreate Campaign Bids
- DELDelete Campaign Bid By Id
- PATCHUpdate Campaign Bid By Id
- POST[BETA] Get estimated clicks of a future campaign for a given vendor
- GETGet Products In Campaign
- GETGet Sponsored Products
Catalog API
Invitation API
Modal API
Reporting API
Toppie API
- GET[BETA] Get Toppie Campaigns
- POST[BETA] Create Toppie Campaign
- GET[BETA] Get Toppie Campaign Details
- GET[BETA] Get Toppie Campaign Bids
- GETGet Agency Account Report
- GETGet Agency Account Activity
- GETGet Agency Account Campaigns
- GETGet Account Campaigns By Ids
- GETGet Agency Campaign Report
- GETGet Campaign Report Per Product
Create auctions
Use the /auctions
endpoint to create auctions. Each batch of auction requests can be a combination of
sponsored listing auctions and banner auctions. Each auction type has a unique body schemas.
curl --request POST \
--url https://api.topsort.com/v2/auctions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"auctions": [
{
"type": "listings",
"slots": 1,
"category": {
"disjunctions": [
[
"c_large",
"c_medium"
]
]
}
},
{
"type": "listings",
"slots": 2,
"products": {
"ids": [
"p_PJbnN",
"p_ojng4",
"p_8VKDt",
"p_Mfk15"
]
},
"geoTargeting": {
"location": "New York"
}
},
{
"type": "banners",
"slots": 1,
"slotId": "categories-ribbon-banner",
"category": {
"id": "c_yogurt"
}
},
{
"type": "banners",
"slots": 1,
"slotId": "homepage-banner"
}
]
}'
{
"results": [
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_Mfk11",
"resolvedBidId": "WyJiX01mazExIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTMyNjYtY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0==",
"campaignId": "82588593-85c5-47c0-b125-07e315b7f2b3"
}
],
"error": false
},
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_Mfk15",
"resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"campaignId": "4bcc6093-f367-4df2-aa1b-7c1674dd6441"
},
{
"rank": 2,
"type": "product",
"id": "p_PJbnN",
"resolvedBidId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"campaignId": "a72e4e43-55b5-4d08-81bb-cbb57df59c72"
}
],
"error": false
},
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_PJbnN",
"resolvedBidId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwiYmFubmVyQWRzIiwiZGVmYXVsdCIsIiJd",
"campaignId": "1156ef4e-0109-4190-ac97-4436c82358d2",
"asset": [
{
"url": "https://topsort.cdnprovider.com/lhs-banner-image-for-p_PJbnN-1x.png"
}
]
}
],
"error": false
},
{
"winners": [],
"error": false
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Describes the intent of running a single auction.
Discriminator for the type of auction.
listings
Specifies the maximum number of auction winners that should be returned.
x > 1
A category for the purpose of running an auction.
The category ID of the bids that will participate in an auction.
1
The search string provided by a user.
An array of product IDs that should participate in the auction. We recommend sending no more than 500 products per auction.
The marketplace's ID of a product which will participate in the auction. These ID must match those in the catalog integration with Topsort.
An array of marketplace defined quality scores, each corresponding to the product ID with matching array index.
If given, these values will be combined with our internal quality scores to provide a score
that better represents the relevance of the participating products.
Note that the length of this array must be the same as the length of the ids
array and
that the values must be between 0 and 1.
An object describing geographical information associated with this auction.
The location this auction is being run for.
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.
The marketplace's ID of the placement where the ad will appear.
Response
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.
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 > 1
The target type of the winning bid.
product
, vendor
, brand
, 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.
The ID of the campaign that won the auction.
A boolean indicating whether this auction was resolved successfully.
curl --request POST \
--url https://api.topsort.com/v2/auctions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"auctions": [
{
"type": "listings",
"slots": 1,
"category": {
"disjunctions": [
[
"c_large",
"c_medium"
]
]
}
},
{
"type": "listings",
"slots": 2,
"products": {
"ids": [
"p_PJbnN",
"p_ojng4",
"p_8VKDt",
"p_Mfk15"
]
},
"geoTargeting": {
"location": "New York"
}
},
{
"type": "banners",
"slots": 1,
"slotId": "categories-ribbon-banner",
"category": {
"id": "c_yogurt"
}
},
{
"type": "banners",
"slots": 1,
"slotId": "homepage-banner"
}
]
}'
{
"results": [
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_Mfk11",
"resolvedBidId": "WyJiX01mazExIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTMyNjYtY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0==",
"campaignId": "82588593-85c5-47c0-b125-07e315b7f2b3"
}
],
"error": false
},
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_Mfk15",
"resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"campaignId": "4bcc6093-f367-4df2-aa1b-7c1674dd6441"
},
{
"rank": 2,
"type": "product",
"id": "p_PJbnN",
"resolvedBidId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=",
"campaignId": "a72e4e43-55b5-4d08-81bb-cbb57df59c72"
}
],
"error": false
},
{
"winners": [
{
"rank": 1,
"type": "product",
"id": "p_PJbnN",
"resolvedBidId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwiYmFubmVyQWRzIiwiZGVmYXVsdCIsIiJd",
"campaignId": "1156ef4e-0109-4190-ac97-4436c82358d2",
"asset": [
{
"url": "https://topsort.cdnprovider.com/lhs-banner-image-for-p_PJbnN-1x.png"
}
]
}
],
"error": false
},
{
"winners": [],
"error": false
}
]
}