コンテンツにスキップ

在庫更新

PATCH
/stock/{product_id}

在庫情報を更新します。

在庫数は、入力された値と同じになるよう更新します。

対象プラン

  • スタンダード
  • プレミアム
  • プレミアムプラス
  • フードビジネス
  • リテールビジネス
product_id
required
string

商品ID

object
storeId
required
店舗ID

※ ユーザーアクセストークンを利用する場合、ユーザーの所属する店舗IDを指定してください。

string format: int
<= 15 characters
stockAmount
required
在庫数
string format: int
>= -999999999 <= 999999999
stockHistory
在庫変動履歴
object
memo
メモ

在庫変動履歴に設定するメモ

string
<= 100 characters
Example
{
"storeId": "123456789012345",
"stockAmount": "123456789",
"stockHistory": {
"memo": "string"
}
}

取得成功

object
productId

商品ID

string
storeId

店舗ID

string
stockAmount

在庫数

string
updDateTime

更新日時

string
stockHistory

在庫変動履歴

object
id

在庫変動履歴ID

string
memo

メモ

string
Example
{
"productId": "string",
"storeId": "string",
"stockAmount": "string",
"updDateTime": "string",
"stockHistory": {
"id": "string",
"memo": "string"
}
}
  • 店舗IDが存在しない場合
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{
"type": "about:blank",
"title": "Bad Request",
"detail": "指定された店舗IDのリソースが見つかりません",
"status": 400
}
  • URI指定の商品IDが存在しない場合
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{
"type": "about:blank",
"title": "NotFound",
"detail": "指定されたIDのリソースが見つかりません",
"status": 404
}