Coupons

List coupons

[!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 all the coupons matching the specified criteria.

get/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/no_total

Request

Path parameters

applicationIdinteger required

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

campaignIdinteger required

The ID of the campaign. 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.

redeemed'true' | 'false'
  • true: only coupons where usageCounter > 0 will be returned.
  • false: only coupons where usageCounter = 0 will be returned.
  • This field cannot be used in conjunction with the usable query parameter.
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.

expiresBeforestring date-time

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

expiresAfterstring date-time

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

startsBeforestring date-time

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

startsAfterstring date-time

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

valuesOnlyboolean

Filter results to only return the coupon codes (value column) without the associated coupon data.

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.