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.
Response without winners
It’s not guaranteed that an auction will result in winners. If there are no active campaigns that match it’s criteria, there won’t be any bids to place. If our earlier auction request did not have any winners for either auction, it’s response will look something like this:Further reading
Check out the other pages in this section to see complete examples for different use cases.Last updated: