v1

latestOpenAPI 3.0.02026-07-26318168886.7 KB
Addon Products

Update Addon Product Quantity

To update quantity of add-on products with open API<br>透過open API 更新加購品數量

put/addon_products/{id}/update_quantity

Path parameters

idstring required

AddonProduct's ID<br>加購品ID

Request body

quantitynumber required

Quantity<br>(新增/減少)加購品數量<br>-<br> *if replace sets as false, allows quantity to be negative number<br> 如果 replace 為 false,准許 quantity 為負數

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>增加/減少數量<br><br>

Example request

{
  "quantity": 21,
  "replace": true
}

Response

OK

idstring

Add-on Product‘s ID<br>加購品ID

status'active' | 'draft'

Add-on Product's Status<br>加購品狀態<br>-<br>Status:<br>active上架<br>draft 下架

pricenumber

Addon Product Price<br>加購品價格

weightnumber

Addon Product's Weight (kg)<br>加購品重量 (公斤)

quantitynumber

Current Quantity<br>加購品目前庫存

unlimited_quantityboolean

Unlimited quantity or not.<br>加購品數量是否無限<br> -<br> true: unlimited quantity<br> false: limited quantity

skustring

Stock Keeping Unit<br>加購品貨號

tax_typestring

Tax Type<br>國內稅項

oversea_tax_typestring

Oversea Tax Type<br>海外稅項

created_atstring

Created Time<br>加購品創造時間

Example response

{
  "id": "5892d8679f9a4fc07b008295",
  "status": "draft",
  "title_translations": {
    "en": "Addon Products",
    "zh-hant": "加購品"
  },
  "weight": 10.2,
  "quantity": 10,
  "medias": {
    "id": "5f8e5dc08a8bb70a5c9cd93c",
    "alt_translations": {
      "en": "Image ALT",
      "zh-hant": "圖片ALT"
    },
    "images": {
      "original": {
        "width": 800,
        "height": 800,
        "url": "https://img.example.com/media/1234/thumb.jpg"
      }
    }
  },
  "sku": "addon_product_sku",
  "created_at": "2019-12-30T09:16:46.142+00:00",
  "promotions": [
    {
      "discounted_price": {
        "cents": 999999999,
        "currency_symbol": "NT$",
        "currency_iso": "TWD",
        "label": "NT$999,999,999",
        "dollars": 999999999
      },
      "start_at": "2020-07-09T04:00:00.000+00:00",
      "end_at": "2020-07-09T04:00:00.000+00:00"
    }
  ]
}