Events API Documentation

Create Recipient Event

Use the API to create a recipient event for tracking customer interactions and behaviors.

[POST]
https://api-eu1.stannp.com/v1/recipientEvents/create

Parameters

ParameterDetailsDescription
recipient_id
body str required
An id of the recipient. This needs to be the recipient_id or the alternative reference id which can be used to match an id from a different system.
name
body str required
Name the event. For example: PURCHASE, SIGNUP, PAGE_VIEW, PRODUCT_VIEW, PRODUCT_TO_BASKET.
value
body str optional
Add value information. For example, the value of the purchase or the product name.
conversion
body bool optional
True or false. Is this a conversion event (e.g., purchasing or a signup)? Defaults to false.
data
body str optional
Any extended data you wish to store about this event for automation tasks or dynamic templating.
ref
body str optional
Can be a campaign reference id or a mailpiece reference id. If left empty, we will use any recent communication to allocate as a reference.

Request Example

        curl -X POST "https://api-eu1.stannp.com/v1/recipientEvents/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "PURCHASE",
    "value": "24.99",
    "conversion": true,
    "recipient_id": "12345"
  }'
    

Response Example

{
  "success": true,
  "data": 266
}