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
}❗️ Deprecated
This endpoint represents the deprecated version of the API responsible for listing customer activities and we do not recommend using it. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint.
Retrieve 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
}The access token received from the authorization server in the OAuth 2.0 flow.
A Voucherify customer's id or source ID of the customer who performed the activities.
"cust_nk0N1uNQ1YnupAoJGOgvsODC"
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.
1 <= x <= 100Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
created_at, -created_at, updated_at, -updated_at, type, -type, code, -code, campaign, -campaign, category, -category 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.
"2023-12-22T10:13:06.487Z"
A cursor for pagination. It retrieves the events starting after an event with the given ID.
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
PROMOTION, GIFT_VOUCHERS, REFERRAL_PROGRAM, DISCOUNT_COUPONS, LOYALTY_PROGRAM By applying this parameter you request only events related to specific campaign identified by its ID.
"camp_rRsfatlwN7unSeUIJDCYedal"
By applying this parameter you request only events related to specific product identified by its ID.
"prod_3ttSkdxGuAfcv3"
Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
"2023-12-22T10:13:06.487Z"
Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
"2023-12-22T10:13:06.487Z"
Returns a dictionary with customer activities.
Response body schema for GET v1/customers/{customerId}/activities.
The type of the object represented by JSON. This object stores information about customer activities in a dictionary.
Identifies the name of the attribute that contains the array of customer activity objects.
Array of customer activity objects.
Show child attributes
Unique event ID, assigned by Voucherify.
"evcus_0c150c51730c6b60b1"
Event type.
customer.confirmed, customer.created, customer.updated, customer.deleted, customer.referred, customer.custom_event, customer.segment.entered, customer.segment.left, customer.sms.sent, customer.sms.recovered, customer.sms.failed, customer.email.sent, customer.email.recovered, customer.email.failed, customer.activecampaign.sent, customer.activecampaign.recovered, customer.activecampaign.failed, customer.braze.sent, customer.braze.recovered, customer.braze.failed, customer.mailchimp.sent, customer.mailchimp.recovered, customer.mailchimp.failed, customer.intercom.sent, customer.intercom.recovered, customer.intercom.failed, customer.shopify.sent, customer.shopify.recovered, customer.shopify.failed, customer.klaviyo.sent, customer.klaviyo.recovered, customer.klaviyo.failed, customer.batch.sent, customer.batch.recovered, customer.batch.failed, customer.rewarded, customer.rewarded.loyalty_points, customer.voucher.gift.balance_added, customer.voucher.loyalty_card.pending_points.activated, customer.voucher.loyalty_card.pending_points.added, customer.voucher.loyalty_card.pending_points.canceled, customer.voucher.loyalty_card.pending_points.updated, customer.voucher.loyalty_card.points_activated, customer.voucher.loyalty_card.points_added, customer.voucher.loyalty_card.points_transferred, customer.voucher.loyalty_card.points_expired, customer.voucher.deleted, customer.publication.succeeded, customer.publication.failed, customer.validation.succeeded, customer.validation.failed, customer.redemption.failed, customer.redemption.succeeded, customer.redemption.rollback.failed, customer.redemption.rollback.succeeded, customer.order.canceled, customer.order.created, customer.order.fulfilled, customer.order.paid, customer.order.processing, customer.order.updated, customer.reward_redemptions.created, customer.reward_redemptions.pending, customer.reward_redemptions.completed, customer.reward_redemptions.rolledback, customer.loyalty.updated, customer.loyalty.tier.upgraded, customer.loyalty.tier.downgraded, customer.loyalty.tier.prolonged, customer.loyalty.tier.expiration.changed, customer.loyalty.tier.joined, customer.loyalty.tier.left, customer.holder.assignment.created, customer.holder.assignment.deleted Contains details about the event. The objects that are returned in the data attribute differ based on the context of the event type.
Show child attributes
Event data object schema.
Event data object schema for customer.confirmed.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Total number of redemptions made by the customer.
Total number of redemptions that failed.
Total number of redemptions that succeeded.
Total number of redemptions that were rolled back for the customer.
Total number of redemption rollbacks that failed.
Total number of redemption rollbacks that succeeded.
Summary of gift card credits.
Show child attributes
Total amount of gift card credits redeemed by customer. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
Remaining gift card balance across all gift cards. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
Summary of loyalty points.
Show child attributes
Lists details about orders related to the customer. Lists only data for orders with the PAID or FULFILLED status. Data from orders with a CREATED or CANCELED status are not included. The data is updated also when an order changes status.
Show child attributes
The total amount spent by the customer. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
Total number of orders made by the customer.
Average amount spent on orders. total_amount ÷ total_count. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
Amount spent on last order. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
Timestamp representing the date and time of the customer's last order in ISO 8601 format.
"2022-08-30T11:51:08.029Z"
Show child attributes
Customer's loyalty points minus expired for all loyalty cards which the customer has.
Total number of customers referred by the customer.
Contains campaigns with details about point balances and how many customers were referred by the customer.
Show child attributes
Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.
Show child attributes
Remaining point balance in campaign.
Customer's loyalty tier within the campaign.
"ltr_UJ5Q54Q0OvEhua87Qfv2Ki5x"
Number of customers referred by the customer in campaign.
Summary of customer's referrals, in this case, the customer being the referee, i.e. information about the source of referrals and number of times the customer was referred by other customers.
Show child attributes
Total number of times this customer received a referral, i.e. was referred by another customer.
Contains an array of campaigns that served as the source of a referral for the customer.
Show child attributes
Unique campaign ID, assigned by Voucherify.
"camp_rRsfatlwN7unSeUIJDCYedal"
Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer.
"cust_sehkNIi8Uq2qQuRqSr7xn4Zi"
Related object id
"r_0b9d4cc4aa164dd073"
Related object type, i.e. redemption.
Timestamp representing the date and time when the customer was referred in ISO 8601 format.
"2022-08-30T10:19:39.196Z"
The type of the object represented by JSON.
customer The ID of an existing customer that will be linked to redemption in this request.
A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.
Object used to store system metadata information.
Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format.
"2022-08-30T06:32:07.380Z"
Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format.
"2022-08-31T06:32:07.380Z"
Customer's first and last name.
An arbitrary string that you can attach to a customer object.
Customer's email address.
Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.
Deprecated. Customer's birthdate; format YYYY-MM-DD.
Customer's birthdate; format YYYY-MM-DD.
Customer's address.
Show child attributes
City
State
First line of address.
Second line of address.
Country.
Postal code.
A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments.
Contains the source of the object that initiated the event.
Show child attributes
Determines the channel that initiated the event.
USER_PORTAL, API, CLIENT_API, INTERNAL "API"
Determines the API key used to initiate the event.
Timestamp representing the date and time when the customer activity occurred in ISO 8601 format.
"2022-08-30T09:14:07.660Z"
Unique identifier of the request that caused the event.
"v-1f36113948e50fc4ge"
Total number of customer activities.
Was this page helpful?