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": {},
        "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.

I