Get Categories
Retrieve a paginated list of all product categories available in your store.
Endpoint
GET /api/shop/categoriesRequest Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
X-STOREFRONT-KEY | Yes | Your storefront API key |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number for pagination |
limit | integer | 10 | Number of items per page |
sort | string | name | Field to sort by (name, position, created_at) |
locale | string | en | Language locale |
channel | string | default | Channel identifier |
Response Fields (200 OK)
| Field | Type | Description |
|---|---|---|
id | integer | Category ID |
name | string | Category name |
slug | string | URL-friendly category identifier |
description | string | Category description |
imageUrl | string | Category image URL |
productCount | integer | Number of products in category |
parentId | integer | Parent category ID |
position | integer | Display order |
createdAt | string | Category creation date |
Pagination Response
| Field | Type | Description |
|---|---|---|
total | integer | Total number of categories |
perPage | integer | Items per page |
currentPage | integer | Current page number |
lastPage | integer | Last page number |
Use Cases
- Display category listings in sidebar or header
- Load categories for product filtering
- Build category management interfaces
- Create breadcrumb navigation

