Skip to main content
Version: 202607

Get member discount codes

GET 

/openapi/2026-07/loyalty/members/:member_id/discount-codes

Return discount codes owned by a specific member

Request

Path Parameters

    member_id stringrequired

    Member ID from path

Query Parameters

    cursor string

    Pagination cursor

    limit int32

    Page size. Default 50, max 200

Responses

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    items object[]

    Discount code assets

  • Array [
  • discount_codestring

    Discount code string

    used_timesint64

    Used times. optional so 0 is always emitted

    available_timesint64

    Available times

    source_typestring

    Source type: points_redeem, birthday_reward, benefit_package, or member_active_reward

    source_idstring

    Source ID. Campaign ID when source_type is points_redeem

    discount_code_activity object

    Discount code activity payload

    namestring

    Campaign name

    discount_typestring

    Discount type: percentage / fixed_amount / free_shipping / bxgy

    discount_valuestring

    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_typestring

    Prerequisite condition type: none / subtotal / quantity

    prerequisite_valuestring

    Prerequisite condition value; amount string when subtotal, quantity when quantity

    max_free_shippingstring

    Max free-shipping amount (free-shipping only); -1 means unlimited. String preserves decimals

    applicable_rule object

    Applicable resource rule

    applicable_typestring

    Applicable type: all / include_products / include_collections

    applicable_product_idsstring[]

    Product IDs when applicable_type=include_products

    applicable_variant_idsstring[]

    Variant IDs when applicable_type=include_products

    applicable_collection_idsstring[]

    Collection IDs when applicable_type=include_collections

    obtain_products object

    Obtain products rule (BXGY only)

    applicable_rule object

    Applicable rule for obtainable products

    applicable_typestring

    Applicable type: all / include_products / include_collections

    applicable_product_idsstring[]

    Product IDs when applicable_type=include_products

    applicable_variant_idsstring[]

    Variant IDs when applicable_type=include_products

    applicable_collection_idsstring[]

    Collection IDs when applicable_type=include_collections

    product_countuint32

    Obtain product count

    obtain_typestring

    Obtain discount type: free / percentage / fixed_amount

    obtain_valuestring

    Obtain discount value; decimal string

    use_with_otherboolean

    Allow stacking with other discounts

    limit_user_discountint32

    Per-member campaign usage cap; -1 means unlimited

    limit_code_user_discountint32

    Per-member per-code usage cap; -1 means unlimited

    limit_order_discountint32

    Per-order usage cap; -1 means unlimited

    limit_code_max_discountint32

    Per-code total usage cap; -1 means unlimited

    started_atstring

    Campaign start time; ISO 8601 UTC

    ended_atstring

    Campaign end time; ISO 8601 UTC. Empty string means open-ended

  • ]
  • next_cursorstring

    Next-page cursor

    has_moreboolean

    Whether more pages exist

    limitint32

    Returned page size