younifyd
Menu

List Unique Coupon Codes

List unique coupon codes associated with a bulk coupon

GET/coupons/{coupon_id}/unique_coupon_codes

Use it in a workflow

  1. Add a step and choose the Recurly connector.
  2. Pick the List Unique Coupon Codes action (under unique_coupon_code).
  3. Fill in the fields below, then reference the result from later steps as {{listUniqueCouponCodes.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`.

Query parameters

idsarray<string>

Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. **Important notes:** * The `ids` parameter cannot be used with any other ordering or filtering parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request. * Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.

limitinteger

Limit number of records 1-200.

Default 20

orderstring

Sort order.

One ofascdescDefault "desc"

sortstring

Sort field. You *really* only want to sort by `updated_at` in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.

One ofcreated_atupdated_atDefault "created_at"

begin_timestring (date-time)

Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.

end_timestring (date-time)

Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.

redeemedstring

Filter unique coupon codes by redemption status. `true` for redeemed, `false` for not redeemed.

One oftruefalse

Response

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

objectstring

Will always be List.

has_moreboolean

Indicates there are more results on subsequent pages.

nextstring

Path to subsequent page of results.

dataarray<object>
idstring
objectstring
codestring

The code the customer enters to redeem the coupon.

statestring

Indicates if the unique coupon code is redeemable or why not.

One ofexpiredinactivemaxed_outredeemable

bulk_coupon_idstring

The Coupon ID of the parent Bulk Coupon

bulk_coupon_codestring

The Coupon code of the parent Bulk Coupon

created_atstring (date-time)
updated_atstring (date-time)
redeemed_atstring (date-time)

The date and time the unique coupon code was redeemed.

expired_atstring (date-time)

The date and time the coupon was expired early or reached its `max_redemptions`.

json
{
  "object": "string",
  "has_more": false,
  "next": "string",
  "data": [
    {
      "id": "string",
      "object": "string",
      "code": "string",
      "state": "expired",
      "bulk_coupon_id": "string",
      "bulk_coupon_code": "string",
      "created_at": "2025-01-01T00:00:00Z",
      "updated_at": "2025-01-01T00:00:00Z",
      "redeemed_at": "2025-01-01T00:00:00Z",
      "expired_at": "2025-01-01T00:00:00Z"
    }
  ]
}

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