v1

latestOpenAPI 3.0.12026-07-243266138.0 KB
Endpoints

Get an event

This endpoint retrieves an eTrusted event by its ID.

It can be used to check if your events has been created correctly after a POST request.

get/events/{eventRef}

Path parameters

eventRefstring required

This is the event ID in eTrusted UUIDformat as a reference. Event references are included in the response when you create an event via POST request.

Headers

Authorizationstring required

An OAuth2 authorization header with an access token, see OAuth2

Response

The event with the ID that equals eventRef.

idstring

The unique identifier of the event.

accountRefstring

The account reference ID the event belongs to

typestring

The event type. It represents the touchpoint that triggered the event. You can only use an event type that exists in your eTrusted configuration.<br> Learn more about event types from our help centre<br> Also, check out the event type documentation to learn more about the event type API.<br> In any case please avoid setting the type to "checkout" as this is a reserved type.

defaultLocalestring

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.

estimatedDeliveryDatestring 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.

systemstring

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

systemVersionstring

This is the version of the source system.

metadataobject

Add more information to your event via the metadata object. This may be anything that you want to track or evaluate.

createdAtstring 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.

Example response

{
  "id": "evt-eacef7fe-5176-47b5-877d-b90a53a1cc68",
  "accountRef": "acc-863c9d8d-1108-4591-868d-5e0aaad26cf4",
  "type": "delivery",
  "defaultLocale": "de_DE",
  "customer": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "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"
  },
  "tracking": {
    "client": "PUBLIC_EVENTS_API",
    "medium": "API"
  },
  "transaction": {
    "reference": "order-12345"
  },
  "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"
}