需要 read_discounts 权限点。
更多权限点使用信息,请参考:
GET https://{handle}.myshopline.com/admin/openapi/v20260301/sales/discount/automatic
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handleopen001
open api 查询自动优惠活动
查询参数
  • ends_at string
    结束时间
    例子: 2022-11-11T11:33:00+08:00
  • page_num integer
    页码
    例子: 1
  • page_size integer
    分页大小
    例子: 20
  • starts_at string
    开始时间
    例子: 2022-10-11T11:33:00+08:00
  • value_type string
    优惠类型(fixed_amount-满减,percentage-满折,nth_items_discount_benefit-第n件折扣)
    例子: percentage
请求头
  • Content-Type string required
    字段值固定为 application/json; charset=utf-8
  • Authorization string required
    资源的访问令牌。参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入。
    例子:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
状态码
更多状态码信息,参考 HTTP 状态码

响应头
  • traceId
    请求的全局唯一标识符。用于追踪请求在系统中的流转,以便于问题发生时进行定位和调试。
响应体
  • automatic_discountobject[]
    自动优惠
  • banner_pic_url string
    banner图链接-PC端
    例子: www.shopline.com/pc/1.png
  • banner_pic_url_mobile string
    banner图链接-移动端
    例子: www.shopline.com/mobile/1.png
  • desc_url string
    活动落地页链接
    例子: https://manong.myshopline.com/activity/this-is-title-of-auto-discount-free-shipping
  • seo array
    seo
    例子: ["the seo for search of the discount"]
  • starts_at string
    开始时间
    例子: 2022-10-11T11:23:00+08:00
  • customer_getsobject[]
    优惠内容
  • value long
    优惠值
    例子: -2
  • prerequisite_quantity_rangeobject
    数量条件
  • less_than long
    小于
  • less_than_or_equal_to long
    小于等于
  • greater_than long
    大于
  • greater_than_or_equal_to long
    大于等于
    例子: 3
  • prerequisite_subtotal_rangeobject
    价格条件
  • less_than_or_equal_to long
    小于等于
  • greater_than long
    大于
  • greater_than_or_equal_to long
    大于等于
    例子: 5
  • less_than long
    小于
  • title string
    标题
    例子: This is title for discount
  • value_type string
    优惠类型
    例子: percentage
  • ends_at string
    结束时间
    例子: 2022-11-11T11:23:00+08:00
  • activity_desc string
    活动描述
    例子: This is description of the discount
  • page_infoobject
    分页信息
  • page_num integer
    页码
    例子: 1
  • page_size integer
    分页大小
    例子: 10
  • total integer
    总数
    例子: 100
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

header required
query
query
query
query
query

Language

curl --request GET \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/sales/discount/automatic \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
根据时间范围查询自动折扣活动
Response
{
"automatic_discount": [
{
"customer_gets": [
{
"prerequisite_subtotal_range": {
"greater_than_or_equal_to": 10000
},
"value": -10
},
{
"prerequisite_subtotal_range": {
"greater_than_or_equal_to": 20000
},
"value": -20
}
],
"title": "This is title of auto discount: percentage",
"value_type": "percentage",
"banner_pic_url": "",
"starts_at": "2023-07-11T16:40:00+08:00",
"activity_desc": "",
"seo": [
"percentage_automatic_discount_acitivity",
"percentage_automatic_discount"
],
"banner_pic_url_mobile": "",
"desc_url": ""
},
{
"banner_pic_url_mobile": "",
"desc_url": "",
"customer_gets": [
{
"value": -1000,
"prerequisite_quantity_range": {
"greater_than_or_equal_to": 2
}
}
],
"seo": [
"category-fixed-amount-auto-discount-title",
"category-fixed-amount-auto-discount"
],
"title": "This is title of auto discount: fixed amount",
"starts_at": "2023-07-11T16:41:00+08:00",
"banner_pic_url": "",
"value_type": "fixed_amount",
"activity_desc": ""
},
{
"customer_gets": [
{
"prerequisite_subtotal_range": {
"greater_than_or_equal_to": 10000
}
}
],
"desc_url": "",
"banner_pic_url": "",
"title": "This is title of auto discount: free shipping",
"value_type": "free_shipping_benefit",
"activity_desc": "",
"seo": [
"this-is-title-of-auto-discount-free-shipping"
],
"starts_at": "2023-07-13T01:16:00+08:00",
"banner_pic_url_mobile": ""
}
],
"page_info": {
"page_num": 1,
"page_size": 20,
"total": 3
}
}
这篇文章对你有帮助吗?