版本:202506
查询所有折扣码列表
GET/openapi/2025-06/discount_codes
返回所有折扣码的列表。
请求
Query参数
cursor string
分页游标
page_size int32
返回对象数量限制,范围 1-250,默认 10
need_detail_url boolean
若为 true,则在响应中返回详情 URL
响应
- 200
OK
- application/json
- 数据结构
- 示例
数据结构
- Array [
- Array [
- ]
- Array [
- ]
- Array [
- ]
- ]
codestring
错误码
messagestring
错误信息
data object
discount_code object[]
折扣码
idstring
折扣 ID
allocation_methodstring
分配方式
allocation_limitint32
分配上限
allocation_limit_amountfloat
分配上限金额
app_idstring
应用 ID
codestring
折扣码
customer_selectionstring
顾客筛选条件
discount_typestring
折扣类型
ends_atstring
结束时间
entitled_area_list object[]
授权地区列表
country_codestring
国家代码(如 CN)
province_codesstring[]
省份代码列表
entitled_collection_idsstring[]
授权集合 ID 列表
entitled_filter_idsstring[]
授权过滤 ID 列表
entitled_filter_liststring[]
授权过滤列表
entitled_product_idsstring[]
授权商品 ID 列表
entitled_variant_idsstring[]
授权规格 ID 列表
variant_product_idsstring[]
规格所属商品 ID 列表
is_admin_showstring
是否在管理后台显示
once_per_customerint32
是否每位顾客只能使用一次
prerequisiteint32
前提条件
prerequisite_customer_idsstring[]
前提条件顾客 ID 列表
prerequisite_customer_rangestring
顾客前提条件范围
prerequisite_customer_segment_idsstring[]
顾客分组前提条件 ID 列表
prerequisite_quantity_range object[]
数量前提条件范围
greater_than_or_equal_tostring
大于或等于的值
valuestring
值
value_percentagestring
百分比值
value_event_typestring
值事件类型
value_conditionstring
值条件
target_typestring
目标类型
target_datastring[]
目标数据
prerequisite_subtotal_range object[]
小计前提条件范围
greater_than_or_equal_tostring
大于或等于的值
valuestring
值
value_percentagestring
百分比值
value_event_typestring
值事件类型
value_conditionstring
值条件
target_typestring
目标类型
target_datastring[]
目标数据
prerequisite_threshold_quantity_rangestring
阈值数量范围
prerequisite_threshold_subtotal_rangestring
阈值小计范围
product_numint32
商品数量
progressstring
进度
propertiesstring
属性信息
sortstring
排序配置
starts_atstring
开始时间
statusstring
状态
target_price_typestring
目标价格类型
target_selectionstring
目标选择
target_typestring
目标类型
times_usedint32
已使用次数
titlestring
标题
usage_limitint32
使用次数上限,-1 表示无限制
use_with_otherint32
是否可与其他折扣叠加
using_statestring
使用状态
valuefloat
值
value_typestring
值类型
detail_urlstring
详情页 URL
cursorstring
下一页游标
has_moreboolean
是否有更多数据
{
"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
}
}