v1

latestOpenAPI 3.0.02026-07-26318168886.7 KB
Addon Products

Update Addon Product Stock

To update the addon product stock with its ID<br> 使用商品 ID 更新加購品在各個倉庫的庫存

put/addon_products/{id}/stocks

Path parameters

idstring required

Addon Product ID<br>加購品ID

Request body

warehouse_idstring required

Warehouse’s id<br>倉庫 id<br>-----<br>Only warehouse with status "active" can be updated<br>只有 status “active” 的 warehouse stock 的可以更新

quantitynumber required

Quantity<br>(新增/減少)商品數量<br><br>Negative number is allowed<br>允許更新庫存為負值

is_replaceboolean

Whether replacing the original quantity<br>是否取代原本數量<br><br>true: replace the product's quantity with the number you provided<br>取代原本數量<br><br>false: increase/decrease the quantity with the number you provided<br>增加/減少數量

Example request

{
  "warehouse_id": "5ee819deab591e00169a4618",
  "quantity": 21
}

Response

OK

idstring

Product's ID<br>商品ID

unlimited_quantitytrue | false

Unlimited product quantity or not.<br>商品數量是否無限

Example response

{
  "id": "5d3594c276e7ec003b7021c0",
  "title_translations": {
    "en": "testing SL-8049",
    "zh-hant": "測試 SL-8049 round 2"
  },
  "variations": {
    "fields_translations": {
      "en": [
        "Red",
        "M"
      ],
      "zh-hant": [
        "紅",
        "中"
      ]
    }
  }
}