Products
Create, list, update and delete the products in a store with the Products API.
Products are the items you sell. Use the Products API to keep your catalog in sync with your own systems.
All endpoints are under /stores/{slug}/v2/products and require an API key with the products:read permission for reads and products:write for changes. See Authentication.
The product object
| Field | Type | Description |
| --- | --- | --- |
| sku | string | Unique identifier of the product within the store. Letters, numbers, dots, dashes and underscores, up to 64 characters. |
| name | string | Product name, 2 to 255 characters. |
| price | number | Selling price in the store currency, in major units (for example 24 or 24.50). |
| compare_at_price | number | Original price shown struck through. Must be greater than price. |
| stock | integer | Units available. Required for physical products; 0 means unavailable. |
| fulfillment_type | string | physical (default) or digital. |
| description | string | Product description, up to 20,000 characters. |
| category | string | Category slug. |
| images | array of strings | Up to 20 image URLs (https://). |
| product_slug | string | The URL slug. Defaults to the lowercase SKU. |
| status | string | active or draft. |
Responses may include additional read-only fields, such as id. Ignore fields you do not recognize.
List products
GET /stores/{slug}/v2/products
| Parameter | Description |
| --- | --- |
| page | Page number, starting at 1. |
| per_page | Items per page, from 1 to 200. Default 50. |
| search | Free-text search across name and SKU. |
| category | Filter by category slug. |
| status | Filter by status. |
curl "https://wafle.click/api/v1/stores/your-store/v2/products?per_page=2&status=active" \
-H "X-Wafle-Store-Key: $WAFLE_KEY"
Example response (abridged):
{
"products": [
{ "sku": "CANDLE-8OZ", "name": "Classic Candle, 8 oz", "price": 24, "stock": 50, "status": "active" }
]
}
Retrieve a product
GET /stores/{slug}/v2/products/{sku}
Returns the product with the given SKU, or HTTP 404 if it does not exist.
Create a product
POST /stores/{slug}/v2/products
Required fields: sku, name and price. Physical products also need stock.
curl -X POST "https://wafle.click/api/v1/stores/your-store/v2/products" \
-H "X-Wafle-Store-Key: $WAFLE_KEY" \
-H "Content-Type: application/json" \
-d '{"sku":"CANDLE-8OZ","name":"Classic Candle, 8 oz","price":24,"stock":50,"status":"draft"}'
Creating a product whose SKU already exists fails with HTTP 409 and changes nothing. A new product with "status": "draft" is not visible in the store until you set it to active.
Update a product
PATCH /stores/{slug}/v2/products/{sku}
Send only the fields you want to change. Fields you leave out keep their values.
curl -X PATCH "https://wafle.click/api/v1/stores/your-store/v2/products/CANDLE-8OZ" \
-H "X-Wafle-Store-Key: $WAFLE_KEY" \
-H "Content-Type: application/json" \
-d '{"price":26,"compare_at_price":30,"status":"active"}'
To remove the struck-through price, send "compare_at_price": null.
Delete a product
DELETE /stores/{slug}/v2/products/{sku}
Removes the product from your store. Existing orders keep their own record of what was bought.
Import many products
POST /stores/{slug}/v2/products/bulk accepts a list of products in a single request. Use it for large imports instead of sending one request per product, and respect the rate limits.
Related
Need help with an integration? Contact support.