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

FieldTypeExampleDescription
pageint1Current page of the paginated result set.
limitint10Number of items displayed per page.
totalint2Total number of items available.
dataarrayList of coupon objects. Each object contains:
  data.idstring"202314454241654711"Unique identifier of the coupon.
  data.store_idint11218Store ID associated with the coupon.
  data.titlestring"coupon1"Name of the coupon.
  data.valuestring"10"Value of the discount (percentage or fixed amount).
  data.discount_typestring"percentage"Type of discount, e.g., percentage.
  data.stockint0Available stock for this coupon.
  data.progressstring"ongoing"Current progress status (not_started, ongoing, finished).
  data.times_usedint1Number of times the coupon has been used.
  data.life_cycle_typestring"begin_end"Life cycle type of the coupon.
  data.starts_attimestamp1673246985Timestamp when the coupon becomes active.
  data.ends_attimestamp-1Timestamp when the coupon expires.
  data.usage_limitint-1Limit on the number of times the coupon can be used.
  data.once_per_customerbooleanfalseWhether the coupon can be used only once per customer.
  data.sort.bystring"sales"Sorting criteria (e.g., sales).
  data.sort.directionstring"desc"Sorting direction (asc or desc).

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!