> ## Documentation Index
> Fetch the complete documentation index at: https://voucherify-pz-test.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

## Customer With Summary Loyalty Referrals

All of:

1. ### Customer Response Data

   | Attributes               | Description                                                                                                                                                                                                                                            |
   | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
   | id`string`               | The ID of an existing customer that will be linked to redemption in this request.                                                                                                                                                                      |
   | source\_id`string`       | 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. |
   | summary                  | [Customer Summary](#customer-summary)                                                                                                                                                                                                                  |
   | loyalty                  | [Customer Loyalty](#customer-loyalty)                                                                                                                                                                                                                  |
   | referrals                | [Customer Referrals](#customer-referrals)                                                                                                                                                                                                              |
   | system\_metadata`object` | Object used to store system metadata information.                                                                                                                                                                                                      |
   | created\_at`string`      | Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format.**Example:**2022-08-30T06:32:07.380Z                                                                                                 |
   | updated\_at`string`      | Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format.**Example:**2022-08-31T06:32:07.380Z                                                                                                 |
   | assets`object`           | Contains information about the customer's cockpit.Attributes	Descriptioncockpit\_urlstring&#xA;&#xA;Customer's cockpit URL address.                                                                                                                    |
   | object`string`           | The type of the object represented by JSON.Available values: `customer`                                                                                                                                                                                |

2. [Customer Base](#customer-base)

## Customer Summary

| Attributes  | Description                                                        |
| ----------- | ------------------------------------------------------------------ |
| redemptions | See: [Customer Summary Redemptions](#customer-summary-redemptions) |
| orders      | See: [Customer Summary Orders](#customer-summary-orders)           |

## Customer Loyalty

| Attributes                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| points`integer`              | Customer's loyalty points minus expired for all loyalty cards which the customer has.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| referred\_customers`integer` | Total number of customers referred by the customer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| campaigns`object`            | Contains campaigns with details about point balances and how many customers were referred by the customer.Attributes	Description\[propertyName]object&#xA;&#xA;Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.&#xA;&#xA;Attributes	Descriptionpointsinteger	&#xA;&#xA;Remaining point balance in campaign.&#xA;&#xA;&#xA;loyalty\_tierstring	&#xA;&#xA;Customer's loyalty tier within the campaign.&#xA;&#xA;Example:&#xA;&#xA;ltr\_UJ5Q54Q0OvEhua87Qfv2Ki5x&#xA;&#xA;&#xA;referred\_customersinteger	&#xA;&#xA;Number of customers referred by the customer in campaign. |

## Customer Referrals

| Attributes       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| total`integer`   | Total number of times this customer received a referral, i.e. was referred by another customer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| campaigns`array` | Contains an array of campaigns that served as the source of a referral for the customer.Array of:### Customer Referrals Campaigns ItemAttributes	Descriptioncampaign\_idstring&#xA;&#xA;Unique campaign ID, assigned by Voucherify.&#xA;&#xA;Example:&#xA;&#xA;camp\_rRsfatlwN7unSeUIJDCYedal&#xA;&#xA;&#xA;referrer\_idstring	&#xA;&#xA;Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer.&#xA;&#xA;Example:&#xA;&#xA;cust\_sehkNIi8Uq2qQuRqSr7xn4Zi&#xA;&#xA;&#xA;related\_object\_idstring	&#xA;&#xA;Related object id&#xA;&#xA;Example:&#xA;&#xA;r\_0b9d4cc4aa164dd073&#xA;&#xA;&#xA;related\_object\_typestring	&#xA;&#xA;Related object type, i.e. redemption.&#xA;&#xA;&#xA;datestring	&#xA;&#xA;Timestamp representing the date and time when the customer was referred in ISO 8601 format.&#xA;&#xA;Example:&#xA;&#xA;2022-08-30T10:19:39.196Z |

## Customer Base

| Attributes              | Description                                                                                                                                                                                                                                                                                                                                                                          |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| name`string`            | Customer's first and last name.                                                                                                                                                                                                                                                                                                                                                      |
| description`string`     | An arbitrary string that you can attach to a customer object.                                                                                                                                                                                                                                                                                                                        |
| email`string`           | Customer's email address.                                                                                                                                                                                                                                                                                                                                                            |
| phone`string`           | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.                                                                                                                                                                                                                                                                 |
| birthday`string`        | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~.                                                                                                                                                                                                                                                                                                                           |
| birthdate`string`       | Customer's birthdate; format YYYY-MM-DD.                                                                                                                                                                                                                                                                                                                                             |
| address`object`, `null` | Customer's address.Attributes	Descriptioncitystring&#xA;&#xA;City&#xA;&#xA;&#xA;statestring	&#xA;&#xA;State&#xA;&#xA;&#xA;line\_1string	&#xA;&#xA;First line of address.&#xA;&#xA;&#xA;line\_2string	&#xA;&#xA;Second line of address.&#xA;&#xA;&#xA;countrystring	&#xA;&#xA;Country.&#xA;&#xA;&#xA;postal\_codestring	&#xA;&#xA;Postal code.                                        |
| metadata`object`        | 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. |

## Customer Summary Redemptions

| Attributes                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| total\_redeemed`integer`            | Total number of redemptions made by the customer.                                                                                                                                                                                                                                                                                                                                                                                                  |
| total\_failed`integer`              | Total number of redemptions that failed.                                                                                                                                                                                                                                                                                                                                                                                                           |
| total\_succeeded`integer`           | Total number of redemptions that succeeded.                                                                                                                                                                                                                                                                                                                                                                                                        |
| total\_rolled\_back`integer`        | Total number of redemptions that were rolled back for the customer.                                                                                                                                                                                                                                                                                                                                                                                |
| total\_rollback\_failed`integer`    | Total number of redemption rollbacks that failed.                                                                                                                                                                                                                                                                                                                                                                                                  |
| total\_rollback\_succeeded`integer` | Total number of redemption rollbacks that succeeded.                                                                                                                                                                                                                                                                                                                                                                                               |
| gift`object`                        | Summary of gift card credits.Attributes	Descriptionredeemed\_amountinteger&#xA;&#xA;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.&#xA;&#xA;&#xA;amount\_to\_gointeger	&#xA;&#xA;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. |
| loyalty\_card`object`               | Summary of loyalty points.Attributes	Descriptionredeemed\_pointsinteger&#xA;&#xA;Total number of loyalty points redeemed by the customer.&#xA;&#xA;&#xA;points\_to\_gointeger	&#xA;&#xA;Sum of remaining available point balance across all loyalty cards.                                                                                                                                                                                         |

## Customer Summary Orders

| Attributes                   | Description                                                                                                                                                            |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| total\_amount`integer`       | 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\_count`integer`        | Total number of orders made by the customer.                                                                                                                           |
| average\_amount`integer`     | 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`. |
| last\_order\_amount`integer` | Amount spent on last order. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.                                     |
| last\_order\_date`string`    | Timestamp representing the date and time of the customer's last order in ISO 8601 format.**Example:**2022-08-30T11:51:08.029Z                                          |
