商品SKU紐づけ更新
PATCH
/products/{product_id}/product_classes/{product_class_id}/sku_sets/{product_sku_code}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-oms/products/example/product_classes/example/sku_sets/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"quantity":10,"optionCond":"テスト"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-oms/products/example/product_classes/example/sku_sets/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "quantity": 10, "optionCond": "テスト" }'商品SKU紐づけを更新します。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”product_id
required
string
商品ID
product_class_id
required
string
商品規格ID
product_sku_code
required
string
商品SKUコード
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ProductsSkuSets
object
quantity
数量
integer
optionCond
引き当て条件
string
Example
{ "quantity": 10, "optionCond": "テスト"}Responses
Section titled “Responses”更新成功
Media typeapplication/json
object
productClassId
商品規格ID
string
productId
商品ID
string
productSkuCode
商品SKUコード
string
quantity
数量
string
optionCond
引き当て条件
string
Examples
Exampledefault
{ "productClassId": "1", "productId": "1", "productSkuCode": "pf_api_test_product", "quantity": "10", "optionCond": "テスト"}- 指定された項目が不正な場合
- 指定された数量が1未満の場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
Array<string>
status
integer
Examples
{ "type": "about:blank", "title": "BadRequest", "detail": [ "指定された項目が不正です: invalidKey" ], "status": 400}{ "type": "about:blank", "title": "BadRequest", "detail": "数量は1以上で入力してください", "status": 400}パスパラメータで指定された更新対象の商品SKU紐づけが存在しない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
Array<string>
status
integer
Examples
Example指定された商品SKU紐づけが存在しない場合
{ "type": "about:blank", "title": "NotFound", "detail": "該当する商品SKU紐づけデータ(商品規格ID・商品ID・商品SKUコード)が見つかりませんでした", "status": 404}サーバー内部エラー
Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
Array<string>
status
integer
Examples
Exampledefault
{ "type": "about:blank", "title": "InternalServerError", "status": 500}