Skip to content

Products ​

Create, list, update, and delete products in your store. Each product can have variants and images.

MethodPathDescription
GET/v1/productsList products
POST/v1/productsCreate 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/products

Returns 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

ParameterTypeDefaultDescription
limitinteger25
cursorstring-
fieldsstring-
sortstringcreated_at Values: created_at, updated_at, title, relevance
orderstringdesc Values: asc, desc
statusstring- Values: active, draft, archived, preorder, coming_soon, discontinued
handlestring-Filter by exact handle (URL slug)
collection_idstring-Filter by collection membership (supports both manual and automatic collections)
created_afterstring-
created_beforestring-
searchstring-
titlestring-Filter by title (case-insensitive partial match)
supplier_idstring-Filter to products with at least one variant from this supplier
channelstring-Filter to products visible on this channel (by slug)
currencystring-
expandstring-

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

ParameterTypeDescription
idstring

Query parameters

ParameterTypeDefaultDescription
expandstring-
currencystring-
fieldsstring-

Request

curl https://api.hydrajs.dev/v1/products/:id \
  -H "Authorization: Bearer sk_YOUR_KEY"

Response 200

{
	"data": {}
}

Create a product

POST /v1/products

Creates 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

FieldTypeRequiredDescription
titlestringYes
handlestringNo
subtitlestringNo
descriptionstringNo
statusstringNo Values: active, draft, archived, preorder, coming_soon, discontinued
product_typestringNo
brandstringNo
google_product_categorystringNo
hs_codestringNo
country_of_originstringNo
tax_group_idstring | nullNo
fulfillment_typestringNo Values: physical, digital, service, gift_card
internal_notesstringNo
link_labelstring | nullNo
link_headingstring | nullNo
qty_stepintegerNo
preorder_expected_datestring | nullNo
tagsstring[]No
optionsobject[]No
variantsobject[]No
specificationsobject[]No
seoobjectNo
metadataobjectNo

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

ParameterTypeDescription
idstring

Request body

FieldTypeRequiredDescription
titlestringNo
handlestringNo
subtitlestring | nullNo
descriptionstring | nullNo
statusstringNo Values: active, draft, archived, preorder, coming_soon, discontinued
product_typestringNo
brandstring | nullNo
google_product_categorystring | nullNo
hs_codestring | nullNo
country_of_originstring | nullNo
tax_group_idstring | nullNo
fulfillment_typestringNo Values: physical, digital, service, gift_card
internal_notesstring | nullNo
link_labelstring | nullNo
link_headingstring | nullNo
qty_stepinteger | nullNo
preorder_expected_datestring | nullNo
tagsstring[]No
optionsobject[]No
specificationsobject[]No
seoobjectNo
metadataobjectNo
create_redirectbooleanNo

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

ParameterTypeDescription
idstring

Request

curl -X DELETE https://api.hydrajs.dev/v1/products/:id \
  -H "Authorization: Bearer sk_YOUR_KEY"