店舗別商品SKU紐づけ更新
PATCH
/products/{product_id}/shops/{shop_id}/product_classes/{product_class_id}/sku_sets/{product_sku_code}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-oms/products/example/shops/example/product_classes/example/sku_sets/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"quantity":3,"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/shops/example/product_classes/example/sku_sets/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "quantity": 3, "optionCond": "定期購入のみ" }'店舗別商品SKU紐づけを更新します。
quantity / optionCond のうち1つ以上を指定してください。指定した項目のみを更新し、省略した項目は変更しません。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”product_id
required
string
商品ID
shop_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
ProductsShopSkuSets
店舗別商品SKU紐づけの更新内容
quantity / optionCond のうち1つ以上を指定してください。指定した項目のみを更新し、省略した項目は変更しません。
object
quantity
数量
integer
optionCond
引き当て条件
string
Example
{ "quantity": 3, "optionCond": "定期購入のみ"}Responses
Section titled “Responses”更新成功
Media typeapplication/json
object
productClassId
店舗別商品規格ID
string
shopId
店舗ID
string
productId
商品ID
string
productSkuCode
商品SKUコード
string
quantity
数量
string
optionCond
引き当て条件
string
Examples
Exampledefault
{ "productClassId": "3001", "shopId": "10", "productId": "1001", "productSkuCode": "SKU-001", "quantity": "3", "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}{ "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更新対象が存在しない場合
{ "type": "about:blank", "title": "NotFound", "detail": "該当する店舗別商品SKU紐づけデータ(店舗別商品規格ID・店舗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}