PATCH
/api/public/v1/products/{productId}Update a product
Update one or more fields on a product.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
productId | string | Required | Product ID. |
Request Body
| Property | Type | Description |
|---|---|---|
name | string | Product name. |
description | string | Product description. |
price | number | Price in cents. |
stock | number | Current stock count. |
stockEnabled | boolean | Toggle stock tracking. |
PATCHExample request
curl
curl -X PATCH "https://www.pxb.app/api/public/v1/products/{productId}" \
-H "X-Organization-Id: your_org_id" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"price": 14000,
"stock": 25,
"stockEnabled": true
}'200Example response
json
{
"message": "Product updated successfully!",
"content": {
"product": {
"id": "prod_1"
}
}
}