Commerce

Update product

Change a product.

Only the fields sent change. Editing stock records a stock movement.

Path Parameters

product*string

A product id. Anything that is not one is 404 resource_missing.

Formatuuid

Header Parameters

X-Request-Id?string

Your id for this request; it becomes the request_id of any error. Without it the server makes one.

Request Body

application/json
  1. body
name?string
Lengthlength <= 255
description?string|null
price?||null
stock?||null
unit?Unit
Value in"PIECE""KG""LITER""DOZEN""CRATE""CARTON""BUNDLE""BOX"
status?ProductStatus
Value in"DRAFT""ACTIVE""ARCHIVED"
is_active?boolean
category?|null
digital_asset_url?string|null
digital_asset_filename?string|null
images?array<string>
Itemsitems <= 10
tags?array<>
Itemsitems <= 7
curl -X PATCH 'https://v3.ghala.io/v1/commerce/shop/products/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "description": "string",  "price": "string",  "stock": 0,  "unit": "PIECE",  "status": "DRAFT",  "is_active": true,  "product_type": "PHYSICAL",  "category": "FOOD",  "images": [    "string"  ],  "tags": [    "string"  ],  "digital_asset_url": "string",  "digital_asset_filename": "string",  "variants": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "label": "string",      "price": "1500.00",      "stock": 0,      "is_active": true    }  ]}