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 | String | Gift's SKU č´åįåå貨č | ruby "sku": "sku-123" |
quantity | Integer | Quantity (æ°åĸ/æ¸å°)č´åæ¸é - *if replace sets as false, allows quantity to be negative number åĻæ replace įē falseīŧå訹 quantity įēč˛ æ¸ | ruby "quantity": 10 "quantity": -1 |
replace | Boolean | Whether replacing the original quantity æ¯åĻåäģŖåæŦæ¸é - true: replace the quantity with the number you provided åäģŖåæŦæ¸é false: increase/decrease the quantity with the number you provided åĸå /æ¸å°æ¸é *Default: true | ruby "replace": true |
Request Example
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": 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 | String | Gift's ID č´åID | 5bf68afde3880941d320ecae |
sku | String | Gift's SKU č´å貨č | sku-123 |
quantity | Number | Gift's Current Quantity č´åįŽååēĢå | 123 |
updated_at | DateTime | 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 almost 5 years ago