Skip to main content
GET
/
v1
/
customers
/
{customerId}
/
activities
List Customer Activities
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/customers/{customerId}/activities \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "data",
  "data": [
    {
      "id": "evcus_0c150c51730c6b60b1",
      "type": "customer.confirmed",
      "data": {
        "data": {
          "customer": {
            "summary": {
              "redemptions": {
                "total_redeemed": 123,
                "total_failed": 123,
                "total_succeeded": 123,
                "total_rolled_back": 123,
                "total_rollback_failed": 123,
                "total_rollback_succeeded": 123,
                "gift": {
                  "redeemed_amount": 0,
                  "amount_to_go": 0
                },
                "loyalty_card": {
                  "redeemed_points": 123,
                  "points_to_go": 123
                }
              },
              "orders": {
                "total_amount": 123,
                "total_count": 123,
                "average_amount": 123,
                "last_order_amount": 123,
                "last_order_date": "2022-08-30T11:51:08.029Z"
              }
            },
            "loyalty": {
              "points": 123,
              "referred_customers": 123,
              "campaigns": {}
            },
            "referrals": {
              "total": 123,
              "campaigns": [
                {
                  "campaign_id": "camp_rRsfatlwN7unSeUIJDCYedal",
                  "referrer_id": "cust_sehkNIi8Uq2qQuRqSr7xn4Zi",
                  "related_object_id": "r_0b9d4cc4aa164dd073",
                  "related_object_type": "<string>",
                  "date": "2022-08-30T10:19:39.196Z"
                }
              ]
            },
            "object": "customer",
            "id": "<string>",
            "source_id": "<string>",
            "system_metadata": {},
            "created_at": "2022-08-30T06:32:07.380Z",
            "updated_at": "2022-08-31T06:32:07.380Z",
            "assets": {
              "cockpit_url": "<string>"
            },
            "name": "<string>",
            "description": "<string>",
            "email": "<string>",
            "phone": "<string>",
            "birthday": "2023-12-25",
            "birthdate": "2023-12-25",
            "address": {
              "city": "<string>",
              "state": "<string>",
              "line_1": "<string>",
              "line_2": "<string>",
              "country": "<string>",
              "postal_code": "<string>"
            },
            "metadata": {}
          },
          "unconfirmed_customer": {
            "id": "ucust_1qa70mVfYkl11Ab0ZxDPdWNa"
          }
        },
        "event_source": {
          "channel": "API",
          "user": {
            "id": "user_xyzfghSTprSTUVWXYlk6tuvXYst7FGH7"
          },
          "api_key": {
            "name": "<string>",
            "app_id": "1XXXX5XX-0XXX-XXXb-X7XX-XX2XXaXXX6XX"
          }
        }
      },
      "created_at": "2022-08-30T09:14:07.660Z",
      "group_id": "v-1f36113948e50fc4ge"
    }
  ],
  "total": 123
}

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

A Voucherify customer's id or source ID of the customer who performed the activities.

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:
created_at,
-created_at,
updated_at,
-updated_at,
type,
-type,
code,
-code,
campaign,
-campaign,
category,
-category
starting_after
string<date-time>

A cursor for pagination. starting_after is a date-time value that defines your place in the list based on created_at property from the activity object. For instance, if you make a list request and receive 100 objects, ending with an object created at 2020-05-24T13:43:09.024Z, your subsequent call can include starting_after=2020-05-24T13:43:09.024Z in order to fetch the next page of the list.

Example:

"2023-12-22T10:13:06.487Z"

starting_after_id
string

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

campaign_type
enum<string>

Through this parameter you can control a type of campaign by which Voucherify will filter related customer's activity. API will return only records related to that given type. Allowed values: DISCOUNT_COUPONS, REFERRAL_PROGRAM, GIFT_VOUCHERS, PROMOTION, LOYALTY_PROGRAM

Available options:
PROMOTION,
GIFT_VOUCHERS,
REFERRAL_PROGRAM,
DISCOUNT_COUPONS,
LOYALTY_PROGRAM
campaign_id
string

By applying this parameter you request only events related to specific campaign identified by its ID.

Example:

"camp_rRsfatlwN7unSeUIJDCYedal"

product_id
string

By applying this parameter you request only events related to specific product identified by its ID.

Example:

"prod_3ttSkdxGuAfcv3"

start_date
string<date-time>

Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.

Example:

"2023-12-22T10:13:06.487Z"

end_date
string<date-time>

Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.

Example:

"2023-12-22T10:13:06.487Z"

Response

200 - application/json

Returns a dictionary with customer activities.

Response body schema for GET v1/customers/{customerId}/activities.

object
string
default:list
required

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

data_ref
string
default:data
required

Identifies the name of the attribute that contains the array of customer activity objects.

data
Customer Activity · object[]
required

Array of customer activity objects.

total
integer
required

Total number of customer activities.