Requires read_discounts access scope.
For more info, refer to:
GET https://{handle}.myshopline.com/admin/openapi/v20260301/sales/discount/automatic
handle : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com , the store handle is open001 .
OPEN API query automatic offer
Query Parameters
  • ends_at string
    End time
    Example: 2022-11-11T11:33:00+08:00
  • page_num integer
    Page number
    Example: 1
  • page_size integer
    Paging size
    Example: 20
  • starts_at string
    Start time
    Example: 2022-10-11T11:33:00+08:00
  • value_type string
    Types of discount (fixed_amount-amount off, percentage-percent off, nth_items_discount_benefit-quantity discount)
    Example: percentage
Request Headers
  • Content-Type string required
    The field must be set to the fixed value application/json; charset=utf-8.
  • Authorization string required
    The access token for the API resource. Refer to App authorization to obtain the access token, and then pass the obtained token in the Bearer format.
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Status Codes
For the complete list of codes and messages, see Http status code.

Response Headers
  • traceId
    A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.
Response Body
  • automatic_discountobject[]
    automatic_discount
  • starts_at string
    starts_at
    Example: 2022-10-11T11:23:00+08:00
  • banner_pic_url string
    banner_pic_url
    Example: www.shopline.com/pc/1.png
  • banner_pic_url_mobile string
    banner_pic_url_mobile
    Example: www.shopline.com/mobile/1.png
  • ends_at string
    ends_at
    Example: 2022-11-11T11:23:00+08:00
  • value_type string
    value_type
    Example: percentage
  • customer_getsobject[]
    customer_gets
  • prerequisite_quantity_rangeobject
    prerequisite_quantity_range
  • greater_than long
    greater_than
  • greater_than_or_equal_to long
    greater_than_or_equal_to
    Example: 3
  • less_than long
    less_than
  • less_than_or_equal_to long
    less_than_or_equal_to
  • prerequisite_subtotal_rangeobject
    prerequisite_subtotal_range
  • greater_than long
    greater_than
  • greater_than_or_equal_to long
    greater_than_or_equal_to
    Example: 5
  • less_than long
    less_than
  • less_than_or_equal_to long
    less_than_or_equal_to
  • value long
    value
    Example: -2
  • seo array
    seo
    Example: ["the seo for search of the discount"]
  • title string
    title
    Example: This is title for discount
  • activity_desc string
    activity_desc
    Example: This is description of the discount
  • desc_url string
    desc_url
    Example: https://manong.myshopline.com/activity/this-is-title-of-auto-discount-free-shipping
  • page_infoobject
    Paging information
  • page_size integer
    Paging size
    Example: 10
  • total integer
    Total number
    Example: 100
  • page_num integer
    Page number
    Example: 1
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
Automatic discount activity based on time range query
Response
{
"automatic_discount": [
{
"title": "This is title of auto discount: percentage",
"customer_gets": [
{
"prerequisite_subtotal_range": {
"greater_than_or_equal_to": 10000
},
"value": -10
},
{
"prerequisite_subtotal_range": {
"greater_than_or_equal_to": 20000
},
"value": -20
}
],
"value_type": "percentage",
"desc_url": "",
"starts_at": "2023-07-11T16:40:00+08:00",
"activity_desc": "",
"banner_pic_url_mobile": "",
"seo": [
"percentage_automatic_discount_acitivity",
"percentage_automatic_discount"
],
"banner_pic_url": ""
},
{
"banner_pic_url": "",
"desc_url": "",
"title": "This is title of auto discount: fixed amount",
"banner_pic_url_mobile": "",
"starts_at": "2023-07-11T16:41:00+08:00",
"value_type": "fixed_amount",
"activity_desc": "",
"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"
]
},
{
"banner_pic_url_mobile": "",
"desc_url": "",
"seo": [
"this-is-title-of-auto-discount-free-shipping"
],
"activity_desc": "",
"customer_gets": [
{
"prerequisite_subtotal_range": {
"greater_than_or_equal_to": 10000
}
}
],
"value_type": "free_shipping_benefit",
"banner_pic_url": "",
"title": "This is title of auto discount: free shipping",
"starts_at": "2023-07-13T01:16:00+08:00"
}
],
"page_info": {
"total": 3,
"page_num": 1,
"page_size": 20
}
}
Was this article helpful to you?