DocsAPI ReferenceProduct/bff/product/variant-set-main-image
postProductAdmin BFF

/bff/product/variant-set-main-image

Sets the main image for a product variant. The image must already be uploaded in the product gallery. To remove the current image, omit imageToken or pass null.

ProductpostBffProductVariant-set-main-image

Parameters

3 body

3 total
Body · 3
productCodestringRequired

Product code the variant belongs to.

variantCodestringRequired

Variant code to set the image for.

imageTokenstring

Blob token of the image to set as main. Must be an image from the product gallery. Omit or pass null to remove the current main image.

Request

POST /bff/product/variant-set-main-image

post
curl -X POST "https://api.bizkithub.com/bff/product/variant-set-main-image" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "productCode": "my-product",
  "variantCode": "variant-xl",
  "imageToken": "example_imageToken"
}'

Response

JSON payload

{
  "success": false
}

All response codes

1 status code documented

Need an API key?

All BizKitHub API endpoints require authentication via API key.

Get API Key