Update Gifts Quantity by SKU
Notice 提醒Gifts unlimited_quantity should be false
贈品 無限數量 需要設定為 false
Funciton
To update gifts quantity by SKU
使用商品貨號更新贈品庫存數量
URL
PUT <<api_domain>>/v1/gifts/update_quantity
Request parameters
Parameter | Column Type | Description | Example |
|---|---|---|---|
sku *Required |
| Gift's SKU | |
quantity |
| Quantity
| |
replace |
| Whether replacing the original quantity
| |
Request Example
curl -X PUT \
'<<api_domain>>/v1/gifts/update_quantity' \
-H 'Accept: application/json' \
-H 'Authorization: Bearar {{access_token}}' \
-H 'User-Agent: shopline-test' \
-H 'Content-Type: application/json' \
-d '{
"sku": "sku-123",
"quantity": 10,
"replace": true
}'curl -X PUT \
https://open.shoplineapp.com/v1/gifts/update_quantity \
-H 'Accept: application/json' \
-H 'Authorization: Bearar {{access_token}}' \
-H 'User-Agent: shopline-test' \
-H 'Content-Type: application/json' \
-d '{
"sku": "sku-123",
"quantity": -1,
"replace": false
}'Response fields
Field | Column Type | Description | Example |
|---|---|---|---|
id |
| Gift's ID | 5bf68afde3880941d320ecae |
sku |
| Gift's SKU | sku-123 |
quantity |
| Gift's Current Quantity | 123 |
updated_at |
| Last Updated Time | 2019-01-25T06:56:19.561+00:00 |
Response Example
{
"id": "5bf68afde3880941d320ecae",
"sku": "sku-123",
"quantity": 123,
"updated_at": "2019-01-25T06:56:19.561+00:00"
}Updated 13 days ago