v1

latestOpenAPI 3.0.1MIT2026-07-263151,3912.3 MB
Referrals

List Referral Code Holders

Retrieves the holders of the referral code from a referral campaign.

To use this endpoint, you must have the following permissions:

  • Read Customers (customers.details.read)

📘 Alternative endpoint

This endpoint is an alternative to the List Member Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.

get/v1/referrals/members/{memberId}/holders

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.

order'id' | '-id'

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

starting_after_idstring

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

junction'and' | 'or'

Logical Operator Between Filters. Filter by conditions set on the junction parameter indicating how the conditions should be accounted for in the query. An AND is an all-inclusive logical operator, meaning the AND operator displays a record if ALL the conditions separated by AND are TRUE, while an OR operator displays a record if ANY of the conditions separated by OR is TRUE.

Filters for listing customer redeemables.

{
  "created_at": {
    "conditions": {
      "$after": "2024-01-01T00:00:00.000Z",
      "$before": "2024-01-01T00:00:00.000Z"
    }
  }
}

Response

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

objectstring required

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

data_refstring required

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

totalinteger required

Total number of holders assigned to the redeemable.

has_moreboolean 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_afterstring

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.

Example response

{
  "data": [
    {
      "id": "rh_0e7b8db4700106a852",
      "created_at": "2024-03-22T17:48:25.910Z",
      "redeemable_id": "v_GXVguPhq2khgFxH7GrRXWA91gDr1LiA1",
      "redeemable_object": "voucher",
      "customer_id": "cust_p1ufreYbVbwZ1x70nFkH9rF9",
      "holder_role": "OWNER",
      "campaign_id": "camp_weer1c3p5ZgktqfW56RfoNaG",
      "campaign_type": "REFERRAL_PROGRAM",
      "voucher_type": "DISCOUNT_VOUCHER"
    }
  ]
}