younifyd
Menu

Update Coupon Batch

Update coupons

PUT/v1/applications/{applicationId}/campaigns/{campaignId}/coupons

Use it in a workflow

  1. Add a step and choose the Talon.One connector.
  2. Pick the Update Coupon Batch action (under management).
  3. Fill in the fields below, then reference the result from later steps as {{updateCouponBatch.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.

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.

attributesobject

Optional property to set the value of custom coupon attributes. They are defined in the Campaign Manager, see [Managing attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes). Coupon attributes can also be set to _mandatory_ in your Application [settings](https://docs.talon.one/docs/product/applications/using-attributes#making-attributes-mandatory). If your Application uses mandatory attributes, you must use this property to set their value.

batchIDstring

The ID of the batch the coupon(s) belong to.

json
{
  "usageLimit": 100,
  "discountLimit": 30,
  "reservationLimit": 45,
  "startDate": {},
  "expiryDate": {},
  "attributes": {},
  "batchID": "string"
}

Response

Returns 204 with a any. Read it in later steps with {{updateCouponBatch.response.data.<field>}}.

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