需要 read_gift_card 权限点。
更多权限点使用信息,请参考:
GET https://{handle}.myshopline.com/admin/openapi/v20250601/gift_cards.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handleopen001
分页查询礼品卡
查询参数
  • fields string
    指定返回的参数,逗号分隔
    Example: note, initial_value
  • limit integer
    返回的最大结果数,默认50,最大不超过250
    Example: 50
  • page_info string
    调用方不需要使用和关注此字段,由Shopline自动封装
    Example: eyJzaW5jZUlkIjoiMzAxNTcwNDMzNTkyNDUzMzkyMzEzNjAyODIiLCJkaXJlY3Rpb24iOiJwcmV2Iiwic3RhdHVzIjoiZW5hYmxl
  • since_id string
    从指定的礼品卡ID开始查询
    Example: 30157043359245339231360282
  • status string
    礼品卡状态,enabled:启用中,disabled:未启用
    Example: enabled
请求头
  • Content-Type required
    字段值固定为application/json; charset=utf-8
  • Authorization string required
    资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
响应
更多状态码信息请参考 HTTP 状态码

响应头
  • link
    翻页信息
  • traceId
    traceId
响应体
  • gift_cardsobject[]
    礼品卡信息
  • api_client_id string
    调用方ID
    Example: 36d2bc4e97af056677b61c529d9e3a3f7396040d
  • balance string
    礼品卡余额
    Example: 200
  • created_at string
    礼品卡创建时间
    Example: 2023-08-16T23:59:59+08:00
  • currency string
    礼品卡面值对应币种
    Example: CNY
  • customer_id string
    当前礼品卡分配给的客户的客户ID
    Example: 4200113946
  • disabled_at string
    礼品卡禁用时间
    Example: 2023-08-16T23:59:59+08:00
  • expires_on string
    当前礼品卡的到期时间,null为永不过期
    Example: 2023-08-16T23:59:59+08:00
  • id string
    礼品卡ID
    Example: 30157043359245339231360282
  • initial_value string
    礼品卡初始金额
    Example: 200
  • last_characters string
    code的最后四位字符
    Example: d246
  • line_item_id string
    关联的订单物品
    Example: 18060183094426803997483534
  • note string
    当前礼品卡的备注信息
    Example: This is a note
  • order_id string
    关联的订单ID
    Example: 24060486231247568944830202
  • updated_at string
    礼品卡更新时间
    Example: 2023-08-16T23:59:59+08:00
  • user_id string
    用户在admin界面上创建礼品卡时的管理员账户ID
    Example: 4214250478
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601

ParamOptions

header required
query
query
query
query
query

Language

curl --request GET \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601/gift_cards.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
指定PageInfo
Response
{
"gift_cards": [
{
"note": "This is a 500 card"
},
{
"note": "This is a 400 card"
},
{
"note": "This is a 600 card"
},
{
"note": "This is a 1000 card"
},
{
"note": "This is a 1200 card"
}
]
}
这篇文章对你有帮助吗?

Error loading component.

Error loading component.