Create auctions
Authentication
Topsort’s APIs are authenticated via bearer tokens. Requests must include an authorization header containing your private API key.
Don't have an API key yet? Learn how to generate one.
The header containing a private API key. Format this header as follows:
Authorization: Bearer <YOUR-API-KEY>
Request Body
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.
object
Describes the intent of running a sponsored listings auction.
Exactly one of the following fields must be set:
products
category
object
Discriminator for the type of auction.
Specifies the maximum number of auction winners that should be returned.
A category for the purpose of running an auction.
object
The category ID of the bids that will participate in an auction.
A set of categories for the purpose of running an auction.
object
An array containing the category IDs of the bids that will participate in an auction. In order to participate in an auction, a bid product must belong to all of the categories provided in the auction request.
Multiple disjunctions of categories for the purpose of running an auction.
object
An array of disjunctions.
In order to participate in an auction, a bid product must belong to at least one of the categories for each of the disjunctions provided in the auction request.
The search string provided by a user.
object
An array of product IDs that should participate in the auction.
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.
object
The location this auction is being run for.
Describes the intent of running a banner ads auction.
- For Landing Page banners,
category
andsearchQuery
must be empty. - For Category banners, the
category
field must be set. - For Keywords banners, the
searchQuery
field must be set.
object
Discriminator for the type of auction.
Specifies the maximum number of auction winners that should be returned.
A category for the purpose of running an auction.
object
The category ID of the bids that will participate in an auction.
A set of categories for the purpose of running an auction.
object
An array containing the category IDs of the bids that will participate in an auction. In order to participate in an auction, a bid product must belong to all of the categories provided in the auction request.
Multiple disjunctions of categories for the purpose of running an auction.
object
An array of disjunctions.
In order to participate in an auction, a bid product must belong to at least one of the categories for each of the disjunctions provided in the auction request.
The search string provided by a user.
The device for which the ads are meant for.
An object describing geographical information associated with this auction.
object
The location this auction is being run for.
The ID of the banner placement for which this auction will be run for.
object
An array of product IDs that should participate in the auction.
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.
Responses
The auction results. The list of winners will contain at most slots
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.
object
object
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.
object
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.
The target type of the winning bid.
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 boolean indicating whether this auction was resolved successfully.
object
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.
object
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.
The target type of the winning bid.
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 list of available sources for a banner.
A source available for an asset (banner or video).
object
A vendor provided asset that the marketplace has to use as a banner. The asset will be served by Topsort’s CDN.
A boolean indicating whether this auction was resolved successfully.
HTTP status codes as registered with IANA.
object
A short string uniquely identifying the problem.
A link to a documentation page providing more information about the error.
Human-readable explanation of or details about the error. The string for a given error may change over time; code should not parse or dispatch based on particular values for this field.
Access token is missing or invalid