younifyd
Menu

Create Coupons Deletion Job

Creates a coupon deletion job

POST/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_deletion_jobs

Use it in a workflow

  1. Add a step and choose the Talon.One connector.
  2. Pick the Create Coupons Deletion Job action (under management).
  3. Fill in the fields below, then reference the result from later steps as {{createCouponsDeletionJob.response.data}}.

Request

Path parameters

applicationIdinteger (int64)required

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

campaignIdinteger (int64)required

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

Request body

Enter the body as JSON in the step's Body field.

filtersobjectrequired
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.

startsAfterstring (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.

startsBeforestring (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.

validstring

- `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which the start date is null or in the past and the expiration date is null or in the future. - `validFuture`: Matches coupons in which the start date is set and in the future.

One ofexpiredvalidNowvalidFuture

usableboolean

- `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. - This field cannot be used in conjunction with the `usable` query parameter.

redeemedboolean

- `true`: only coupons where `usageCounter > 0` will be returned. - `false`: only coupons where `usageCounter = 0` will be returned. **Note:** This field cannot be used in conjunction with the `usable` query parameter.

recipientIntegrationIdstring

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

exactMatchboolean

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

Default false

valuestring

Filter results by the coupon code

batchIdstring

Filter results by batches of coupons

referralIdinteger (int64)

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

expiresAfterstring (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.

expiresBeforestring (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.

json
{
  "filters": {
    "startsAfter": {},
    "recipientIntegrationId": "recipientIntegrationId",
    "exactMatch": false,
    "redeemed": true,
    "referralId": 0,
    "createdAfter": {},
    "batchId": "batchId",
    "valid": "expired",
    "usable": true,
    "expiresAfter": {},
    "expiresBefore": {},
    "createdBefore": {},
    "value": "value",
    "startsBefore": {}
  }
}

Response

Returns 202 with an object. Read it in later steps with {{createCouponsDeletionJob.response.data.<field>}}.

idinteger (int64)

Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints.

json
{
  "id": 6
}

Need more? See the Talon.One guide for connection setup and behaviour shared by every action.