Products
Create, list, update, and delete products in your store. Each product can have variants and images.
| Method | Path | Description |
|---|---|---|
GET | /v1/products | List products |
POST | /v1/products | Create a product |
GET | /v1/products/{id} | Get a product |
PATCH | /v1/products/{id} | Update a product |
DELETE | /v1/products/{id} | Delete a product |
List products
GET /v1/productsReturns a cursor-paginated list of products. Supports filtering by status, type, collection, and full-text search with typo correction. Use `?expand=variants,images` to include related resources and `?fields=` for sparse fieldsets. Publishable keys can read; secret keys are required for all other methods. Multi-currency conversion is applied when `?currency=` is provided.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 25 | |
cursor | string | - | |
fields | string | - | |
sort | string | created_at | Values: created_at, updated_at, title, relevance |
order | string | desc | Values: asc, desc |
status | string | - | Values: active, draft, archived, preorder, coming_soon, discontinued |
handle | string | - | Filter by exact handle (URL slug) |
collection_id | string | - | Filter by collection membership (supports both manual and automatic collections) |
created_after | string | - | |
created_before | string | - | |
search | string | - | |
title | string | - | Filter by title (case-insensitive partial match) |
supplier_id | string | - | Filter to products with at least one variant from this supplier |
channel | string | - | Filter to products visible on this channel (by slug) |
currency | string | - | |
expand | string | - |
Request
curl https://api.hydrajs.dev/v1/products \
-H "Authorization: Bearer sk_YOUR_KEY"Response 200
{
"data": [],
"pagination": {}
}Get a product
GET /v1/products/{id}Retrieves a single product by ID. Supports `?expand=variants,images,prices` to include related resources and `?fields=` for sparse fieldsets. When `expand=prices` is included alongside variants, per-variant price key prices are hydrated. Multi-currency conversion is applied when `?currency=` is provided. Publishable keys can read but `internal_notes` is stripped.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string |
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
expand | string | - | |
currency | string | - | |
fields | string | - |
Request
curl https://api.hydrajs.dev/v1/products/:id \
-H "Authorization: Bearer sk_YOUR_KEY"Response 200
{
"data": {}
}Create a product
POST /v1/productsCreates a new product with optional variants, tags, SEO metadata, and specifications. A default variant is auto-created if none are provided. Dispatches a `product.created` webhook event. Requires a secret key.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | |
handle | string | No | |
subtitle | string | No | |
description | string | No | |
status | string | No | Values: active, draft, archived, preorder, coming_soon, discontinued |
product_type | string | No | |
brand | string | No | |
google_product_category | string | No | |
hs_code | string | No | |
country_of_origin | string | No | |
tax_group_id | string | null | No | |
fulfillment_type | string | No | Values: physical, digital, service, gift_card |
internal_notes | string | No | |
link_label | string | null | No | |
link_heading | string | null | No | |
qty_step | integer | No | |
preorder_expected_date | string | null | No | |
tags | string[] | No | |
options | object[] | No | |
variants | object[] | No | |
specifications | object[] | No | |
seo | object | No | |
metadata | object | No |
Request
curl -X POST https://api.hydrajs.dev/v1/products \
-H "Authorization: Bearer sk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Classic Cotton T-Shirt"
}'Response 201
{
"data": {}
}Update a product
PATCH /v1/products/{id}Partially updates a product. Only the fields provided in the request body are modified. Dispatches a `product.updated` webhook event. Requires a secret key.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | No | |
handle | string | No | |
subtitle | string | null | No | |
description | string | null | No | |
status | string | No | Values: active, draft, archived, preorder, coming_soon, discontinued |
product_type | string | No | |
brand | string | null | No | |
google_product_category | string | null | No | |
hs_code | string | null | No | |
country_of_origin | string | null | No | |
tax_group_id | string | null | No | |
fulfillment_type | string | No | Values: physical, digital, service, gift_card |
internal_notes | string | null | No | |
link_label | string | null | No | |
link_heading | string | null | No | |
qty_step | integer | null | No | |
preorder_expected_date | string | null | No | |
tags | string[] | No | |
options | object[] | No | |
specifications | object[] | No | |
seo | object | No | |
metadata | object | No | |
create_redirect | boolean | No |
Request
curl -X PATCH https://api.hydrajs.dev/v1/products/:id \
-H "Authorization: Bearer sk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Classic Cotton T-Shirt",
"handle": "classic-cotton-t-shirt",
"subtitle": "Lightweight everyday essential"
}'Response 200
{
"data": {}
}Delete a product
DELETE /v1/products/{id}Soft-deletes a product by setting `deleted_at`. The product is excluded from all list and search queries immediately. A daily cron job permanently purges soft-deleted products after 30 days. Dispatches a `product.deleted` webhook event. Requires a secret key.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string |
Request
curl -X DELETE https://api.hydrajs.dev/v1/products/:id \
-H "Authorization: Bearer sk_YOUR_KEY"