Events Create Request Body
Attributes | Description |
---|---|
eventstring | Event name. This is the same name that you used to define a custom event in the Dashboard > Project Settings > Event Schema. |
customer | Customer’s information.Customer |
referralobject | If a conversion event for a referral program is set to a custom event, then you need to send the referral code in the payload to make a record of the conversion event.Attributes Descriptioncodestring A code through which a new visitor has been referred to a service. referrer_idstring Unique ID of the referring person - it is optional and not required if the referral code is provided. Example: cust_Vzck5i8U3OhcEUFY6MKhN9Rv |
loyaltyobject | If an earning rule in a loyalty program is based on a custom event. This objects let’s you specify the loyalty card to which the custom event should be attributed to.Attributes Descriptioncodestring Code of the loyalty card to receive points based on the calculation method defined in the related earning rule. An earning rule is triggered for the loyalty card when the event passed in the event parameter of the request payload gets sent along with this loyalty card code. Example: L-CARD-BUHuH6g |
metadataobject | The metadata object stores all custom attributes assigned to the event. A set of key/value pairs that you can attach to an event object. It can be useful for storing additional information about the event in a structured format. Event metadata schema is defined in the Dashboard > Project Settings > Event Schema > Edit particular event > Metadata property definition. |
Customer
All of:-
Customer Id And Source Id
Attributes Description id string
The ID of an existing customer. 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. - Customer Base
Customer Base
Attributes | Description |
---|---|
namestring | Customer’s first and last name. |
descriptionstring | An arbitrary string that you can attach to a customer object. |
emailstring | Customer’s email address. |
phonestring | Customer’s phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. |
birthdaystring | Deprecated . |
birthdatestring | Customer’s birthdate; format YYYY-MM-DD. |
addressobject , null | Customer’s address.Attributes Descriptioncitystring City statestring State line_1string First line of address. line_2string Second line of address. countrystring Country. postal_codestring Postal code. |
metadataobject | 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. |