需要 write_gift_card 权限点。
更多权限点使用信息,请参考:
POST https://{handle}.myshopline.com/admin/openapi/v20250601/gift_cards/:gift_card_id/disable.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handleopen001
禁用礼品卡
路径参数
  • gift_card_id string required
    礼品卡ID
    Example: 30157043359245339231360282
请求头
  • Content-Type required
    字段值固定为application/json; charset=utf-8
  • Authorization string required
    资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
响应
更多状态码信息请参考 HTTP 状态码

响应头
  • traceId
    traceId
响应体
  • gift_cardobject
    礼品卡信息
  • 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

path required
header required

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601/gift_cards/gift_card_id/disable.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
禁用
Response
{
"gift_card": {
"balance": "10.00",
"created_at": "2023-06-12T15:20:04+08:00",
"currency": "USD",
"customer_id": "2220108415",
"disabled_at": "2023-08-28T18:57:35+08:00",
"id": "30159764855042704752573144",
"initial_value": "10.00",
"last_characters": "8885",
"updated_at": "2023-08-28T18:57:35+08:00",
"user_id": "2000037074"
}
}
这篇文章对你有帮助吗?