コンテンツにスキップ

在庫相対値更新

POST
/stock/{product_id}/add

在庫情報を更新します。

在庫数は、現在の値に対し、入力された値を加算(入力値が負の場合は減算)した値に更新します。

対象プラン

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

商品ID

object
storeId
required
店舗ID

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

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

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

string
<= 100 characters
Example
{
"storeId": "123456789012345",
"stockAmount": "1234567890",
"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"
}
}
  • 計算後の在庫数が999999999より大きい場合
  • 計算後の在庫数が-999999999未満の場合
  • 店舗IDが存在しない場合
  • object
    type
    required
    string
    title
    required
    string
    detail
    string
    status
    integer
    Examples
    {
    "type": "about:blank",
    "title": "Bad Request",
    "detail": "更新後の在庫数は[999999999]以下である必要があります",
    "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
    }