Auction examples
- Running auctions
- Sponsored listings
- Sponsored banners
- Sponsored brands
Asset examples
Webhook examples
Toptimize
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
- GETGet Campaign Report
- GETGet Campaign Daily Report
- GETGet Campaign Report By Product
- GETGet Product Report
- GETGet Product Daily Report
- GETGet Scored Attribution Dump Urls
- GETGet Marketplace Interactions Report
- GETGet Marketplace Report
- GETGet Marketplace Campaigns Kpis
- GETGet Marketplace Daily Report
- GETGet Vendor Report
- GETGet Vendor Daily Report
Segments service
Toppie API
Rank objects
curl --request POST \
--url https://api.topsort.com/v2/rank \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"ranking": [
{
"type": "listings",
"slots": 3,
"pageSize": 3,
"category": {
"ids": [
"sneakers",
"shoes"
]
},
"products": {
"ids": [
"p_PJbnN",
"p_ojng4"
]
}
}
]
}'
{
"results": [
{
"products": [
{
"rank": 1,
"type": "organic",
"id": "p_Mfk11",
"resolvedItemId": "WyJiX01mazExIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTMyNjYtY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=="
},
{
"rank": 2,
"type": "sponsored",
"id": "p_Mfk15",
"resolvedItemId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="
},
{
"rank": 3,
"type": "organic",
"id": "p_PJbnN",
"resolvedItemId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="
}
],
"error": false
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Describes the context related to a Ranking request
Type of object to be ranked
listings
Specifies the maximum number of ranked objects that should be returned.
x >= 1
Specifies the maximum number of ranked objects per page that should be returned.
x >= 1
1
"71303ce0-de89-496d-8270-6434589615e8"
A category for the purpose of running an auction.
The category ID of the bids that will participate in an auction.
1
"c_yogurt"
The device for which the ads are meant for.
desktop
, mobile
An object describing geographical information associated with this auction.
The location this auction is being run for.
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.
Response
Array of ranking objects in order from highest to lowest relevancy.
Where is the product ranked in the auction.
x >= 1
The target type of the winning bid.
organic
, sponsored
The marketplace's ID of the ranked entity.
"p_Mfk15"
An opaque Topsort ID to be used when this item is interacted with.
"WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="
A boolean indicating whether this auction was resolved successfully.
false
curl --request POST \
--url https://api.topsort.com/v2/rank \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"ranking": [
{
"type": "listings",
"slots": 3,
"pageSize": 3,
"category": {
"ids": [
"sneakers",
"shoes"
]
},
"products": {
"ids": [
"p_PJbnN",
"p_ojng4"
]
}
}
]
}'
{
"results": [
{
"products": [
{
"rank": 1,
"type": "organic",
"id": "p_Mfk11",
"resolvedItemId": "WyJiX01mazExIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTMyNjYtY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=="
},
{
"rank": 2,
"type": "sponsored",
"id": "p_Mfk15",
"resolvedItemId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="
},
{
"rank": 3,
"type": "organic",
"id": "p_PJbnN",
"resolvedItemId": "WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="
}
],
"error": false
}
]
}