Get Products
Retrieve a paginated list of products with filtering, sorting, and pagination options.
Endpoint
GET /api/shop/productsRequest 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 |
limit | integer | 10 | Items per page (max: 100) |
sort | string | name | Sort by (name, price, rating, newest) |
direction | string | asc | Sort direction (asc, desc) |
category | integer | - | Filter by category ID |
minPrice | decimal | - | Minimum price filter |
maxPrice | decimal | - | Maximum price filter |
search | string | - | Search query |
status | integer | 1 | Product status (1=active, 0=inactive) |
Response Fields (200 OK)
| Field | Type | Description |
|---|---|---|
id | integer | Product ID |
name | string | Product name |
slug | string | URL-friendly product identifier |
sku | string | Stock keeping unit |
price | decimal | Product price |
specialPrice | decimal | Sale price (if applicable) |
type | string | Product type (simple, configurable, bundle) |
imageUrl | string | Main product image URL |
rating | decimal | Average rating (0-5) |
reviews | integer | Number of reviews |
inStock | boolean | Stock availability |
description | string | Short product description |
Pagination Response
| Field | Type | Description |
|---|---|---|
total | integer | Total products matching filters |
perPage | integer | Items per page |
currentPage | integer | Current page |
lastPage | integer | Last page number |
Use Cases
- Display product listings on category pages
- Implement product search functionality
- Build product filtering and sorting
- Create product carousels
- Load products for comparison

