Store API
Push your product catalogue to the price comparison. You send us JSON, we handle the rest.
Auth
Stick your API key in the Authorization header as a Bearer token. You can grab a key from the developer dashboard if your store has been set up.
curl -H "Authorization: Bearer snus_abc123..." \ https://compare.snus.xxx/api/v1/status
Rate limits
60 req/min on reads, 30 req/min on writes. You'll get a 429 if you go over. For most stores pushing once or twice a day, you won't come close.
GET /api/v1/status
Check your key works. Returns your store info and how many products you've got listed.
{
"store": { "name": "Your Store", "slug": "your-store", "url": "https://yourstore.com" },
"apiKey": { "name": "Production", "lastUsed": "2026-03-13T12:00:00Z" },
"products": 142
}POST /api/v1/products
Send up to 500 products per request. We match products across stores automatically — if three stores sell ZYN Cool Mint, all three prices show up on the same page. Just send your full catalogue and we sort it out.
curl -X POST \
-H "Authorization: Bearer snus_abc123..." \
-H "Content-Type: application/json" \
-d '{
"products": [
{
"name": "ZYN Cool Mint 6mg",
"brand": "ZYN",
"price": 4.99,
"currency": "USD",
"productUrl": "https://yourstore.com/zyn-cool-mint",
"inStock": true,
"nicotineMg": 6
}
]
}' \
https://compare.snus.xxx/api/v1/productsFields
| name | string | * | Product name |
| brand | string | * | Brand name (we normalise these) |
| price | number | * | Unit price |
| currency | string | * | ISO 4217 — USD, GBP, SEK, etc. |
| productUrl | string | * | Link to the product on your site |
| category | string | pouches (default), loose, or portions | |
| inStock | boolean | Defaults to true | |
| strength | string | e.g. "6mg", "strong" | |
| nicotineMg | number | mg/g if you have it | |
| weight | string | e.g. "16.8g" | |
| imageUrl | string | Product image | |
| priceTiers | array | Bulk pricing — [{minQty, price}] |
* required
Response:
{ "success": true, "created": 12, "updated": 130, "skipped": 3, "errors": [] }GET /api/v1/products
Lists everything you've submitted. Paginated — use ?page=2&limit=50 if needed. Defaults to 100 per page.
DELETE /api/v1/products
Remove one of your listings. Pass productUrl or slug in the body. Only deletes your store's price — the product stays if other stores carry it.
curl -X DELETE -H "Authorization: Bearer snus_..." \
-H "Content-Type: application/json" \
-d '{"productUrl":"https://yourstore.com/zyn-cool-mint"}' \
https://compare.snus.xxx/api/v1/productsFeed sync (no code needed)
If you're on Shopify, WooCommerce, or anything that spits out a product feed — you don't need to write any code. Stick your feed URL in the developer dashboard and we'll pull from it automatically. Supports JSON, CSV, XML (Google Merchant), and a few platform-specific formats.
Errors
400 — bad request body or validation failed
401 — missing/invalid API key
404 — not found
429 — rate limited, back off a bit
Things worth knowing
Send your full catalogue each time rather than just changes — we handle the diffing. Products that haven't changed just get their timestamp bumped.
Mark out-of-stock items as inStock: false instead of leaving them out. That way the comparison page shows accurate availability.
Product matching works on name + brand, so keep those consistent between pushes. We normalise brand names (e.g. "Zyn" and "ZYN" end up in the same place).
Questions? Ping us on Discord.