Skip to main content
GET
/
v1
/
referrals
/
members
/
{memberId}
/
holders
List Referral Code Holders
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/referrals/members/{memberId}/holders \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "data",
  "data": [
    {
      "id": "rh_0e7213a6bc407b8639",
      "created_at": "2024-03-15T09:08:50.529Z",
      "redeemable_id": "v_jFVcN1f5ofg707z2G3GYWtMyKJ4usss4",
      "redeemable_object": "voucher",
      "campaign_id": "camp_td1gcD4feTAjUKQYfg40kWhN",
      "campaign_type": "REFERRAL_PROGRAM",
      "voucher_type": "DISCOUNT_VOUCHER",
      "customer_id": "cust_XDwHXVBSZZAJgjpHvrgUHx3J",
      "holder_role": "REFERRER",
      "object": "redeemable_holder"
    },
    {
      "id": "rh_0e6d0b84960f447f52",
      "created_at": "2024-03-11T11:20:54.093Z",
      "redeemable_id": "v_jFVcN1f5ofg707z2G3GYWtMyKJ4usss4",
      "redeemable_object": "voucher",
      "campaign_id": "camp_td1gcD4feTAjUKQYfg40kWhN",
      "campaign_type": null,
      "voucher_type": "DISCOUNT_VOUCHER",
      "customer_id": "cust_1B9wkAcSz5O1Y4Zn8JPfKQm6",
      "holder_role": "OWNER",
      "object": "redeemable_holder"
    }
  ],
  "total": 2,
  "has_more": false
}

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

memberId
string
required

Unique referral code or its identifier.

Example:

"MmFAzfDe"

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
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:
id,
-id
starting_after_id
string

A cursor for pagination. It retrieves the events starting after an event with the given ID.

filters
object

Filters for listing customer redeemables.

Response

Returns the holders of the redeemable that is assigned to the referral campaign.

Response body schema for GET v1/referrals/{campaignId}/members/{memberId}/holders and for GET v1/referrals/members/{memberId}/holders List of Holder's Redeemables

object
string
default:list
required

The type of the object represented by JSON. This object stores information about redeemables holders

data_ref
string
default:data
required

Identifies the name of the JSON property that contains the array of holders.

data
Customer Redeemable · object[]
required

A dictionary that contains an array of holders.

total
integer
required

Total number of holders assigned to the redeemable.

has_more
boolean
required

As query results are always limited (by the limit parameter), the has_more flag indicates if there are more records for given filter parameters. This lets you know if you can run another request with a starting_after_id query or a different limit to get more records returned in the results.

more_starting_after
string

Returns an ID that can be used to return another page of results. Use the ID in the starting_after_id query parameter to display another page of the results occuring after the field with that ID.

I