Skip to main content
GET
/
v1
/
loyalties
/
{campaignId}
/
members
List Members
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/loyalties/{campaignId}/members \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "vouchers",
  "vouchers": [
    {
      "id": "v_YLn0WVWXSXbUfDvxgrgUbtfJ3SQIY655",
      "code": "0PmQ7JQI",
      "campaign": "Loyalty Campaign",
      "campaign_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
      "category": null,
      "category_id": null,
      "categories": [],
      "type": "LOYALTY_CARD",
      "discount": null,
      "gift": null,
      "loyalty_card": {
        "points": 0,
        "balance": 0
      },
      "start_date": null,
      "expiration_date": null,
      "validity_timeframe": null,
      "validity_day_of_week": null,
      "active": true,
      "additional_info": null,
      "metadata": {},
      "assets": {
        "qr": {
          "id": "U2FsdGVkX19RtPewWeUYb2hiCR6xEhVE3SLdMfCXj3BA/s6uqSwFl2oAKAt9K5dolsdcZcj5Jgaa/YCnKkm63TRuX6OgGJoEggbKMg+wLfCMwBSi4J2v8KXuyqM25wP4r9WAL58Z+z3B1jkALIbjtw==",
          "url": "{{internalVoucherifyURL}}"
        },
        "barcode": {
          "id": "U2FsdGVkX1+hrRfaPMHRRX5aGVz2RpurRBjC2brcHcptPs4Od93qZM51vUXZe4DDzfRbnVrP+BfBtF+pyyQpxCeqbQuB/OuSnP/nzec6n0n/gTb9+XcIYLvvxcbnDbYoVdRFQEbcCxKKo4QzDlqIjQ==",
          "url": "{{internalVoucherifyURL}}"
        }
      },
      "is_referral_code": false,
      "created_at": "2022-04-15T05:48:45.509Z",
      "updated_at": "2022-07-01T00:01:57.860Z",
      "holder_id": "cust_nk0N1uNQ1YnupAoJGOgvsODC",
      "redemption": {
        "quantity": null,
        "redeemed_quantity": 0,
        "redeemed_points": 0,
        "object": "list",
        "url": "/v1/vouchers/0PmQ7JQI/redemptions?page=1&limit=10"
      },
      "publish": {
        "object": "list",
        "count": 1,
        "url": "/v1/vouchers/0PmQ7JQI/publications?page=1&limit=10"
      },
      "object": "voucher"
    },
    {
      "id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF",
      "code": "MmFAzfDe",
      "campaign": "Loyalty Campaign",
      "campaign_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
      "category": null,
      "category_id": "cat_0b6152ce12414820de",
      "categories": [],
      "type": "LOYALTY_CARD",
      "discount": null,
      "gift": null,
      "loyalty_card": {
        "points": 13435,
        "balance": 13135,
        "next_expiration_date": "2022-11-30",
        "next_expiration_points": 12
      },
      "start_date": null,
      "expiration_date": null,
      "validity_timeframe": null,
      "validity_day_of_week": null,
      "active": true,
      "additional_info": null,
      "metadata": {},
      "assets": {
        "qr": {
          "id": "U2FsdGVkX184kVdWUO/msrLg1G0MRf/Cs6QwSN3f6kyWCOTGdijyq8OfUbUpcGx6fjdeIpTf2UilFGNG8aCWVk/dXm/QEJ/sulXKDlUMWf+MN7TRG5LB+wuzqTy7csDBfRoJn0fURpwU4A6VZZSwBQ==",
          "url": "{{internalVoucherifyURL}}"
        },
        "barcode": {
          "id": "U2FsdGVkX1/RGZN9VwvkdI6B26PPZQZWjh33USr5NPMXbHuJVkxsH6TUyW/cXen1Lc7gaqik09BGiry0R4QIAP52jnxQuABOsW0HdYfglsLPY7IajGX5rJzZKDKuzioq2vRIPyuE6z03frAod7ptvQ==",
          "url": "{{internalVoucherifyURL}}"
        }
      },
      "is_referral_code": false,
      "created_at": "2022-02-18T14:03:59.954Z",
      "updated_at": "2022-11-21T13:49:54.949Z",
      "holder_id": "cust_sehkNIi8Uq2qQuRqSr7xn4Zi",
      "redemption": {
        "quantity": null,
        "redeemed_quantity": 1,
        "redeemed_points": 300,
        "object": "list",
        "url": "/v1/vouchers/MmFAzfDe/redemptions?page=1&limit=10"
      },
      "publish": {
        "object": "list",
        "count": 1,
        "url": "/v1/vouchers/MmFAzfDe/publications?page=1&limit=10"
      },
      "object": "voucher"
    }
  ],
  "total": 2
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

campaignId
string
required

Unique campaign ID of the loyalty program.

Example:

"camp_rRsfatlwN7unSeUIJDCYedal"

Query Parameters

limit
integer

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.

Required range: 1 <= x <= 100
page
integer

Which page of results to return. The lowest value is 1.

Required range: 1 <= x <= 100
customer
string

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.

Example:

"cust_nk0N1uNQ1YnupAoJGOgvsODC"

created_at
object

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

updated_at
object

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

order
enum<string>

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

Available options:
created_at,
-created_at,
updated_at,
-updated_at,
code,
-code
code
string
Example:

"2CpRCE2c"

ids
string[]

Response

200 - application/json

Returns a list of loyalty cards within a campaign.

Response body schema for GET v1/loyalties/{campaignId}/members.

object
string
default:list

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

data_ref
enum<string>
default:vouchers

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

Available options:
vouchers
vouchers
Loyalty Member · object[]

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

total
integer

Total number of voucher objects.

I