Close

User State API

In cases where the User State needs to be created or altered without directly using tracking events, the User State API can be used. This API allows creating new users as well as retrieving and updating User State and User Properties of existing users.

The primitives that create or modify state do not directly change the state of a user, but rather generate an event that causes the event processing engine to perform the operation. This API provides a mean to inject these state creating/altering events permanently into the event stream.

User State: get

Retrieves the current state of the specified user and application.

Request Definition

The API URL is assigned per organization. We use “{orgname}” as an example, when testing use your organization’s assigned subdomain name defined in the Omniata panel.

GET https://{orgname}.engager.omniata.com/user

Parameters

Requests to obtain user states accept the following parameters:

Name Example Description
api_key
mandatory
11111111 Identifies multiple aspects of the events such as the organization and environment.
uid
mandatory
10000001A Uniquely identifies a user within the organization’s UID domain.

Response

The returned answer is a JSON structure with the current user state for the specified user.

Example request:

$ curl "http://{orgname}.engager.omniata.com/user?api_key=11111111&uid=10000001A"

Example response:

{
   "delta_last_session" : 0,
   "datestamp" : 1490349946,
   "manufactured" : 1,
   "first_daynum" : 42756,
   "session_seconds" : 0,
   "flags" : 1,
   "delta_events" : 0,
   "platform_id" : 1,
   "revenue" : 0,
   "daynum" : 42756,
   "purchases" : 0,
   "delta_session_count" : 0,
   "birth_daynum" : 0,
   "delta_gifts" : 0,
   "session_bitmap" : 1,
   "uid_domain_id" : 1,
   "delta_ad_impressions" : 0,
   "gender" : "u",
   "ad_impressions" : 0,
   "delta_session_seconds" : 0,
   "acquisition_cost" : 0,
   "duid" : 0,
   "level_type_0" : 0,
   "events" : 0,
   "environment_id" : 3,
   "project_id" : 2,
   "session_count" : 0,
   "uuid" : 0,
   "purchase_bitmap" : 0,
   "access_src_id" : 0,
   "delta_purchases" : 0,
   "organization_id" : 118,
   "funnel_bitmap_0" : 0,
   "last_daynum" : 42756,
   "country" : "**",
   "version" : 1,
   "last_session_start" : 0,
   "uid" : "11111111",
   "usr_src_id" : 0,
   "funnel_bitmap_1" : 0,
   "delta_revenue" : 0,
   "level_type_1" : 0,
   "ipaddr" : "",
   "last_event_time" : 0,
   "usr_created_at" : "1490349946"
}

This article was last updated on March 30, 2017 13:28. If you didn't find your answer here, search for another article or contact our support to get in touch.