User Events Report
This endpoint provides information about user application usage events within a given time period.
Description
The User Events report helps you track all the times a user has used the application based on the consulted dates. This is useful for monitoring user activity patterns and application usage frequency.
Endpoint
POST /api/v3/business/report/event/user
Authentication
This endpoint requires authentication using a Bearer token.
Headers
| Key | Value |
|---|---|
| Authorization | Bearer Token |
Request Parameters
Body
{
"customerId": 2847, // Optional - Customer ID
"refId": "CB6150", // Red User ID
"from": "2025-06-01T00:00:00.000Z", // Start date and time (UTC)
"until": "2025-06-23T23:59:00.000Z" // End date and time (UTC)
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| customerId | number | No | Customer ID for filtering events |
| refId | string | Yes | Red User ID for identifying the user |
| from | string | Yes | Start date and time in ISO 8601 format (UTC) |
| until | string | Yes | End date and time in ISO 8601 format (UTC) |
Response
The response is an array of user event records.
Success Response (200 OK)
[
{
"id": 625317,
"dateEvent": "2025-06-04T20:58:33.000Z"
},
{
"id": 625930,
"dateEvent": "2025-06-04T21:39:46.000Z"
},
{
"id": 625506,
"dateEvent": "2025-06-04T21:07:32.000Z"
},
{
"id": 626384,
"dateEvent": "2025-06-04T23:33:57.000Z"
},
{
"id": 663748,
"dateEvent": "2025-06-10T18:49:31.000Z"
}
]
Response Fields
| Field | Type | Description |
|---|---|---|
| id | number | Unique identifier for the user event record |
| dateEvent | string | Timestamp when the user used the application (ISO 8601) |
Example Usage
cURL
curl -X POST \
'{{Url_Base}}/api/v3/business/report/event/user' \
-H 'Authorization: Bearer your_token_here' \
-H 'Content-Type: application/json' \
-d '{
"customerId": 2847,
"refId": "CB6150",
"from": "2025-06-01T00:00:00.000Z",
"until": "2025-06-23T23:59:00.000Z"
}'
JavaScript
const response = await fetch('{{Url_Base}}/api/v3/business/report/event/user', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_token_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customerId: 2847,
refId: 'CB6150',
from: '2025-06-01T00:00:00.000Z',
until: '2025-06-23T23:59:00.000Z'
})
});
const data = await response.json();
Error Responses
400 Bad Request
{
"error": "Invalid date range or missing required parameters"
}
401 Unauthorized
{
"error": "Invalid or missing authentication token"
}
404 Not Found
{
"error": "User not found"
}
500 Internal Server Error
{
"error": "Internal server error"
}