Use this endpoint to get a summary of counted events. By default, this endpoint returns data for the last 7 days.
Try it out
- Add the User API key as the Username and leave the Password field blank.
- Click the Base URL dropdown and select the API endpoint URL for your Blueshift region.
- Click Try It.
You can also try the API using Blueshift's API collection in Postman.
API a glance
You can view your event stream on the clickstream page. You will also be able to look at errors and download the error logs.
Sample response and explanation of each component
{
"events_chart_stats": {
"archives": {
},
"error": {
"invalid_user_attributes": [
0,
0,
0
],
"missing_identifier": [
0,
5,
0
]
},
"events": {
"add_to_cart": [
100,
110,
200
],
"subscription_update": [
50,
60,
80
]
},
"timelapse": [
"10/16",
"10/17",
"10/18"
]
},
"stats": {
"add_to_cart": {
"archived": false,
"count": 310,
"display_name": "add_to_cart",
"properties": {
},
"type": "standard"
},
"subscription_update": {
"archived": false,
"count": 190,
"display_name": "subscription_update",
"properties": {
},
"type": "custom_event"
}
},
"status": "ok",
"timestamp_end": "2018-10-18T06:59:59.999Z",
"timestamp_start": "2018-10-16T07:00:00.000Z"
}
The response body contains the following data:
Event count
Returns the count for each event received by Blueshift. The stats
key contains the details on each event. You need to filter for type == standard
or custom_event
.
{
"stats": {
"subscription_update": {
"archived": false,
"count": 190,
"display_name": "subscription_update",
"properties": {
},
"type": "custom_event"
}
}
}
Event distribution count
Returns event count distribution by day. The timelapse
attribute contains the dates in MM/DD format.
{
"events_chart_stats": {
"events"{
"customer_subscription_current_add": [
0,
0,
3
]
},
"timelapse": [
"10/16",
"10/17",
"10/18"
]
}
}
Event processing errors
Returns the error count and also the distribution of error type by day.
{
"stats": {
"missing_identifier": {
"archived": false,
"count": 7,
"display_name": "Missing Identifier",
"properties": {
},
"type": "event_error"
}
}
}
Errors
Here's more information on different event processing errors below.
Error type | Description |
---|---|
es_index_error | Indexing Error. This usually happens when there is a data type mismatch between the event payload and our backend system. For example, you passed a string value for a date parameter. |
event_name_missing | The event is missing the required attribute ('event'). |
event_verification_error | This is applicable only if the event verification feature is enabled. The event signature verification has failed. |
invalid_customer_id | The customer_id is invalid. For example: '0', customer_id greater than 64 characters. |
invalid_device_id | The device is invalid. It does not match the device_id format for the iOS or Android device. |
invalid_email | Email is invalid. |
invalid_event_attributes | There are some invalid attributes in the event payload. For example, event name is greater than 100 characters, some attributes contain script tag etc. |
invalid_product | Product not found in catalog. |
invalid_user_attributes | Payload has invalid user attributes. For example, invalid gender value etc. |
missing_identifier | Missing customer identifier such as a cookie, device_ids, email, email_hash, or retailer_customer_id. |
missing_product | A whitelisted product/catalog event is missing the product/catalog_ids in the payload. |
parsing_error | Blueshift was unable to parse the JSON payload. |
transaction_indexing_error | There was an error while updating the transaction record. |
unknown_error | Some unexpected processing error, contact Blueshift for more information. |
user_lock_error | We were unable to acquire a lock on the user. |
user_not_found_error | The user was not found in our system. |