Product

Uploads an image for product search, as the storefront camera search does (jpeg, png, jpg, gif, svg or webp, max 2 MB). Send it as a multipart image file, or as a base64 data URI in a JSON image. With Magic AI image search switched on, keywords holds search keywords and engine is ai; otherwise keywords is empty and engine is tensorflow, meaning the client derives the keywords from imageUrl itself, as the storefront does in the browser. Then search products with the keywords.

post/image-searches

Request

Headers

X-STOREFRONT-KEYstring required

Storefront API Key for authentication. Required for all shop/storefront API requests.

X-Localestring
Example:en

Locale code for localized data (e.g. "en", "fr", "ar"). Defaults to channel's default locale.

X-Channelstring
Example:default

Channel code (e.g. "default"). Defaults to the current channel.

X-Currencystring
Example:USD

Currency code (e.g. "USD", "EUR", "INR"). Defaults to channel's base currency.

Request body

imagestring required

Example request

{
  "image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..."
}

Response

The stored image and the keywords.

Changes