---
title: "Update Gift Quantity"
method: PUT
path: "/gifts/{id}/update_quantity"
tags: ["Gifts"]
---

# Update Gift Quantity

`PUT /gifts/{id}/update_quantity`

To update quantity of gifts with open API<br>透過open API 更新贈品數量

## Path parameters

- `id` string, required

## Request body

- object
  - `quantity` number — Quantity<br>(新增/減少)贈品數量
  - `replace` boolean — Whether replacing the original quantity<br>是否取代原本數量<br>-<br> true: replace the quantity with the number you provided<br>取代原本數量<br><br> false: increase/decrease the quantity with the number you provided<br>增加/減少數量

## Response `200`

OK

- object
  - `id` Id — unresolved $ref
  - `sku` Sku — unresolved $ref
  - `quantity` Quantity — unresolved $ref
  - `updated_at` UpdatedAt — unresolved $ref

## Other responses

- `403` — Forbidden
- `404` — Not found error
- `422` — Unprocessable entity error
- `500` — Server error

---

[API](https://skmtc.net/shoplineapp/apis/shopline-open-api.md) · [All operations](https://skmtc.net/shoplineapp/apis/shopline-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/shoplineapp/shopline-open-api/revisions/1675ac12cde7/schema)
