Update Product Variation
Function
Update information of an existing product variation.
針對現有規格商品做訊息更新
URL
PUT https://open.shopline.io/v1/products/:product_id/variations/:id
Request Parameters
Parameter | Type | Description | Example |
|---|---|---|---|
product_id *Required |
| Product ID | |
id |
| Variant ID | |
location_id |
| Location ID | |
sku |
| SKU ( Stock Keeping Unit ) | |
price |
| Product Price | |
member_price |
| Member Price | |
quantity |
| Product Quantity Directly update the quantity of the variation. The quantity is between -9999999 to 9999999. | |
image |
| Link of Images
| |
price_sale |
| Sale price | |
cost |
| Cost | |
weight |
| Weight (kg) |
|
gtin |
| Barcode |
|
preorder_limit |
| Preorder Limit (set to -1 if it's unlimited quantity) | |
Request Example
{
"sku": "24235",
"location_id": "87722",
"quantity": 90,
"price":460,
"member_price":420,
"image": "https://the-allstars.com/blog/images/articl/articl7.jpg",
"price_sale": 300,
"cost": 30,
"weight": 1.2,
"gtin": "1234567890",
"preorder_limit": 30
}Response Example
Also same with Get Product
{
"_id": "5e325db7596dfe7c20c7d11a",
"barcode_type": "Code 128",
"cost": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"preorder_limit": 30,
"created_at": "2020-01-30T04:38:15.576+00:00",
"fields": [
{
"name_translations": {
"en": "en8",
"zh-hant": "chinese8"
}
},
{
"name_translations": {
"en": "cus8",
"zh-hant": "cus8"
}
}
],
"fields_translations": {
"en": [
"en8",
"cus8"
],
"zh-hant": [
"chinese8",
"cus8"
]
},
"gtin": "1234567890",
"key": "5e325db736b1ed0014dd2bdd",
"location_id": "87722",
"max_order_quantity": 10,
"media_id": null,
"member_price": {
"cents": 420,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$420",
"dollars": 420.0
},
"mpn": null,
"price": {
"cents": 460,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$460",
"dollars": 460.0
},
"price_sale": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"quantity": 90,
"root_product_variation_id": null,
"sku": "24235",
"stock_ids": null,
"unlimited_quantity": null,
"updated_at": "2020-03-17T09:20:47.020+00:00",
"variant_option_ids": [
"5e325db7596dfe7c20c7d118",
"5e325db7596dfe7c20c7d119"
],
"wapos_id": null,
"weight": 0.0,
"id": "5e325db7596dfe7c20c7d11a",
"out_of_stock_orderable": false,
"subscription_enabled": false,
"subscription_period_duration": 30,
"filter_tags": []
}Updated 13 days ago