Skip to main content

Download

Download the raw analytics data.

We delay the events by 10 minutes, which means the most recent event returned by the api actually occurred at least 10 minutes ago.

curl -X POST 'https://developer.swapcard.com/event-admin/export/analytics' \
-H 'Content-Type: application/json' \
-H 'Authorization: <TOKEN>' \
-d '{
"event_ids": ["RXZlbnRfMQ==", "RXZlbnRfMg=="],
"time_gt": "Time interval" # ex: 2022-09-01T00:00:00.000Z,
"time_lt": "Time interval" # ex: 2022-10-01T00:00:00.000Z
}'

Request body

event_idsstring arrayRequired

The ids of events in which the action occurred.

cursorstring

Starting position for the consecutive calls.

eventsstring array

The list of action types, see table bellow.

group_idsstring array

The list of event groups who triggered the action.

user_idsstring array

The list of users who triggered the action.

exhibitor_idsstring array

The list of exhibitors who triggered the action.

time_gtstring

RFC 3339 date time, after which timestamp the action occurred.

time_ltstring

RFC 3339 date time, after which timestamp the action occurred.

limitinteger

Maximum amount of rows streamed, default is infinite.

{"cursor":"eyJFeGVtcGxlQ3Vyc29yIjogMX0=","time":"2020-09-04T15:00:17.737Z","event":"people_view_search","platform":"web-user","event_id":"RXZlbnRfMQ==","properties":{"query":"market","event_view_id":"RXZlbnRWaWV3XzA="},"user_id":"VXNlcl8w","group_ids":["RXZlbnRHcm91cF8w"]}
{"cursor":"eyJFeGVtcGxlQ3Vyc29yIjogMn0=","time":"2020-09-04T15:00:17.961Z","event":"exhibitor_show","platform":"android","event_id":"RXZlbnRfMQ==","properties":{},"user_id":"VXNlcl8x","group_ids":["RXZlbnRHcm91cF8w","RXZlbnRHcm91cF8x"],"exhibitor_ids":["RXhoaWJpdG9yXzA="],"with_exhibitor_ids":["RXhoaWJpdG9yXzE="]}

Response schema

cursorstring

Stream row cursor, use for consecutive call. When you call the endpoint with this cursor, it will return all consecutive rows.

eventstring

Action name, see the documentation below.

created_atstring

RFC 3339 date time action timestamp.

event_idstring

In which event the action was triggered.

user_idstringNullable

User triggered the action.

exhibitor_idsstring arrayNullable

What exhibitor the user belonged to when they triggered the action.

group_idsstring arrayNullable

What group the user belonged to when they triggered the action.

with_user_idstringNullable

Only in case of performing an action with another user, the interacted with user.

with_exhibitor_idsstring arrayNullable

Only in case of performing an action with another user, what exhibitor the interacted with user belonged to when the action was triggered.

with_group_idsstring arrayNullable

Only in case of performing an action with another user, what group the interacted with user belonged to when the action was triggered.

bodyobjectNullable

Action meta information depending on the event type, see documentation below