コンテンツにスキップ

店舗別商品SKU紐づけ更新

PATCH
/products/{product_id}/shops/{shop_id}/product_classes/{product_class_id}/sku_sets/{product_sku_code}
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つ以上を指定してください。指定した項目のみを更新し、省略した項目は変更しません。

product_id
required
string
>= 1 characters

商品ID

shop_id
required
string
>= 1 characters

店舗ID

product_class_id
required
string
>= 1 characters

店舗別商品規格ID

product_sku_code
required
string
>= 1 characters

商品SKUコード

Media typeapplication/json
ProductsShopSkuSets

店舗別商品SKU紐づけの更新内容 quantity / optionCond のうち1つ以上を指定してください。指定した項目のみを更新し、省略した項目は変更しません。

object
>= 1 properties
quantity

数量

integer
>= 1 <= 999999999
optionCond

引き当て条件

string
0 <= 3000 characters
Example
{
"quantity": 3,
"optionCond": "定期購入のみ"
}

更新成功

Media typeapplication/json
object
productClassId

店舗別商品規格ID

string
>= 1 characters <= 9 characters
shopId

店舗ID

string
>= 1 characters <= 9 characters
productId

商品ID

string
>= 1 characters <= 9 characters
productSkuCode

商品SKUコード

string
>= 1 characters <= 50 characters
quantity

数量

string
>= 1 characters <= 9 characters
optionCond

引き当て条件

string
nullable 0 <= 3000 characters
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
status
integer
Examples
{
"type": "about:blank",
"title": "BadRequest",
"detail": [
"指定された項目が不正です: invalidKey"
],
"status": 400
}

パスパラメータで指定された更新対象の店舗別商品SKU紐づけが存在しない場合

Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
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
status
integer
Examples
Exampledefault
{
"type": "about:blank",
"title": "InternalServerError",
"status": 500
}