Quickstart
Fetch products
List, search, and page through your catalog.
The product list endpoint is the same shape across admin and store — the difference is which fields it returns and which key it accepts.
List products
curl "https://api.sellvik.app/api/v1/store/products?limit=20" \
-H "X-Sellvik-Key: <publishable-key>"{
"items": [
{
"id": "f3a7…",
"slug": "kurti-emerald",
"name": "Emerald Kurti",
"price": "1490.00",
"comparePrice": "1990.00",
"stock": 12,
"isActive": true,
"createdAt": "2026-05-20T08:00:00.000Z"
},
"… 19 more …"
],
"nextCursor": "eyJpZCI6Im…"
}Filter and sort
| Parameter | Type | Notes |
|---|---|---|
q | string | Substring match against name and SKU. |
categorySlug | string | Only products linked to this category. |
sort | enum | newest, price-asc, price-desc, name-asc, popular. |
limit | integer (1–100) | Defaults to 20. |
cursor | string | From the previous page's nextCursor. |
Example — popular shirts under 2000 BDT:
curl "https://api.sellvik.app/api/v1/store/products?categorySlug=shirts&sort=popular&limit=12" \
-H "X-Sellvik-Key: <publishable-key>"Page through everything
Pagination is cursor-based. Don't try to compute offsets — the server doesn't guarantee stable ordering between pages without the cursor.
# Page 1
curl "https://api.sellvik.app/api/v1/store/products?limit=50" \
-H "X-Sellvik-Key: <publishable-key>"
# → { "items": [...50...], "nextCursor": "abc..." }
# Page 2
curl "https://api.sellvik.app/api/v1/store/products?limit=50&cursor=abc..." \
-H "X-Sellvik-Key: <publishable-key>"
# → { "items": [...50...], "nextCursor": "def..." }
# Last page
# → { "items": [...12...], "nextCursor": null }See Pagination for the contract.
Fetch a single product by slug
curl "https://api.sellvik.app/api/v1/store/products/kurti-emerald" \
-H "X-Sellvik-Key: <publishable-key>"404 not_found if the slug doesn't exist or the product is inactive.
TypeScript: generate a client
The OpenAPI document at
/api/v1/openapi.json is the
source of truth. Generate a fully-typed client with
openapi-typescript:
npx openapi-typescript https://api.sellvik.app/api/v1/openapi.json \
-o src/lib/sellvik.d.tsThen:
import createClient from "openapi-fetch"
import type { paths } from "./lib/sellvik"
const sellvik = createClient<paths>({
baseUrl: "https://api.sellvik.app",
headers: { "X-Sellvik-Key": process.env.NEXT_PUBLIC_SELLVIK_KEY! },
})
const { data, error } = await sellvik.GET("/api/v1/store/products", {
params: { query: { limit: 20, sort: "newest" } },
})You're now armed. Continue with Next steps →.