The auctions API enables you to create a wide variety of auctions. Whether you want to include sponsored listings in search results or banners on your homepage, we’ve got you covered.Documentation Index
Fetch the complete documentation index at: https://docs.topsort.com/llms.txt
Use this file to discover all available pages before exploring further.
Before you begin
Before you’re ready to use the auctions API, you need to:- Obtain an API key to authenticate.
- Create several campaigns, to have bids available for the auctions.
Request
The/auctions endpoint allows you to run up to 5 auctions in one request.
The full spec for this endpoint is found here.
This can be quite a lot to take in at once, so let’s stick to the basics now.
Every request body should be provided as JSON and is generally structured as follows.
- Auctions are provided as an array to the
auctionsfield. You can provide 1 to 5 auctions in a single request. - Each auction has a
typethat will determine whether it’s auctioning listings or banners. - Each auction has a
slotsfield, this determines the maximum number of winners of the auction.
Response
If there are no request errors, the auctions endpoint will return the results for each auction. A successful response does not mean that each auction succeeded or has winners. You will need to check the results to determine this.Response with winners
Suppose that both auctions in the earlier request result in winners, the response could look something like this:- Auction results are under a top level
resultsproperty. - The order of the results corresponds to the order of the auctions.
- Each result has an array of winners. This array can be empty and it will never be more than the
slotsof the auction. - It’s possible for auctions to fail/succeed independently. The
errorflag indicates whether an auction succeeded.
Empty Winners Array
Ifwinners is empty ([]), common causes include:
- Budget exhausted: Campaigns have spent their daily/total budget
- No active campaigns: No campaigns are targeting the auction context
- Bid too low: Campaign bids are below auction floor prices
- Product mismatch: Campaign products don’t match auction criteria
ranka 1-based number corresponding to its position inwinners.resolvedBidIdidentifying the bid that made this winner win. This ID is used to relate the bid to events.