Skip to main content
GET
/
stores
/
{storeId}
/
coupons
Get coupons
curl --request GET \
  --url https://api.komerza.com/stores/{storeId}/coupons \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "pages": 123,
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "dateCreated": "2023-11-07T05:31:56Z",
      "code": "<string>",
      "uses": 123,
      "maximumUses": 50000000,
      "isEnabled": true,
      "storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "percentageDecrease": 50,
      "amountDecrease": 50000,
      "variantIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "expirationDate": "2023-11-07T05:31:56Z"
    }
  ]
}

Filterable Fields

This endpoint supports filtering and sorting. See the Filtering & Sorting Guide for syntax details.
FieldTypeDescription
usesFromintegerFilter by minimum number of times coupon has been used
usesTointegerFilter by maximum number of times coupon has been used
maximumUsesFromintegerFilter by minimum maximum uses allowed
maximumUsesTointegerFilter by maximum maximum uses allowed
percentageFromdecimalFilter by minimum percentage discount
percentageTodecimalFilter by maximum percentage discount
amountFromdecimalFilter by minimum amount discount
amountTodecimalFilter by maximum amount discount
isEnabledbooleanFilter by whether coupon is enabled
Example:
# Active coupons with 20-50% discount
GET /api/stores/{storeId}/coupons?filters=isEnabled==true,percentageFrom>=20,percentageTo<=50

# Heavily used coupons
GET /api/stores/{storeId}/coupons?filters=usesFrom>=100&sorts=-usesFrom

Authorizations

Authorization
string
header
required

Your API key goes here

Path Parameters

storeId
string<uuid>
required

The ID of the store to get the coupons in

Query Parameters

UsesFrom
integer<int32>

Gets or sets the lower limit for the number of times a coupon has been used.

UsesTo
integer<int32>

Gets or sets the upper limit for the number of times a coupon has been used.

MaximumUsesFrom
integer<int32>

Gets or sets the lower limit for the maximum number of uses allowed for a coupon.

MaximumUsesTo
integer<int32>

Gets or sets the upper limit for the maximum number of uses allowed for a coupon.

PercentageFrom
number<double>

Gets or sets the minimum percentage decrease to filter by.

PercentageTo
number<double>

Gets or sets the upper limit for the percentage decrease applied to the coupon.

AmountFrom
number<double>

Gets or sets the lower limit for the amount-based discount filtering.

AmountTo
number<double>

Gets or sets the upper limit for the amount-based discount filter.

IsEnabled
boolean

Gets or sets a value indicating whether the coupon is enabled.

Filters
string
Sorts
string
Page
integer<int32>
Required range: 1 <= x <= 2147483647
PageSize
integer<int32>
Required range: 1 <= x <= 2147483647

Response

The object was successfully returned.

Represents a paginated response returned from API endpoints, which contains the paginated data and metadata about the pagination.

success
boolean
required

Indicates whether the operation was successful

pages
integer<int32>
required

The total number of pages available in the paginated response.

data
object[]
required

Represents the collection of items within a paginated response