get https://{subdomain}.myshoplaza.com/openapi/2022-01/discount_flashsales
Requires
price_rules
access scope. More access scope
The Discount Flashsale List API retrieves a list of flashsale discounts available for a shop. This enables users to manage and view flashsale discount details effectively.
This API is especially useful for:
- Viewing available flashsale discounts in the store.
- Managing flashsale campaigns for customers.
- Fetching detailed flashsale discount information.
Request Parameters
Public Request Parameters
Query Parameters
Name | Type | Description | Required/Optional | Example |
---|---|---|---|---|
limit | int | Limit count per page | Optional | 20 |
page | int | Page number | Optional | 1 |
need_detail_url | boolean | Whether to include detail URLs | Optional | true |
Response Explanation
Public Response Parameters
Success Response
Name | Type | Example | Description |
---|---|---|---|
page | int | 1 | Current page number |
limit | int | 20 | Number of items per page |
total | int | 1 | Total number of flashsale discounts |
data | array | - | Array of flashsale discount details |
data[].id | string | 1475f9fc-cb07-4778-8448-e1b4ab864639 | Unique ID of the flashsale |
data[].title | string | tzt-限时促销-增加客户下单 | Title of the flashsale |
data[].discount_type | string | percentage | Type of discount applied |
data[].once_per_customer | int | 0 | Whether the discount is limited to one use |
data[].starts_at | string | 1682651959 | Start time of the flashsale |
data[].ends_at | string | -1 | End time of the flashsale |
data[].status | int | 1 | Status of the flashsale |
data[].sort | string | {"by":"title","direction":"asc"} | Sorting configuration of the flashsale |
data[].allocation_method | string | none | Allocation method of the flashsale |
data[].allow_oversold | string | uncheck | Whether overselling is allowed |
data[].progress | string | ongoing | Current progress of the flashsale |
data[].product_num | int | 410 | Number of products included in the flashsale |
data[].detail_url | string | tzt.myshoplaza.com/promotions/flashsale/1475f9fc-cb07-4778-8448-e1b4ab864639 | URL for detailed flashsale information |
Error Response
Error responses in the API can be represented using two different fields: errors
and error
. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
Field | Type | Example | Description |
---|---|---|---|
errors | Array | [ "invalid line_item id"] | A list of errors encountered during the request processing. |
Field | Type | Example | Description |
---|---|---|---|
error | String | "store is not active" | Indicates an error encountered during the process |
Error Detail
Status Code | Message | Possible Reason | Example Response |
---|---|---|---|
400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized |