Skip to main content
Version: 202601

Redeem discount code

POST 

/openapi/2026-01/loyalty/members/:member_id/redemption-campaigns/:campaign_id/redeem

Use points to redeem a discount code from a campaign

Request

Path Parameters

    member_id stringrequired

    Member ID from path; must equal the storefront token member_id

    campaign_id stringrequired

    Redemption campaign ID from path

Bodyrequired

    idempotency_keystring

    Idempotency key. Same key within one hour replays the first response

Responses

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    member_idstring

    Member ID

    deducted_pointsint64

    Points deducted in this redemption

    transaction_idstring

    Points transaction ID

    discount_codestring

    Generated discount code

    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

    redeemed_atstring

    Redeemed at, ISO-8601