Skip to main content
Version: 202506

List all discount codes

GET 

/openapi/2025-06/discount_codes

Retrieves a list of all discount codes.

Request

Query Parameters

    cursor string

    Cursor for pagination

    page_size int32

    A limit on the number of objects to be returned. Ranges from 1 to 250. Default is 10

    need_detail_url boolean

    If true, returns detail URLs in the response

Responses

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    discount_code object[]

    Discount code

  • Array [
  • idstring

    Discount ID

    allocation_methodstring

    Allocation method

    allocation_limitint32

    Allocation limit

    allocation_limit_amountfloat

    Allocation limit amount

    app_idstring

    App ID

    codestring

    Discount code

    customer_selectionstring

    Customer selection criteria

    discount_typestring

    Discount type

    ends_atstring

    End timestamp

    entitled_area_list object[]

    List of entitled areas

  • Array [
  • country_codestring

    Country code (e.g., CN)

    province_codesstring[]

    List of province codes

  • ]
  • entitled_collection_idsstring[]

    Entitled collection IDs

    entitled_filter_idsstring[]

    Entitled filter IDs

    entitled_filter_liststring[]

    List of entitled filters

    entitled_product_idsstring[]

    Entitled product IDs

    entitled_variant_idsstring[]

    Entitled variant IDs

    variant_product_idsstring[]

    Product IDs of variants

    is_admin_showstring

    Whether visible in admin

    once_per_customerint32

    Whether usable once per customer

    prerequisiteint32

    Prerequisite condition

    prerequisite_customer_idsstring[]

    List of prerequisite customer IDs

    prerequisite_customer_rangestring

    Customer prerequisite range

    prerequisite_customer_segment_idsstring[]

    Customer segment prerequisite IDs

    prerequisite_quantity_range object[]

    Quantity prerequisite range

  • Array [
  • greater_than_or_equal_tostring

    Greater than or equal to value

    valuestring

    The value

    value_percentagestring

    Percentage value

    value_event_typestring

    Value event type

    value_conditionstring

    Value condition

    target_typestring

    Target type

    target_datastring[]

    Target data

  • ]
  • prerequisite_subtotal_range object[]

    Subtotal prerequisite range

  • Array [
  • greater_than_or_equal_tostring

    Greater than or equal to value

    valuestring

    The value

    value_percentagestring

    Percentage value

    value_event_typestring

    Value event type

    value_conditionstring

    Value condition

    target_typestring

    Target type

    target_datastring[]

    Target data

  • ]
  • prerequisite_threshold_quantity_rangestring

    Threshold quantity range

    prerequisite_threshold_subtotal_rangestring

    Threshold subtotal range

    product_numint32

    Number of products

    progressstring

    Progress

    propertiesstring

    Properties

    sortstring

    Sort configuration

    starts_atstring

    Start timestamp

    statusstring

    Status

    target_price_typestring

    Target price type

    target_selectionstring

    Target selection

    target_typestring

    Target type

    times_usedint32

    Number of times used

    titlestring

    Title

    usage_limitint32

    Usage limit. -1 means unlimited

    use_with_otherint32

    Whether discount can be used with others

    using_statestring

    Using state

    valuefloat

    The value

    value_typestring

    Value type

    detail_urlstring

    Detail page URL

  • ]
  • cursorstring

    The cursor for the next page of results

    has_moreboolean

    Whether there are more results