**版本：202201**

# 查询礼品卡列表

**GET** `/openapi/2022-01/gift_cards`

分页返回符合过滤条件的礼品卡列表。

## 请求

**Query参数**

- `status` string

  礼品卡状态。

  *   enable: 启用，礼品卡可正常使用。
  *   disable: 禁用，礼品卡不可用。
- `created_at_min` string

  筛选在该时间及之后创建的礼品卡（如 2018-11-02T12:30:10Z）。
- `created_at_max` string

  筛选在该时间及之前创建的礼品卡（如 2018-11-02T12:30:10Z）。
- `updated_at_min` string

  筛选在该时间及之后最后更新的礼品卡（如 2018-11-02T12:30:10Z）。
- `updated_at_max` string

  筛选在该时间及之前最后更新的礼品卡（如 2018-11-02T12:30:10Z）。
- `initial_value_min` string

  筛选初始面值大于或等于该金额的礼品卡。
- `initial_value_max` string

  筛选初始面值小于或等于该金额的礼品卡。
- `page` string

  Page number
- `limit` string

  Limit per page
- `ids` string

  用于筛选的礼品卡 ID 列表。

## 响应

**200**

200

**application/json**

**数据结构 | 示例 | Result**

**数据结构**

- `gift_cards` object[]

  *   Array [

  - `id` string

    **示例：** `377026890382183978`
  - `last_characters` string

    **示例：** `218p`
  - `balance` string

    **示例：** `100.00`
  - `initial_value` string

    **示例：** `100.00`
  - `note` string

    **示例：** `note`
  - `expires_on`
  - `disabled_at`
  - `enabled` boolean

    **默认值：** `true`

    **示例：** `true`
  - `created_at` string

    **示例：** `2024-05-06T10:12:05Z`
  - `updated_at` string

    **示例：** `2024-05-06T10:12:05Z`
  - `status` string

    **示例：** `enable`
  - `currency` string

    **示例：** `USD`
  - `line_item_id`
  - `order_id`
  - `user_id` string

    **示例：** `cba51e16-ac53-43d8-a7a3-161c5b1ecd8e`
  - `template_suffix`
  - `customer_id` string

    **示例：** `2dd957e3-2051-4cdf-8584-9c0046b4d1ae`
  *   ]
- `total` string

  **示例：**

```json
{
  "gift_cards": [
    {
      "id": "377026890382183978",
      "last_characters": "218p",
      "balance": "100.00",
      "initial_value": "100.00",
      "note": "note",
      "expires_on": {},
      "disabled_at": {},
      "enabled": true,
      "created_at": "2024-05-06T10:12:05Z",
      "updated_at": "2024-05-06T10:12:05Z",
      "status": "enable",
      "currency": "USD",
      "line_item_id": {},
      "order_id": {},
      "user_id": "cba51e16-ac53-43d8-a7a3-161c5b1ecd8e",
      "template_suffix": {},
      "customer_id": "2dd957e3-2051-4cdf-8584-9c0046b4d1ae"
    }
  ],
  "total": ""
}
```

```json
{
  "gift_cards": [
    {
      "id": "377026890382183978",
      "last_characters": "218p",
      "balance": "100.00",
      "initial_value": "100.00",
      "note": "note",
      "expires_on": null,
      "disabled_at": null,
      "enabled": true,
      "created_at": "2024-05-06T10:12:05Z",
      "updated_at": "2024-05-06T10:12:05Z",
      "status": "enable",
      "currency": "USD",
      "line_item_id": null,
      "order_id": null,
      "user_id": "cba51e16-ac53-43d8-a7a3-161c5b1ecd8e",
      "template_suffix": null,
      "customer_id": "2dd957e3-2051-4cdf-8584-9c0046b4d1ae"
    },
    {
      "id": "377006280092433706",
      "last_characters": "ghjg",
      "balance": "100.00",
      "initial_value": "100.00",
      "note": "note",
      "expires_on": "2025-11-01T00:00:00Z",
      "disabled_at": null,
      "enabled": true,
      "created_at": "2024-05-06T10:06:04Z",
      "updated_at": "2024-05-06T10:06:04Z",
      "status": "enable",
      "currency": "USD",
      "line_item_id": null,
      "order_id": null,
      "user_id": null,
      "template_suffix": null,
      "customer_id": "8b91ccbd-37d0-4897-aac6-5082e64ca374"
    }
  ],
  "total": ""
}
```
