Snuset Developer & Agent API
Snuset (snuset.se) is a Swedish online snus and nicotine-pouch store. This page lists everything you need to read the catalogue, build a cart and hand a customer a checkout link without opening a browser — the OpenAPI specification, the llms.txt index, Markdown content negotiation, the Shop GraphQL API and the snuset command-line client.
Machine-readable resources
- /openapi.json — OpenAPI 3.1 description of the Snuset storefront API: discovery files, product search and the Shop GraphQL API.
- /llms.txt — An llms.txt index of the site's sections and developer resources.
- /sitemap.xml — Every indexable URL — products, categories, brands and articles — with last-modified dates.
- /robots.txt — Crawling rules. Account, checkout and order pages are excluded.
Markdown content negotiation
Every page on snuset.se serves two representations of the same resource. Ask for text/markdown and you get the page without navigation, scripts or layout markup — roughly a thirtieth of the bytes of the HTML variant, at the same URL.
curl -H "Accept: text/markdown" https://www.snuset.se/produkter/snus/Responses set Vary: Accept, honour q-values, and advertise the alternate with a Link header. An Accept header that rules out both text/html and text/markdown is answered with 406 Not Acceptable. This follows acceptmarkdown.com.
Unknown paths return a real 404
Paths that do not exist return HTTP 404, never a 200 carrying the application shell. The 404 body links back to the sitemap, llms.txt and this page so an agent can recover without guessing.
Product search
A read-only JSON endpoint over the sellable catalogue. It returns up to eight product variants; classifications that may not be advertised in Sweden are excluded.
curl "https://www.snuset.se/api/search-suggestions/?q=general%20white"Each hit carries a productVariantId, which is what the Shop API's addItemToOrder mutation expects, plus slug, price in minor units, stock state, facets and available pack sizes. The response schema is in the OpenAPI document.
Shop GraphQL API
Catalogue, cart, customer accounts and checkout run on a Vendure Shop API at https://api.snuset.se/shop-api. Every request must carry the channel token header.
curl https://api.snuset.se/shop-api \
-H "Content-Type: application/json" \
-H "vendure-token: sweden_webshop" \
-d '{"query":"{ activeChannel { currencyCode } }"}'Authenticated calls use the bearer token returned in the vendure-auth-token response header after the authenticate mutation. The schema is introspectable with a standard GraphQL introspection query.
snuset CLI for agents
snuset is a published npm package that wraps the flows above. It is built for automation: pass --json (or simply pipe it) and every command prints a single JSON document, never a prompt.
npx snuset search "general" --json
npx snuset cart add <variantId> --quantity 2 --json
npx snuset checkout url --json # hand this URL to the customersnuset help --json prints the full command manifest. Ready-made agent skills for Claude Code, Cursor and others live at github.com/snuset/skills, and the package itself is on npm.
Rules for automated clients
- Snus, nicotine pouches and vapes are age-restricted. Customers must be 18 or older, and age is verified during checkout.
- Payment always happens in a browser. Agents should build the cart and hand the customer a checkout URL rather than attempting to pay.
- Prices are in SEK, in minor units (öre), and include Swedish VAT unless a field is explicitly named
priceExclTax. - Respect robots.txt and prefer
/sitemap.xmlover crawling for enumeration.