v1

latestOpenAPI 3.0.02026-07-26318168886.7 KB
Products

Update Product Variation Price

To update product variation's price with open API<br>透過open API 更新規格金額

put/products/{product_id}/variations/{id}/update_price

Path parameters

product_idstring required

Product's ID<br>主商品ID

idstring required

Product Variation's Key<br>商品規格ID

Request body

pricenumber

Price (Note: Cannot be set to null. Product with a price of 0 cannot be sold.)<br> 原價格 (備註:不能設定為null。價格為0的商品不能被售出)

price_salenumber

Product Sale Price<br>特價

costnumber

Product Cost<br>成本價

member_pricenumber

Member Price<br>會員價

retail_pricenumber

Retail Price<br>零售價

product_price_tiersobject

Membership tier's ID<br>會員等級ID

Example request

{
  "price": 123,
  "price_sale": 666.6,
  "cost": 500,
  "member_price": 500,
  "retail_price": 500,
  "product_price_tiers": {
    "5fe163b78b02930047a0a32e": 499,
    "5fe163b78b02930047a0a32f": 399
  }
}

Response

OK

idstring

Product Variation's ID<br>規格 ID

quantitynumber

Product variation's current quantity<br>規格現有數量

total_orderable_quantitynumber

Product variation's current orderable quantity<br>規格現有可購買數量

unlimited_quantityboolean

Whether the variation has unlimited quantity or not.<br>規格是否有無限數量<br>*Please check the main product's unlimited_quantity to see whether variation has unlimited quantity or not.<br><br>unlimited_quantity of variation will always shows null

preorder_limitinteger

Pre-ordere Limit<br>預購上限

skustring

Stock Keeping Unit<br>貨號

location_idstring

Location ID<br>儲位編號

variant_option_idsstring[]

ID of the corresponding variant options<br>對應規格類別 ID

barcodestring

Barcode<br>商品條碼編號

mpnstring

Manufacturer Part Number<br>製造編號

gtinstring

Barcode<br>商品條碼編號

barcode_type'Code 128' | 'Bookland EAN' | 'ISBN'

Barcode type<br>商品條碼編號類別

locked_inventory_countnumber
weightnumber

Weight (kg)<br>重量 (公斤)

Example response

{
  "id": "5d3594c2e95d2f000642e011",
  "price": {
    "cents": 999999999,
    "currency_symbol": "NT$",
    "currency_iso": "TWD",
    "label": "NT$999,999,999",
    "dollars": 999999999
  },
  "price_sale": {
    "cents": 999999999,
    "currency_symbol": "NT$",
    "currency_iso": "TWD",
    "label": "NT$999,999,999",
    "dollars": 999999999
  },
  "member_price": {
    "cents": 999999999,
    "currency_symbol": "NT$",
    "currency_iso": "TWD",
    "label": "NT$999,999,999",
    "dollars": 999999999
  },
  "retail_price": {
    "cents": 999999999,
    "currency_symbol": "NT$",
    "currency_iso": "TWD",
    "label": "NT$999,999,999",
    "dollars": 999999999
  },
  "cost": {
    "cents": 999999999,
    "currency_symbol": "NT$",
    "currency_iso": "TWD",
    "label": "NT$999,999,999",
    "dollars": 999999999
  },
  "quantity": 100,
  "total_orderable_quantity": 100,
  "preorder_limit": 1,
  "media": {
    "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": "green_l1",
  "location_id": "LaB123",
  "feed_variations": {
    "color": {
      "zh-hant": "紅色",
      "en": "red"
    },
    "size": {
      "zh-hant": "xs",
      "en": "xs"
    }
  },
  "variant_option_ids": [
    "5d3594c2622a56618082c99f",
    "5d3594c2622a56618082c9a0"
  ],
  "locked_inventory_count": 10,
  "weight": 1.2
}