younifyd
Menu

List Members

List Members

GET/v1/loyalties/{campaignId}/members

Use it in a workflow

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

Request

Path parameters

campaignIdstringrequired

Unique campaign ID of the loyalty program.

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`.

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.

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>

Response

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

objectstring

The type of the object represented by JSON. This object stores information about members in a dictionary.

Default "list"

data_refstring

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

One ofvouchersDefault "vouchers"

vouchersarray<object>

Contains array of voucher objects representing loyalty cards, in other words, loyalty program members.

idstring

Assigned by the Voucherify API, identifies the voucher.

codestring

A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.

campaignstring

A unique campaign name, identifies the voucher's parent campaign.

campaign_idstring

Assigned by the Voucherify API, identifies the voucher's parent campaign.

categorystring

Tag defining the category that this voucher belongs to.

category_idstring

Unique category ID assigned by Voucherify.

typestring

Defines the type of the voucher.

One ofLOYALTY_CARDDefault "LOYALTY_CARD"

discountobject
giftobject
loyalty_cardobject7 fields

Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.

start_datestring (date-time)

Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date.

expiration_datestring (date-time)

Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date.

validity_timeframeobject2 fields

Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.

validity_day_of_weekarray<integer>

Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday

validity_hoursobject1 fields

Determines the hours of validity, e.g. to create a happy hours scenario.

activeboolean

A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher

additional_infostring

An optional field to keep any extra textual information about the code such as a code description and details.

metadataobject

The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format.

assetsobject2 fields

Stores links to images of QR and barcode that correspond to an encrypted voucher code.

is_referral_codeboolean

This is always false for loyalty members.

created_atstring (date-time)

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

updated_atstring (date-time)

Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.

holder_idstring

Unique identifier of the customer who owns the voucher.

objectstring

The type of the object represented by JSON. Default is `voucher`.

Default "voucher"

publishobject3 fields

This object stores a summary of publish events: an events counter and an endpoint which can be called to return details of each event. A publication is required for loyalty cards and referral codes. This object gets updated whenever a voucher has been published. Publication means assigning a code to a particular customer. Typically, a publication is made by distributing your codes to your customers, e.g. through Export to MailChimp or | Required | Optional | | -------- | :------: | | `type`:`LOYALTY_CARD` | `type`:`DISCOUNT_VOUCHER` | | `is_referral_code`:`true` | `type`:`GIFT_VOUCHER` |

redemptionobject5 fields

Stores a summary of redemptions that have been applied to the voucher.

totalinteger

Total number of voucher objects.

json
{
  "object": "list",
  "data_ref": "vouchers",
  "vouchers": [
    {
      "id": "v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV",
      "code": "WVPblOYX",
      "campaign": "Loyalty campaign",
      "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
      "category": "string",
      "category_id": "cat_0bb343dee3cdb5ec0c",
      "type": "LOYALTY_CARD",
      "discount": {},
      "gift": {},
      "loyalty_card": {
        "points": 7000,
        "balance": 6970,
        "next_expiration_date": "2023-05-30",
        "next_expiration_points": 0,
        "pending_points": 0,
        "expired_points": 0,
        "subtracted_points": 0
      },
      "start_date": "2021-12-01T00:00:00.000Z",
      "expiration_date": "2021-12-31T00:00:00.000Z"
    }
  ],
  "total": 0
}

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