List all discount codes
GET/openapi/2025-06/discount_codes
Retrieves a list of all discount codes.
Request
Query Parameters
Cursor for pagination
A limit on the number of objects to be returned. Ranges from 1 to 250. Default is 10
If true, returns detail URLs in the response
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
- Array [
- Array [
- ]
- Array [
- ]
- Array [
- ]
- ]
error code
error message
data object
discount_code object[]
Discount code
Discount ID
Allocation method
Allocation limit
Allocation limit amount
App ID
Discount code
Customer selection criteria
Discount type
End timestamp
entitled_area_list object[]
List of entitled areas
Country code (e.g., CN)
List of province codes
Entitled collection IDs
Entitled filter IDs
List of entitled filters
Entitled product IDs
Entitled variant IDs
Product IDs of variants
Whether visible in admin
Whether usable once per customer
Prerequisite condition
List of prerequisite customer IDs
Customer prerequisite range
Customer segment prerequisite IDs
prerequisite_quantity_range object[]
Quantity prerequisite range
Greater than or equal to value
The value
Percentage value
Value event type
Value condition
Target type
Target data
prerequisite_subtotal_range object[]
Subtotal prerequisite range
Greater than or equal to value
The value
Percentage value
Value event type
Value condition
Target type
Target data
Threshold quantity range
Threshold subtotal range
Number of products
Progress
Properties
Sort configuration
Start timestamp
Status
Target price type
Target selection
Target type
Number of times used
Title
Usage limit. -1 means unlimited
Whether discount can be used with others
Using state
The value
Value type
Detail page URL
The cursor for the next page of results
Whether there are more results
{
"code": "string",
"message": "string",
"data": {
"discount_code": [
{
"id": "string",
"allocation_method": "string",
"allocation_limit": 0,
"allocation_limit_amount": 0,
"app_id": "string",
"code": "string",
"customer_selection": "string",
"discount_type": "string",
"ends_at": "string",
"entitled_area_list": [
{
"country_code": "string",
"province_codes": [
"string"
]
}
],
"entitled_collection_ids": [
"string"
],
"entitled_filter_ids": [
"string"
],
"entitled_filter_list": [
"string"
],
"entitled_product_ids": [
"string"
],
"entitled_variant_ids": [
"string"
],
"variant_product_ids": [
"string"
],
"is_admin_show": "string",
"once_per_customer": 0,
"prerequisite": 0,
"prerequisite_customer_ids": [
"string"
],
"prerequisite_customer_range": "string",
"prerequisite_customer_segment_ids": [
"string"
],
"prerequisite_quantity_range": [
{
"greater_than_or_equal_to": "string",
"value": "string",
"value_percentage": "string",
"value_event_type": "string",
"value_condition": "string",
"target_type": "string",
"target_data": [
"string"
]
}
],
"prerequisite_subtotal_range": [
{
"greater_than_or_equal_to": "string",
"value": "string",
"value_percentage": "string",
"value_event_type": "string",
"value_condition": "string",
"target_type": "string",
"target_data": [
"string"
]
}
],
"prerequisite_threshold_quantity_range": "string",
"prerequisite_threshold_subtotal_range": "string",
"product_num": 0,
"progress": "string",
"properties": "string",
"sort": "string",
"starts_at": "string",
"status": "string",
"target_price_type": "string",
"target_selection": "string",
"target_type": "string",
"times_used": 0,
"title": "string",
"usage_limit": 0,
"use_with_other": 0,
"using_state": "string",
"value": 0,
"value_type": "string",
"detail_url": "string"
}
],
"cursor": "string",
"has_more": true
}
}