Prerequisites
- A Shelfforce account (sign up here)
- An API key with
writepermissions
How the analysis flow works
Shelf analysis is asynchronous. When you submit an image, Shelfforce queues it for processing and immediately returns an analysis ID. You then retrieve the results once processing completes.| Method | Best for | How it works |
|---|---|---|
| Polling | Quick testing, scripts | Loop GET /analyses/:id every 3-5 seconds until status is completed |
| Webhooks | Production systems | Register a URL and Shelfforce POSTs the result to you when ready |
Get your API key
Navigate to Settings > API Keys in the Shelfforce dashboard. Click Create API Key, give it a name, and select the
write role.Copy the key immediately — it is only shown once.Your key will look like this:Submit an image for analysis
Send a The response includes an analysis ID and an initial status of
POST request to the analyses endpoint with the URL of a shelf image. The response comes back immediately with status: "processing" — the analysis runs in the background.processing:One credit is consumed per analysis. See Credits for details.
Poll for results
Analysis typically completes in 10-30 seconds depending on image complexity. Poll the analysis endpoint until the status changes to
completed:View detected products
Once the status is Each product includes:
completed, the response includes a products array with every detected item:| Field | Description |
|---|---|
brand | Detected brand name |
description | Full product description as seen on shelf |
units | Number of visible facings |
price / discountedPrice | Detected shelf price and sale price (if applicable) |
currency | ISO 4217 currency code |
onSale | Whether the product appears to be on promotion |
confidence | Detection confidence score (0.0 to 1.0) |
shelfPosition | Vertical position: top, eye-level, middle, bottom |
fixtureType | Where it was found: shelf, fridge, floor-display, other |
Next steps
You have successfully analyzed your first shelf image. Here is where to go next: