更新 — 产品
更改现有产品、价格和出版物数据。
PATCH
/api/v1/products/{product_id}cURL 请求
curl --disable --globoff --fail-with-body --silent --show-error \
--proto '=https' --connect-timeout 5 --max-time 30 \
--request PATCH \
--url https://shop.onshopently.com/api/v1/products/example \
--header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN' \
--header 'Idempotency-Key: example-update_product_api_v1_products__product_id__patch' \
--header 'Content-Type: application/json' \
--data-raw '{"expected_version":1,"sku":"example"}'
响应
{
"data": {
"deleted": false,
"id": "example",
"version": 1
},
"meta": {
"request_id": "example"
}
}
所需权限
同时修改商品变体时
如果发送 variant_value_ids 字段,请为密钥添加以下权限:
如果发送 variants_enabled 字段,请为密钥添加以下权限: