Search Gifts
Breaking ChangesJul. 30, 2025 拿取商品相關資訊 API 異動公告 Products related API Breaking Change
Function
To search gifts with specific conditions.
利用特殊條件搜尋贈品列表。
URL
GET <<api_domain>>/v1/gifts/search
Request Parameters
NotePlease note the following pagination limitations when using this API:
- The request will fail if
page*per_pageexceeds 10,000.- Example: If
per_page= 50, the maximum value forpageshould be 200. Exceeding this value will result in an error.使用此 API 時,請注意以下分頁限制:
- 當
page*per_page大於 10,000 時,請求將會失敗。- 範例:如果
per_page= 50,page最大值應為 200,超過此值請求將會失敗。
Response Fields
Field | Column Type | Description | Example |
|---|---|---|---|
items | Array of Gifts | Please check the link on the left | |
pagination | Pagination Data | Please check the link on the left |
Response Example
{
"items": [
{
"id": "60d5b37b52fb76002665d821",
"status": "active",
"title_translations": {
"en": "Sample Gift 0001"
},
"sku": "GIFT-SKU-0001",
"quantity": 0,
"cost": {
"cents": 12,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$12",
"dollars": 12.0
},
"weight": 12.1,
"medias": [],
"updated_at": "2021-06-25T10:44:11.072+00:00",
"created_at": "2021-06-25T10:44:11.072+00:00",
"unlimited_quantity": true,
},
{
"id": "60d5b34923df7b002cd70f67",
"status": "active",
"title_translations": {
"en": "Sample Gift 0001"
},
"sku": "GIFT-SKU-0001",
"quantity": 0,
"cost": {
"cents": 12,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$12",
"dollars": 12.0
},
"weight": 12.1,
"medias": [],
"updated_at": "2021-06-25T10:43:21.971+00:00",
"created_at": "2021-06-25T10:43:21.971+00:00",
"unlimited_quantity": false,
},
{
"id": "60d5b3409e545a003e4b8c69",
"status": "active",
"title_translations": {
"en": "Sample Gift 0001"
},
"sku": "GIFT-SKU-0001",
"quantity": 0,
"cost": {
"cents": 12,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$12",
"dollars": 12.0
},
"weight": 12.1,
"medias": [],
"updated_at": "2021-06-25T10:43:12.145+00:00",
"created_at": "2021-06-25T10:43:12.145+00:00",
"unlimited_quantity": false,
},
{
"id": "60d5b2b0ca4c5b00176ba405",
"status": "active",
"title_translations": {
"en": "create by open api"
},
"sku": "GIFT-SKU-0001",
"quantity": 0,
"cost": {
"cents": 12,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$12",
"dollars": 12.0
},
"weight": 12.1,
"medias": [],
"updated_at": "2021-06-25T10:40:48.970+00:00",
"created_at": "2021-06-25T10:40:48.970+00:00",
"unlimited_quantity": true,
}
],
"pagination": {
"current_page": 1,
"per_page": 10,
"total_pages": 1,
"total_count": 4
}
}Sample Request
Search Gift with specific SKU
curl --location --request GET '<<api_domain>>/v1/gifts/search?page=1&per_page=10&sku=GIFT-SKU-0001' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ${token}'Search with status , SKU , updated_at
curl --location --request GET '<<api_domain>>/v1/gifts/search?page=1&per_page=10&status=active&sku=GIFT-SKU-0001&updated_at=gt:2018-12-05' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ${token}'Updated 13 days ago