Create a new event

This endpoint creates a new eTrusted event.

NB: In compliance with GDPR, customers should be given the option to opt-in to receive review invitations from you. Therefore, create events using data of only customers who have opted-in.

Sample request payload in JSON (Click to view)
{
  "type": "delivery",
  "defaultLocale": "de_DE",
  "customer": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "[email protected]",
    "address": "Anystr. 17, 12345, Anycity, Anystate 12345",
    "mobile": "+49123456789",
    "reference": "cus-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx"
  },
  "channel": {
    "id": "chl-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
    "type": "etrusted"
  },
  "transaction": {
    "reference": "order-12345",
    "date": "value goes here"
  },
  "estimatedDeliveryDate": "2017-01-07",
  "products": [
    {
      "gtin": "1234567890123",
      "imageUrl": "https://www.specialbrandshop.com/article123-TS-WH-M/image.jpg",
      "name": "Specialbrand T-Shirt White M",
      "mpn": "23687778",
      "sku": "1234-TS-WH-M",
      "brand": "specialbrand",
      "url": "https://www.specialbrandshop.com/article123-TS-WH-M/"
    }
  ],
  "system": "customer_system_name",
  "systemVersion": "1.0",
  "metadata": {
    "metaKey1": "metaValue1",
    "metaKey2": "metaValue2"
  },
  "createdAt": "2018-02-01T17:09:41.790Z"
}
Body Params
string
required

The event type.
It represents the touchpoint that triggered the event.
You can only use an event type that exists in your eTrusted configuration.

Learn more about event types from our help centre

Also, check out the event type documentation to learn more about the event type API.

In any case please avoid setting the type to "checkout" as this is a reserved type.

string

The default locale for this event.
If set, the default locale determines the language of the invite and the questionnaire that are triggered by the event.
If not set, the channel locale will be used instead.

customer
object
required

The customer object includes all data of the customer who is invited to leave a review.

channel
object
required

This object holds information about the channel associated with the event.

transaction
object
required

The event transaction holds a reference to the transaction, order, process etc. within your own system that triggers the event.

date

The estimated date of the delivery. It is a date in the ISO 8601 and RFC3339 compliant format yyyy-MM-dd. Check the glossary for examples of valid datetime formats.

products
array of objects

This is a list of products.
It contains the products that are associated with the event.
It includes all data needed for product reviews for these products.

products
string
required

This is the system that issues the events API call.
This way you can identify the source system that called the events API.

string
required

This is the version of the source system.

date-time

The date and time when the event was created, in the ISO 8601 and RFC3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ. Check the glossary for examples of valid datetime formats.

Headers
string
required

An OAuth2 authorization header with an access token, see OAuth2

Responses

Language
Credentials
OAuth2
Response
Choose an example:
application/json