コンテンツにスキップ

店舗別商品SKU紐づけ登録

POST
/products_shop_sku_sets
curl --request POST \
--url https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-oms/products_shop_sku_sets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "productClassId": 3001, "shopId": 10, "productId": 1001, "productSkuCode": "SKU-001", "quantity": 2, "optionCond": "定期購入のみ" }'

店舗別商品SKU紐づけを登録します。

Media typeapplication/json
object
productClassId
required

店舗別商品規格ID

integer
>= 1 <= 999999999
shopId
required

店舗ID

integer
>= 1 <= 999999999
productId
required

商品ID

integer
>= 1 <= 999999999
productSkuCode
required

商品SKUコード

string
>= 1 characters <= 50 characters
quantity
required

数量

integer
>= 1 <= 999999999
optionCond

引き当て条件

string
0 <= 3000 characters
Example
{
"productClassId": 3001,
"shopId": 10,
"productId": 1001,
"productSkuCode": "SKU-001",
"quantity": 2,
"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": "2",
"optionCond": "定期購入のみ"
}
  • 指定された項目が不正な場合 リクエストボディで参照する関連リソースが存在しない場合、または入力値が不正な場合に返却します。

  • 指定された商品IDが存在しない場合

  • 指定された店舗IDが存在しない場合

  • 指定された店舗IDが、この商品の取扱店舗ではない場合

  • 指定された店舗別商品規格IDが存在しない場合

  • 指定された商品SKUコードが存在しない場合

  • 指定された数量が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
}

指定された店舗別商品規格ID・店舗ID・商品ID・商品SKUコードが重複している場合

Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
status
integer
Examples
Example重複している場合
{
"type": "about:blank",
"title": "Conflict",
"detail": "店舗別商品規格ID・店舗ID・商品ID・商品SKUコードが重複しています",
"status": 409
}

サーバー内部エラー

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
}