Auction examples
- Running auctions
- Sponsored listings
- Sponsored banners
- Sponsored brands
Asset examples
Webhook examples
Toptimize
Assets API
Billing API
- GETGet Marketplace Credit Limit
- POSTSet Marketplace Credit Limit
- GETGet Vendor Charges
- GETGet Vendor Account Activity
- GETGet Vendor Balance
- POSTAdd Vendor Balance
- POSTBurn Vendor Balance
- GETGet Vendor Credit History
- GETGet Vendor Credit Limit
- POSTSet Vendor Credit Limit
- GETGet Vendor Wallets
- POSTCreate Wallet
- POSTAdjust Wallet Balance
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
Segments Service
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
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
Type of page.
home
, category
, PDP
, search
, cart
, other
"category"
Detail of the page, depending on the type
"electronics"
Marketplace id for the page
"/category/electronics"
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
}
]
}