Skip to main content
GET
List Discounts

List Discounts

Returns a paginated list of discount codes in the store.

Request

Parameters

page
integer
default:"1"
Page number for pagination
limit
integer
default:"50"
Number of items per page
status
string
Filter by status: active, expired, scheduled, disabled
code
string
Search by discount code (partial, case-insensitive match)

Response

Returns the standard response envelope. The data object contains the discount rows plus flat pagination counters.
status
integer
HTTP status code (e.g. 200)
state
string
Response state: success or error
message
string
Human-readable message (null on success)
data.discounts
array
Array of discount objects
data.total
integer
Total number of matching discounts
data.page
integer
Current page number
data.limit
integer
Page size used for this request

Example Response

Error Response

Errors return the same envelope with an error state and the message under message: