Products
List and create catalog products for the authenticated merchant.
GET
/api/productsList products with pagination and optional search.
Auth: Bearer (user session)
Query
| Field | Type | Description |
|---|---|---|
page | number | Page number (default 1). |
limit | number | Items per page. |
search | string | Search term (uses search_products RPC when set). |
Example response
{
"products": [{ "id": "…", "name": "Hoodie", "stock": 12, "price": 499 }],
"pagination": { "page": 1, "limit": 20, "total": 42 }
}POST
/api/productsCreate a product (optional variants and images).
Auth: Bearer (user session)
Body
| Field | Type | Description |
|---|---|---|
namerequired | string | Product name. |
stockrequired | number | Non-negative stock quantity. |
price | number | Unit price. |
sku | string | SKU. |
category | string | Category label. |
description | string | Product description. |
image_url | string | Primary image URL. |
store_id | string | Store scope (recommended). |
variants | array | Variant rows (size/color/stock/price). |
images | array | Additional image rows. |
Subject to plan product limits and monthly API request limits.
Example request
{
"name": "Classic Tee",
"stock": 50,
"price": 299,
"store_id": "uuid",
"variants": [{ "name": "M", "stock": 20, "price_modifier": 0 }]
}