Creates a new auction
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 slot type, for which products’ bids will compete against each other. The products that will participate are included in the request.
object
The Slots object specifies how many auctions winners should be returned for each promotion type. The promotion types depend on the marketplace configuration. For sponsored listings, use the “listings” key.
object
An array of objects, each describing a product that should participate in the auction.
object
The Session object allows correlating user activity during a session whether or not they are actually logged in.
object
Long-lived token identifying the customer interacting with the marketplace. If your users are always logged in you may use a hash of your customer ID. If your users may interact with your app or site while logged out we recommend generating a random identifier (UUIDv4) on first load and store it on local storage (cookie, local storage, etc) and let it live for at least a year.
An object describing geographical information associated with this auction.
object
The location this auction is being run for.
Responses
The auction results. The list of Winner objects will contain at most slots entries. It may contain fewer or no entries at all if there aren’t enough products with usable bids. Bids become unusable if their campaign budget is exhausted, the bid is disqualified to preserve spend pacing, etc.
object
object
object
Topsort assigned ID for the auction. Should be used in reporting impressions, clicks and purchases.
Array of winner objects in order from highest to lowest bid. May be empty if there were no qualifying bids.
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 marketplace’s ID for the product. It will match the ID for a product in the request’s products array.
The type of the winning bid, depending on the campaign. It can be product or vendor.
The marketplace’s ID of the winnning item, depending on the campaign.
An opaque topsort ID to be used when this item is interacted with.
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.