Categories API
Organize your products into categories. Each category includes a computed product_count so you can display the number of items in each group on your storefront.
List categories
/v1/categoriesReturns all categories for your store, sorted by sort_order. Each category includes a computed product_count.
Query parameters
limitintegerDefault: 50Maximum number of categories to return. Maximum allowed value is 200.
offsetintegerDefault: 0Number of categories to skip before starting to return results.
Response fields
idstringCategory UUID.
namestringCategory name.
slugstringURL-friendly slug derived from the category name.
sort_orderintegerDisplay order. Lower values appear first on the storefront.
product_countintegerNumber of visible products assigned to this category. Computed server-side.
created_atstringISO 8601 timestamp of when the category was created.
Pagination object
limitintegerThe limit that was applied to this request.
offsetintegerThe offset that was applied to this request.
totalintegerTotal number of categories in your store.
Cache-Control: private, max-age=300, stale-while-revalidate=600. Results are cached for up to 5 minutes, with stale data served for up to 10 minutes while the cache refreshes in the background. Create, update, or delete operations invalidate the cache immediately.curl "https://sellvy.io/api/v1/categories?limit=50&offset=0" \
-H "X-API-Key: sk_live_..."{
"data": [
{
"id": "cat_m3k8x1",
"name": "Software",
"slug": "software",
"sort_order": 0,
"product_count": 14,
"created_at": "2025-01-10T08:30:00Z"
},
{
"id": "cat_p7n2v4",
"name": "Templates",
"slug": "templates",
"sort_order": 1,
"product_count": 7,
"created_at": "2025-01-12T14:15:00Z"
},
{
"id": "cat_r9w5d6",
"name": "Courses",
"slug": "courses",
"sort_order": 2,
"product_count": 3,
"created_at": "2025-02-01T10:00:00Z"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 3
}
}