Update Gifts
Function
To update information about existing gift with open API
透過open API 更新贈品
URL
PUT <<api_domain>>/v1/gifts/:id
Request Parameters
Field | Type | Description | Example |
|---|---|---|---|
title_translations |
| Gifts Title | { "en": "create by open api}" |
media_ids |
| Array of Media ID |
|
unlimited_quantity |
| Gifts unlimited quantity or not |
|
sku |
| 贈品SKU |
|
cost |
| Cost |
|
weight |
| Weigth |
|
quantity |
| Gift Quantity |
|
JSON Response Sample
{
"_id": "5d8b0a6552910502640e8a76",
"cost": {
"cents": 13,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$13",
"dollars": 13.0
},
"title_translations": {
"en": "create by open api!!!"
},
"description_translations": {},
"media_ids": [
"603f06f7f6ba0c00451d0f12"
],
"owner_id": "5d8aecb7f21e4e00014d5ae7",
"sku": "GIFT-SKU-0002",
"status": "active",
"unlimited_quantity": false,
"weight": 42.18,
"created_at": "2019-09-25T06:34:13.048Z",
"updated_at": "2021-06-25T10:46:51.209Z",
"stock_ids": null,
"root_product_id": null,
"media": [],
"quantity": 3
}Sample CURL Example
curl --location --request PUT '<<api_domain>>/v1/gifts/5d8b0a6552910502640e8a76' \
--header 'Authorization: Bearer ${token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"title_translations": { "en": "create by open api"},
"media_ids": ["603f06f7f6ba0c00451d0f12"],
"unlimited_quantity": false,
"sku": "GIFT-SKU-0002",
"cost": { "dollars": 13},
"weight": 42.18
}'Updated 13 days ago