younifyd
Menu

Generate Unique Coupon Codes

Generate unique coupon codes

POST/coupons/{coupon_id}/generate

Use it in a workflow

  1. Add a step and choose the Recurly connector.
  2. Pick the Generate Unique Coupon Codes action (under unique_coupon_code).
  3. Fill in the fields below, then reference the result from later steps as {{generateUniqueCouponCodes.response.data}}.

Request

Path parameters

coupon_idstringrequired

Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`.

Request body

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

number_of_unique_codesinteger

The quantity of unique coupon codes to generate. A bulk coupon can have up to 100,000 unique codes (or your site's configured limit).

json
{
  "number_of_unique_codes": 0
}

Response

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

limitinteger
orderstring
sortstring
begin_timestring (date-time)

The date-time to be included when listing UniqueCouponCodes

json
{
  "limit": 0,
  "order": "string",
  "sort": "string",
  "begin_time": "2025-01-01T00:00:00Z"
}

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