GET Lookup Image (Legacy Route)
This route is kept for backward compatibility and image retrieval links in responses.
For active V2 API endpoint docs, use the V2 endpoint pages in this section.
V2 product_image fields now emit the UID route format: /api/image/uid/{product_unique_id}.
Route (by style code)
/api/image/{style_code}Route (by unique ID)
/api/image/uid/{product_unique_id}Header
Authorization: Bearer {Your API Key}Responses
You may receive one of the following outcomes:
400Input validation failed.200Image not found (JSON with"error": true).200Image binary stream returned.302Redirect to the source image URL. The API sends this when it has an image record but no stored image file.502The image could not be retrieved at this time.
Make sure that your HTTP client follows redirects. Without it, a 302 answer has no image body.
Put the style code in the route. You can add these optional query parameters. Each one works without a value.
| Parameter | Effect |
|---|---|
resize | Returns the image as a 750 x 750 PNG with a transparent background. |
flip | With resize, also flips the image horizontally. Without resize, it has no effect. |
no_reply | When no image is found or the image cannot be retrieved, returns an empty image/png body in place of the JSON error. |
Example: GET /api/image/DD1391-100?resize&flip
A 302 redirect sends the source image as it is. resize and flip do not apply to it.
The UID route resolves product_unique_id to the matching product and returns the same image response format.
Please note that the response with a 200 status code indicating that the image was found will return the image as a binary data stream. This stream can be converted to an image in the frontend of your application.
The barcode lookup API page shows the plans and examples.
Publishable Keys
Publishable keys (pk_) let a web page call the barcode lookup routes. Learn the allowed routes, allowed domains, rate limits and error messages.
Barcode Scanner Library
Add a UPC and EAN barcode scanner to a web page with @barcodesgg/scanner: a web component, a React hook and a headless core, with product lookup by publishable key.