v1

latestOpenAPI 3.0.12026-07-24116117186.3 KB
Deprecated

Generate events v1

The method is used for generating events in the account to be used for starting a workflow or being taken into account for segmentation.<br/>Max. size of content for events sent in the request body is 20 kB.<br/>To learn more, read <a href="https://docs.esputnik.com/docs/sending-orders-via-api">Order management via events.</a>

post/api/v1/event

Request body

eventTypeKeystring required

Event type ID key. If no event type exists with this key, a new event is created.<br> All characters are allowed except < ; ’ \ / | " ` ' ^ ? ! , > <br/>Max length: 100 symbols

keyValuestring

Event key. Determines event uniqueness.<br> The key must contain a unique value for each contact (for example, email, phone number, external contact id, etc.)<br> If this parameter is not set, params must contain one of the following contact identifiers:<br/>- contactId <br/>- externalCustomerId <br/>- email <br/>- phone <br/>- pushToken: web or mobile <br/>All characters are allowed except the following ones < ; ’ \ / | " ` ' ^ ? ! , > <br/>Max length: 300 symbols

Example request

{
  "eventTypeKey": "abandonedCart",
  "keyValue": "contact@mail.com",
  "params": [
    "discount",
    "12%"
  ]
}