Skip to main content
GET
/
v1
/
discounts
/
search
Search discounts
curl --request GET \
  --url https://api.creem.io/v1/discounts/search \
  --header 'x-api-key: <api-key>'
{
  "items": [
    {
      "id": "<string>",
      "mode": "test",
      "object": "discount",
      "status": "active",
      "name": "Holiday Sale",
      "code": "HOLIDAY2024",
      "type": "percentage",
      "amount": 20,
      "currency": "USD",
      "percentage": 15,
      "expiry_date": "2024-12-31T23:59:59Z",
      "max_redemptions": 100,
      "duration": "repeating",
      "duration_in_months": 6,
      "applies_to_products": [
        "prod_123",
        "prod_456"
      ],
      "redeem_count": 15
    }
  ],
  "pagination": {
    "total_records": 0,
    "total_pages": 0,
    "current_page": 1,
    "next_page": 2,
    "prev_page": null
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.

Query Parameters

page_number
number
default:1

The page number for pagination.

Example:

1

page_size
number
default:10

The number of items per page.

Example:

10

product_id
string

Filter discounts that apply to a specific product.

Example:

"prod_1234567890"

status
enum<string>

Filter by discount status.

Available options:
active,
deleted
type
enum<string>

Filter by discount type.

Available options:
percentage,
fixed
created_after
string

Filter discounts created after this date.

Example:

"2024-01-01T00:00:00Z"

created_before
string

Filter discounts created before this date.

Example:

"2024-12-31T23:59:59Z"

Response

Successfully retrieved the list of discounts

items
object[]
required

List of discount items

pagination
object
required

Pagination details for the list