younifyd
Menu

Create Coupon Reservation

Create coupon reservation

POST/v1/coupon_reservations/{couponValue}

Use it in a workflow

  1. Add a step and choose the Talon.One connector.
  2. Pick the Create Coupon Reservation action (under integration).
  3. Fill in the fields below, then reference the result from later steps as {{createCouponReservation.response.data}}.

Request

Path parameters

couponValuestringrequired

The code of the coupon. **Important:** The coupon code requires [URL encoding](https://www.w3schools.com/tags//ref_urlencode.asp) if it contains special characters. For example, you must encode `SUMMER25%OFF` as `SUMMER25%25OFF`.

Request body

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

integrationIDsarray<string>required

List of customer integration IDs.

json
{
  "integrationIDs": [
    "URNGV8294NV",
    "BZGGC2454PA"
  ]
}

Response

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

idinteger (int64)

The internal ID of the coupon.

createdstring (date-time)

The time the coupon was created.

campaignIdinteger (int64)

The ID of the campaign that owns this entity.

valuestring

The coupon code.

usageLimitinteger (int64)

The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply.

discountLimitnumber

The total discount value that the code can give. Typically used to represent a gift card value.

reservationLimitinteger (int64)

The number of reservations that can be made with this coupon code.

startDatestring (date-time)

Timestamp at which point the coupon becomes valid.

expiryDatestring (date-time)

Expiration date of the coupon. Coupon never expires if this is omitted.

limitsarray<object>

Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured.

actionstringrequired

The limitable action to which this limit applies. For example: - `setDiscount` - `setDiscountEffect` - `redeemCoupon` - `createCoupon`

limitnumberrequired

The value to set for the limit.

periodstring

The period on which the budget limit recurs.

One ofdailyweeklymonthlyyearly

entitiesarray<string>required

The entity that this limit applies to.

usageCounterinteger (int64)

The number of times the coupon has been successfully redeemed.

discountCounternumber

The amount of discounts given on rules redeeming this coupon. Only usable if a coupon discount budget was set for this coupon.

discountRemaindernumber

The remaining discount this coupon can give.

reservationCounternumber

The number of times this coupon has been reserved.

attributesobject

Custom attributes associated with this coupon.

referralIdinteger (int64)

The integration ID of the referring customer (if any) for whom this coupon was created as an effect.

recipientIntegrationIdstring

The Integration ID of the customer that is allowed to redeem this coupon.

importIdinteger (int64)

The ID of the Import which created this coupon.

reservationboolean

Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code.

Default true

batchIdstring

The id of the batch the coupon belongs to.

isReservationMandatoryboolean

An indication of whether the code can be redeemed only if it has been reserved first.

Default false

implicitlyReservedboolean

An indication of whether the coupon is implicitly reserved for all customers.

json
{
  "id": 6,
  "created": {},
  "campaignId": 211,
  "value": "XMAS-20-2021",
  "usageLimit": 100,
  "usageCounter": 10,
  "discountLimit": 30,
  "reservationLimit": 45,
  "startDate": {},
  "expiryDate": {},
  "limits": [
    {
      "period": "yearly",
      "entities": [
        "Coupon"
      ],
      "limit": 1000,
      "action": "createCoupon"
    }
  ],
  "discountCounter": 10
}

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