Coupons

List coupons that match the given attributes (without total count)

[!note] Management API endpoints are not meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.

List the coupons whose attributes match the query criteria in all the campaigns of the given Application.

The match is successful if all the attributes of the request are found in a coupon, even if the coupon has more attributes that are not present on the request.

[!note] The total count is not included in the response.

post/v1/applications/{applicationId}/coupons_search_advanced/no_total

Request

Path parameters

applicationIdinteger required

The ID of the Application. It is displayed in your Talon.One deployment URL.

Query parameters

pageSizeinteger

The number of items in the response.

skipinteger

The number of items to skip when paging through large result sets.

sortstring

The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with -.

Note: You may not be able to use all fields for sorting. This is due to performance limitations.

valuestring

Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters.

createdBeforestring date-time

Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

createdAfterstring date-time

Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

valid'expired' | 'validNow' | 'validFuture'

Either "expired", "validNow", or "validFuture". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.

usable'true' | 'false'

Either "true" or "false". If "true", only coupons where usageCounter < usageLimit will be returned, "false" will return only coupons where usageCounter >= usageLimit.

referralIdinteger

Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.

recipientIntegrationIdstring

Filter results by match with a profile ID specified in the coupon's RecipientIntegrationId field.

batchIdstring

Filter results by batches of coupons

exactMatchboolean

Filter results to an exact case-insensitive matching against the coupon code.

campaignState'enabled' | 'disabled' | 'archived' | 'scheduled' | 'running' | 'expired' | 'staged'

Filter results by the state of the campaign.

  • enabled: Campaigns that are scheduled, running (active), or expired.
  • running: Campaigns that are running (active).
  • disabled: Campaigns that are disabled.
  • expired: Campaigns that are expired.
  • archived: Campaigns that are archived.

Request body

AttributeQuery required

Object representing a set of of attributes and their respective values.

Example request

{
  "my_attribute_1": "some value",
  "my_attribute_2": "some other value",
  "my_attribute_3": "some other value"
}

Response

OK

hasMoreboolean required

Example response

{
  "hasMore": true,
  "data": [
    {
      "id": 6,
      "created": "2020-06-10T09:05:27.993483Z",
      "campaignId": 211,
      "value": "XMAS-20-2021",
      "usageLimit": 100,
      "discountLimit": 30,
      "reservationLimit": 45,
      "startDate": "2020-01-24T14:15:22Z",
      "expiryDate": "2023-08-24T14:15:22Z",
      "limits": [
        {
          "action": "createCoupon",
          "limit": 1000,
          "period": "yearly",
          "entities": [
            "Coupon"
          ]
        }
      ],
      "usageCounter": 10,
      "discountCounter": 10,
      "discountRemainder": 5,
      "reservationCounter": 1,
      "referralId": 326632952,
      "recipientIntegrationId": "URNGV8294NV",
      "importId": 4,
      "batchId": "32535-43255"
    }
  ]
}

Changes

No recorded changes to this operation across all 2 revisions of this API.