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
auctions
field. You can provide 1 to 5 auctions in a single request. - Each auction has a
type
that will determine whether it’s auctioning listings or banners. - Each auction has a
slots
field, this determines the maximum number of winners of the auction.
Response
Do not cache this response or it’s results. Auctions need to be unique per page view, this is what makes the system work.If the auction results are cached, the same results could be shown to multiple users or to the same user multiple times.
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
results
property. - 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
slots
of the auction. - It’s possible for auctions to fail/succeed independently. The
error
flag indicates whether an auction succeeded.
rank
a 1-based number corresponding to its position inwinners
.resolvedBidId
identifying the bid that made this winner win. This ID is used to relate the bid to events.