需要 read_subscription_contracts 权限点。
更多权限点使用信息,请参考:
POST https://{handle}.myshopline.com/admin/openapi/v20250601/subscription/contract.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handleopen001
查询订阅合同列表
请求头
  • Content-Type required
    字段值固定为application/json; charset=utf-8
  • Authorization string required
    资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
请求体
  • after string
    某个cursor之后,值可以是 orderId, contractId等,根据具体的API表示具体的业务数据id,before 和 after 只允许其一有值
  • before string
    某个之前,值可以是 orderId, contractId等,根据具体的API表示具体的业务数据id,before 和 after 只允许其一有值
  • created_at_max string
    订阅合同生成时间(结束)(格式见IOS8601)
  • created_at_min string
    订阅合同生成时间(开始)(格式见IOS8601)
  • first integer
    返回前N个元素,最大支持50, 与last必须并且只有一个不能为空
  • ids array
    合同id列表
    Example: ``
  • last integer
    返回最后N个元素,最大支持50, 与first必须并且只有一个不能为空
  • next_billing_date_at_max string
    订阅下一次账单生成时间(结束)(格式见IOS8601)
  • next_billing_date_at_min string
    订阅下一次账单生成时间(开始)(格式见IOS8601)
  • reverse boolean
    排序反转
  • status array
    订阅合同状态( ACTIVE, FAILED, CANCELLED, EXPIRED)
    Example: ``
  • updated_at_max string
    订阅合同更新时间(结束)(格式见IOS8601)
  • updated_at_min string
    订阅合同更新时间(开始)(格式见IOS8601)
  • user_ids array
    用户id列表,最多50个
    Example: ``
响应
更多状态码信息请参考 HTTP 状态码

响应头
  • traceId
    traceId
响应体
  • page_infoobject
    分页信息
  • end_cursor string
    1
  • has_next_page boolean
    1
  • has_previous_page boolean
    1
  • start_cursor string
    1
  • subscription_contractsobject[]
    订阅合同信息列表
  • appobject
    订阅插件信息
  • app_key string
    app插件的key
  • billing_policyobject
    订阅协议计费策略
  • interval string
    间隔单位, (DAY,MONTH,WEEK,YEAR)
  • interval_count integer
    间隔值
  • max_cycles integer
    最大的订阅周期
  • min_cycles integer
    最小的订阅周期
  • created_at string
    创建时间
  • currency_code string
    币种
  • customerobject
    用户信息
  • email string
    用户邮箱
  • id string
    用户id
  • nick_name string
    用户名称
  • phone string
    用户电话
  • shipping_addressobject
    收货地址
  • address1 string
    收货人详细地址
  • address2 string
    收货人详细地址附加
  • city string
    收货人市
  • city_code string
    收货人市code
  • company string
    公司名称
  • country string
    国家或者地区
  • country_code string
    国家或地区,请参考国家代码规范传参,https://aurogon-portal.yy.com/document/interface/478
  • district string
    收货人区
  • district_code string
    收货人区code
  • first_name string
    收货人名
  • last_name string
    收货人姓
  • phone string
    收货人联系方式
  • province string
    收货人省份
  • province_code string
    收货人省份code
  • zip string
    邮编
  • customer_payment_methodobject
    付款方式
  • channel_code string
    支付渠道编码
  • instrument_detailobject
    支付工具详情
  • cardobject
    卡信息
  • brand string
    卡品牌
  • brand_icon string
    卡图标
  • expire_month string
    有效期:月
  • expire_year string
    有效期:年
  • first string
    卡号前置展示位
  • holder string
    持卡人姓名
  • last string
    卡号后置展示位
  • type string
    类型 card / account. card: 卡基;account: 账基
  • instrument_seq string
    支付工具ID
  • method_code string
    支付方式编码
  • store_payment_id string
    支付方式ID
  • delivery_infoobject
    运送信息
  • delivery_name string
    方案名称
  • delivery_seq string
    运费方案的seq
  • id string
    合同id
  • last_payment_status string
    上一次付款状态
  • line_itemsobject[]
    合同关联的商品
  • amount string
    商品的金额(两位精度的字符串,如"88.10")
  • amount_setobject
    商品的金额
  • presentment_moneyobject
    买家侧金额
  • amount string
    金额
  • currency_code string
    货币
  • shop_moneyobject
    卖家侧金额
  • amount string
    金额
  • currency_code string
    货币
  • attributesobject[]
    商品属性
  • key string
    属性key或者name
  • value string
    属性值
  • group_id string
    商品组id
  • image_url string
    商品主图
  • pricing_policyobject[]
    订阅周期折扣
  • cycle_discountsobject[]
    订阅行的每个周期的调整
  • adjustment_type string
    优惠类型, FIXED_AMOUNT: 减额,PERCENTAGE: 折扣(减去百分比)
  • adjustment_value long
    优惠值 扣减金额(分)或万分比
  • product_source string
    商品来源 main_site主站商品、customize自定义商品
  • quantity integer
    商品数量
  • sku string
    商品码
  • title string
    商品标题
  • variant_attribute string
    商品属性
  • variant_id string
    商品sku序列号
  • version string
    商品版本
  • next_billing_date string
    下一个账单日期
  • origin_orderobject
    原始订单信息
  • id string
    订单号
  • periods integer
    当前合同已执行的期数
  • status string
    订阅合同状态( ACTIVE, FAILED, CANCELLED, EXPIRED)
  • updated_at string
    更新时间
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601

ParamOptions

header required

Body

required
{
  "after": "",
  "before": "",
  "created_at_max": "",
  "created_at_min": "",
  "first": 0,
  "ids": [
    ""
  ],
  "last": 0,
  "next_billing_date_at_max": "",
  "next_billing_date_at_min": "",
  "reverse": false,
  "status": [
    ""
  ],
  "updated_at_max": "",
  "updated_at_min": "",
  "user_ids": [
    ""
  ]
}

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601/subscription/contract.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
这篇文章对你有帮助吗?