Skip to main content

Events API (0.2.0)

Download OpenAPI specification:Download

Events

Report Events

Schedules one or more events for processing.

When debug mode is enabled the server will not process events. Debug mode can be used during development or when tracking events is undesirable, for example in a test app connecting to the merchant's production environment.

Also see UTM parameters.

query Parameters
debug
string
Value: "true"

Enable debug mode.

Request Body schema: application/json

A list of events to report and identifiers for the merchant and customer.

merchant_id
required
string

The merchant identifier within Highstreet. This is the same identifier used to construct the middleware API URL.

storefront_id
required
string

The identifier of the storefront within Highstreet. This is the same identifier used as the X-Selected-Storefront header in requests to the middleware.

visitor_id
string

The customer's visitor ID. A visitor ID can be generated through the POST /visitor_id endpoint on the middleware.

session_id
string <uuid>

The customer's session ID. A session ID can be generated by the app as a UUID. Since: 0.2.0.

app_id
string

The bundle ID of the app. Since: 0.3.0.

app_version
string

The version string of the app reporting events. Since: 0.3.0.

app_build
number

The version build number of the app reporting events. Since: 0.3.0.

customer_id
string

Identifier of the currently logged-in customer as returned by the GET /account endpoint under the customer_identifiers object. This should be null if the user is not logged in or there is no customer identifier. Since: 0.3.0.

device_os
string
Enum: "android" "ios"

The device OS version. Since: 0.3.0.

device_os_version
string

The version string of the device OS. Since: 0.3.0.

utm_campaign
string

Value of the utm_campaign query string parameter in case the app was opened with deeplink. Identifies a specific product promotion or strategic campaign. Since: 0.3.0.

utm_content
string

Value of the utm_content query string parameter in case the app was opened with deeplink. Identifies what specifically was clicked to bring the user to the site, such as a banner ad or a text link. It is often used for A/B testing and content-targeted ads. Since: 0.3.0.

utm_medium
string

Value of the utm_medium query string parameter in case the app was opened with deeplink. Identifies what type of link was used, such as cost per click or email. Since: 0.3.0.

utm_source
string

Value of the utm_source query string parameter in case the app was opened with deeplink. Identifies which site sent the traffic, and is a required parameter (when using UTM parameters). Since: 0.3.0.

utm_term
string

Value of the utm_term query string parameter in case the app was opened with deeplink. Identifies search terms. Since: 0.3.0.

required
Array of objects (Event) non-empty

A list of events to report.

Responses

Request samples

Content type
application/json
{
  • "merchant_id": "highstreet-production",
  • "storefront_id": "en-US",
  • "visitor_id": "9787b226-de31-4808-b4b1-378eaa75af0e",
  • "session_id": "26083842-9a6f-4916-b237-5c6bb345f0a4",
  • "app_id": "com.highstreetapp.rosies",
  • "app_version": "1.70.0",
  • "app_build": 202,
  • "customer_id": "44992",
  • "device_os": "android",
  • "device_os_version": "11",
  • "utm_campaign": "spring_sale",
  • "utm_content": "textlink",
  • "utm_medium": "cpc",
  • "utm_source": "Google",
  • "utm_term": "running+shoes",
  • "events": [
    ]
}

Changelog

[Unreleased]

Added

  • Adds the app_id, app_version, app_build, customer_id, device_os, device_os_version and UTM parameter fields to the request body.
  • Adds the event type metadata_change.

[0.2.0] - 2020-05-20

Added

  • Adds the session_id field to the request body
  • Adds an id field to each event in the request body

[0.1.0] - 2019-04-10

Added

  • Report Events endpoint

[Unreleased]

Added

  • Adds the app_id, app_version, app_build, customer_id, device_os, device_os_version and UTM parameter fields to the request body.
  • Adds the event type metadata_change.

[0.2.0] - 2020-05-20

Added

  • Adds the session_id field to the request body
  • Adds an id field to each event in the request body

[0.1.0] - 2019-04-10

Added

  • Report Events endpoint