Featured variant
Read or set the variant highlighted on a product page.
A featured variant is one of a product's published variants, highlighted on the
product page with a label such as best_value. Read it with GET, and set or
clear it with PUT.
Get the variant highlighted on the product page and its label, or nulls when no variant is featured. Requires the listing API-key ability and the listing permission in your team role. OAuth callers use the admin grant and select a store with X-STORE. Current membership and role permissions apply to every request.
AuthorizationBearer <API Key>Provide your SellApp API key as a bearer token.
product*integerThe product path parameter.
X-STORE?stringStore slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.
Successful response.
application/json- response
data*curl -X GET 'https://sell.app/api/v2/products/1/featured-variant' \ -H 'X-STORE: launch-lab'{ "data": { "product_id": 1, "variant_id": 2, "variant_title": "Professional Edition", "highlight_label": "best_value" }}Highlight one of the product's published variants on its product page with a label, or remove the highlight by sending variant_id as null. Normal products, booking products, and credits products that have been published can feature a variant once they have at least two variants. Requires the listing API-key ability and the listing permission in your team role. Safe to repeat: the same body gives the same result. A course, bundle, or add-on, a draft that was never published, or a product with fewer than two variants returns 422 on product. A draft variant or a variant of another product returns 422 on variant_id. OAuth callers use the admin grant and select a store with X-STORE. Current membership and role permissions apply to every request.
AuthorizationBearer <API Key>Provide your SellApp API key as a bearer token.
product*integerThe product path parameter.
X-STORE?stringStore slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.
application/json- body
variant_id*|A published variant of this product, or null to stop featuring a variant. Always send it, even as null.
1 <= valuehighlight_label?|The label shown on the featured variant. Defaults to popular.
"popular""recommended""best_value"nullSuccessful response.
application/json- response
data*curl -X PUT 'https://sell.app/api/v2/products/1/featured-variant' \ -H 'X-STORE: launch-lab' \ -H 'Content-Type: application/json' \ -d '{ "variant_id": 2, "highlight_label": "best_value"}'{ "data": { "product_id": 1, "variant_id": 2, "variant_title": "Professional Edition", "highlight_label": "best_value" }}