Get member discount codes
GET/openapi/2026-01/loyalty/members/:member_id/discount-codes
Return discount codes owned by a specific member
Request
Path Parameters
Member ID from path
Query Parameters
Pagination cursor
Page size. Default 50, max 200
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
- Array [
- ]
error code
error message
data object
items object[]
Discount code assets
Discount code string
Used times. optional so 0 is always emitted
Available times
Source type: points_redeem, birthday_reward, benefit_package, or member_active_reward
Source ID. Campaign ID when source_type is points_redeem
discount_code_activity object
Discount code activity payload
Campaign name
Discount type: percentage / fixed_amount / free_shipping / bxgy
Discount value; percentage carries a numeric string (e.g. "10"); fixed_amount carries an amount string (e.g. "10.00"); free_shipping / bxgy leave it empty
Prerequisite condition type: none / subtotal / quantity
Prerequisite condition value; amount string when subtotal, quantity when quantity
Max free-shipping amount (free-shipping only); -1 means unlimited. String preserves decimals
applicable_rule object
Applicable resource rule
Applicable type: all / include_products / include_collections
Product IDs when applicable_type=include_products
Variant IDs when applicable_type=include_products
Collection IDs when applicable_type=include_collections
obtain_products object
Obtain products rule (BXGY only)
applicable_rule object
Applicable rule for obtainable products
Applicable type: all / include_products / include_collections
Product IDs when applicable_type=include_products
Variant IDs when applicable_type=include_products
Collection IDs when applicable_type=include_collections
Obtain product count
Obtain discount type: free / percentage / fixed_amount
Obtain discount value; decimal string
Allow stacking with other discounts
Per-member campaign usage cap; -1 means unlimited
Per-member per-code usage cap; -1 means unlimited
Per-order usage cap; -1 means unlimited
Per-code total usage cap; -1 means unlimited
Campaign start time; ISO 8601 UTC
Campaign end time; ISO 8601 UTC. Empty string means open-ended
Next-page cursor
Whether more pages exist
Returned page size
{
"code": "string",
"message": "string",
"data": {
"items": [
{
"discount_code": "string",
"used_times": 0,
"available_times": 0,
"source_type": "string",
"source_id": "string",
"discount_code_activity": {
"name": "string",
"discount_type": "string",
"discount_value": "string",
"prerequisite_type": "string",
"prerequisite_value": "string",
"max_free_shipping": "string",
"applicable_rule": {
"applicable_type": "string",
"applicable_product_ids": [
"string"
],
"applicable_variant_ids": [
"string"
],
"applicable_collection_ids": [
"string"
]
},
"obtain_products": {
"applicable_rule": {
"applicable_type": "string",
"applicable_product_ids": [
"string"
],
"applicable_variant_ids": [
"string"
],
"applicable_collection_ids": [
"string"
]
},
"product_count": 0,
"obtain_type": "string",
"obtain_value": "string"
},
"use_with_other": true,
"limit_user_discount": 0,
"limit_code_user_discount": 0,
"limit_order_discount": 0,
"limit_code_max_discount": 0,
"started_at": "string",
"ended_at": "string"
}
}
],
"next_cursor": "string",
"has_more": true,
"limit": 0
}
}