Skip to main content
GET
/
v1
/
customers
/
{customerId}
/
redeemables
List Customer's Redeemables
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/customers/{customerId}/redeemables \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "data",
  "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": "DISCOUNT_COUPONS",
      "voucher_type": "DISCOUNT_VOUCHER",
      "redeemable": {
        "type": "voucher",
        "voucher": {
          "id": "v_GXVguPhq2khgFxH7GrRXWA91gDr1LiA1",
          "code": "3xRUnMVG",
          "campaign": "Gaz6Q29w1d",
          "campaign_id": "camp_weer1c3p5ZgktqfW56RfoNaG",
          "category": null,
          "category_id": null,
          "categories": [],
          "type": "DISCOUNT_VOUCHER",
          "discount": {
            "type": "AMOUNT",
            "amount_off": 1000
          },
          "gift": null,
          "loyalty_card": null,
          "start_date": null,
          "expiration_date": null,
          "validity_timeframe": null,
          "validity_hours": null,
          "validity_day_of_week": null,
          "active": true,
          "additional_info": null,
          "metadata": {},
          "assets": {
            "qr": {
              "id": "fa250fcd-8d51-41e7-9dda-9288ce2799a7",
              "url": "{{internalVoucherifyURL}}"
            },
            "barcode": {
              "id": "1b876033-ad88-4e74-8344-27fca1767006",
              "url": "{{internalVoucherifyURL}}"
            }
          },
          "is_referral_code": false,
          "created_at": "2024-03-22T17:48:18.57+00:00",
          "updated_at": "2024-03-22T17:48:25.910974+00:00",
          "holder_id": "cust_p1ufreYbVbwZ1x70nFkH9rF9",
          "redemption": {
            "quantity": null,
            "redeemed_quantity": 0,
            "object": "list",
            "url": "/v1/vouchers/3xRUnMVG/redemptions?page=1&limit=10"
          },
          "publish": {
            "object": "list",
            "count": 1,
            "url": "/v1/vouchers/3xRUnMVG/publications?page=1&limit=10"
          },
          "object": "voucher"
        },
        "status": "ACTIVE"
      }
    },
    {
      "id": "rh_0e79fe37e4926cafd6",
      "created_at": "2024-03-21T12:43:02.915Z",
      "redeemable_id": "v_nnxc1aFzFZCAhRlG6sm0kSO4jKUohc9b",
      "redeemable_object": "voucher",
      "customer_id": "cust_p1ufreYbVbwZ1x70nFkH9rF9",
      "holder_role": "REFERRER",
      "campaign_id": "camp_ixXNxP8kRoV15RoyZU4HqqYJ",
      "campaign_type": "REFERRAL_PROGRAM",
      "voucher_type": "DISCOUNT_VOUCHER",
      "redeemable": {
        "type": "voucher",
        "voucher": {
          "id": "v_nnxc1aFzFZCAhRlG6sm0kSO4jKUohc9b",
          "code": "PBF3ZYfS",
          "campaign": "REFER_2",
          "campaign_id": "camp_ixXNxP8kRoV15RoyZU4HqqYJ",
          "category": null,
          "category_id": null,
          "categories": [],
          "type": "DISCOUNT_VOUCHER",
          "discount": {
            "type": "AMOUNT",
            "amount_off": 88800,
            "effect": "APPLY_TO_ORDER"
          },
          "gift": null,
          "loyalty_card": null,
          "start_date": null,
          "expiration_date": null,
          "validity_timeframe": null,
          "validity_hours": null,
          "validity_day_of_week": null,
          "active": true,
          "additional_info": null,
          "metadata": {},
          "assets": {
            "qr": {
              "id": "fc0471bf-0c7b-443f-9532-303437041eea",
              "url": "{{internalVoucherifyURL}}"
            },
            "barcode": {
              "id": "5b2f2007-494b-40c3-9d4c-ad27269a0cd0",
              "url": "{{internalVoucherifyURL}}"
            }
          },
          "is_referral_code": true,
          "created_at": "2024-03-21T12:42:49.771+00:00",
          "updated_at": "2024-03-21T12:43:02.915953+00:00",
          "holder_id": "cust_p1ufreYbVbwZ1x70nFkH9rF9",
          "referrer_id": "cust_p1ufreYbVbwZ1x70nFkH9rF9",
          "redemption": {
            "quantity": null,
            "redeemed_quantity": 0,
            "object": "list",
            "url": "/v1/vouchers/PBF3ZYfS/redemptions?page=1&limit=10"
          },
          "publish": {
            "object": "list",
            "count": 1,
            "url": "/v1/vouchers/PBF3ZYfS/publications?page=1&limit=10"
          },
          "object": "voucher"
        },
        "status": "ACTIVE"
      }
    }
  ],
  "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

customerId
string
required

Unique identifier of a customer represented by an internal customer ID or customer source ID.

Example:

"cust_nk0N1uNQ1YnupAoJGOgvsODC"

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

The method returns redeemable(s) to which the given customer is assigned.

Response body schema for GET v1/customers/{customerId}/redeemables. List of customer's redeemables

object
string
default:list
required

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

data_ref
string
default:data
required

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

data
Customer Redeemable · object[]
required

A dictionary that contains an array of redeemables.

total
integer
required

Total number of results returned.

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