younifyd
Menu

List Vouchers

List Vouchers

GET/v1/vouchers

Use it in a workflow

  1. Add a step and choose the Voucherify connector.
  2. Pick the List Vouchers action (under Vouchers).
  3. Fill in the fields below, then reference the result from later steps as {{listVouchers.response.data}}.

Request

Query parameters

limitinteger

Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

pageinteger

Which page of results to return. The lowest value is `1`, the highest value is `99`.

categorystring

Limit search results to vouchers within the specified category.

campaign_idstring

Limit search results to vouchers within the specified campaign

customerstring

A tracking identifier of a customer who is the holder of the vouchers. It can be an `id` generated by Voucherify or the `source_id`. Remember to use the proper URL escape codes if the `source_id` contains special characters.

campaignstring

A unique campaign name, identifies the parent campaign.

created_atobject

A filter on the list based on the object `created_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[created_at][before]=2017-09-08T13:52:18.227Z`

beforestring (date-time)

Timestamp representing the date and time before the voucher was created. The value is shown in the ISO 8601 format.

afterstring (date-time)

Timestamp representing the date and time after the voucher was created. The value is shown in the ISO 8601 format.

updated_atobject

A filter on the list based on the object `updated_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[updated_at][before]=2017-09-08T13:52:18.227Z`

beforestring (date-time)

Timestamp representing the date and time before the voucher was updated. The value is shown in the ISO 8601 format.

afterstring (date-time)

Timestamp representing the date and time after the voucher was updated. The value is shown in the ISO 8601 format.

orderstring

Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order.

One ofcreated_at-created_atupdated_at-updated_atcode-code

codestring
idsarray<string>
filtersobject

Object for setting voucher filters. Read [Advanced filters for fetching resources](/api-reference/listing#advanced-filters-for-fetching-resources) for filter examples. Note that **Try-it!** adds the opening `[` and closing `]` square brackets on its own, so paste your filter without them, for example `expiration_date][conditions][$before`.

Response

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

objectstring

The type of the object represented by JSON.

One oflistDefault "list"

data_refstring

Identifies the name of the attribute that contains the array of voucher objects.

One ofvouchersDefault "vouchers"

vouchersarray<any>

A dictionary that contains an array of vouchers. Each entry in the array is a separate voucher object.

totalinteger

Returns how many vouchers in the project meet the limits defined by the query parameter definitions.

json
{
  "object": "list",
  "data_ref": "vouchers",
  "vouchers": [
    null
  ],
  "total": 20
}

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

List Vouchers — Voucherify — Documentation