Coupon List

🔒

Requires price_rules access scope. More access scope

The Coupon List API retrieves a paginated list of coupons available in the system.

This API is especially useful for:

  1. Listing all coupons based on progress or type filters.
  2. Searching for specific coupons by keywords.
  3. Paginating through large sets of coupons efficiently.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Query Parameters

ParameterTypeExampleDescription
pageint321Page number for paginated results.
limitint3210Number of coupons per page.
progressstringongoingFilter by progress of coupons. Available values: not_started, ongoing, finished.
typestringpercentageFilter by type of coupons. Available values: fixed_amount, percentage.
keywordsstringcoupon1Search for coupons by title.

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

📘

Coupon Properties Relation

FieldTypeDescriptionExample
pageintegerCurrent page number.0
limitintegerNumber of records per page.10
totalintegerTotal number of records.2
dataarrayList of discount data.[...]
data.idstringUnique identifier for the discount."202314454241654711"
data.store_idintegerStore ID where the discount is applicable.11218
data.life_cycle_typestringLifecycle type of the discount. Can be begin_end or survival."begin_end"
data.survival_timeintegerValid time (in seconds). Relevant for life_cycle_type=survival.86400
data.starts_atintegerDiscount start time in UNIX timestamp.1673246985
data.ends_atintegerDiscount end time in UNIX timestamp, -1 for no end date.-1
data.statusintegerStatus of the discount (internal field, to be deprecated).0
data.discount_typeDiscountTypeType of discount."percentage"
data.value_typestringType of discount value."percentage"
data.valuestringRule discount value. For thresholds, this is 0."10"
data.usage_limitintegerMaximum usage limit for the discount. -1 for unlimited.-1
data.once_per_customerintegerMaximum number of times the discount can be used by a single customer.0
data.titlestringTitle or name of the discount."coupon1"
data.stockintegerRemaining stock or availability of the discount.0
data.codestringDiscount code, if applicable.""
data.prerequisiteintegerIndicates whether the discount has prerequisites (1 for yes, 0 for no).0
data.is_admin_showintegerIndicates if the discount is visible in admin (1 for yes, 0 for no).0
data.target_selectionstringTarget range (e.g., all for all products)."all"
data.progressstringCoupon status (use this field instead of status).Activity status: ongoing in progress, not_started not started, finished ended,"ongoing"
data.using_statestring## Deprecated:## Internal field for coupon status. Use progress instead.""
data.allocation_limit_amountstringMaximum allocation limit amount for the discount."0"
data.entitled_area_listarrayList of areas entitled for the discount.[]
data.prerequisite_quantity_rangearray of objectQuantity range prerequisites for the discount.[{"greater_than_or_equal_to": ""}]
data.prerequisite_subtotal_rangearray of objectSubtotal range prerequisites for the discount.[{"greater_than_or_equal_to": ""}]
data.entitled_product_idsarrayList of product IDs entitled for the discount.[]
data.entitled_variant_idsarrayList of variant IDs entitled for the discount.[]
data.entitled_sortarraySorting order for entitled products.[]
data.times_usedintegerNumber of times the discount has been used.1
data.sortobjectSorting configuration for the discount.{"by": "sales", "direction": "desc"}
data.use_with_otherintegerIndicates if the discount can be used with other discounts (1 for yes, 0 for no).0
data.prerequisite_customer_idsarrayList of customer IDs eligible for the discount.[]
data.prerequisite_customer_segment_idsarrayList of customer segment IDs eligible for the discount.[]
data.configobjectDiscount configuration, including banner and countdown settings.{"banner_url": "", "count_down": {...}}
data.allocation_methodstringAllocation method for the discount.""
data.allocation_limitintegerAllocation limit for the discount.0
data.customer_selectionstringCustomer selection criteria for the discount.""
data.entitled_collection_idsarrayList of collection IDs entitled for the discount.[]
data.tipsobjectTips and messages associated with the discount.{"msg": "", "countdown": ""}
data.entitled_extra_listnullAdditional entitled data for the discount.null
data.prerequisite_customer_rangenullCustomer range prerequisites for the discount.null
data.buysPrerequisiteValueintegerBuy prerequisite value for the discount.0
data.getsMaxOrderUseValueintegerMaximum order use value for the discount.0
data.getsDiscountValueintegerDiscount value to be applied.0
data.only_valid_first_order_customerbooleanIndicates if the discount is valid for first order customers only.false

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorsArray[ "invalid line_item id"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!