Use cases
Running these kind of auctions on search pages will allow your vendors to promote products on category pages.Non traditional categories:Our catalog system does not make any assumption about what a category is.If your marketplace deals with vacation homes for example, categories could be geographic locations instead of product groups.
Specifying categories
The/auctions
endpoint supports several ways to specify categories.
When you create an auction, you must pick one of the following methods:
Method | Relevant field | Description |
---|---|---|
Single category | category.id | Bid targets must belong to the category. The id of category is the same value used when upsert product. |
All categories | category.ids | Bid targets must belong to all of the categories. |
Disjunctions | category.disjunctions | Bid targets must belong to at least one of the categories of the disjunction. |
Example API calls
Request: Single category
- Has a maximum of two winners due to the
slots
field. - Only allows bids that target products in a single category. The category ID is specified in the
category.id
field.
laptop_bags
category can take part in the auction.
Request: All categories
- Has a maximum of two winners due to the
slots
field. - Only allows bids that target products that belong to all categories. The category IDs are specified in the
category.ids
field.
This field is plural. It’s called
ids
, not id
.summer_hats
and the sale
categories can take part in this auction.
Request: Disjunctions (“at least one category”)
- Has a maximum of two winners due to the
slots
field. - Only allows bids that target products that belong to one of the categories for the disjunction. The disjunctions are specified as string arrays in the
category.disjunctions
field.
large
or medium
categories can participate in this auction.
Response
Do not cache this response or its 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.
- The type of the winners is
product
, because we’re running a listings auction. - There are two winners, the maximum that is allowed by the
slots
field in the request.