Push Notification Service
Validic allows our Enterprise customers to register for Push Notification service for near-real-time data update notifications and optimal resource use. Enterprise customers may have one or more Push Notification URLs set. To do so, contact us at support@validic.com to set up Push Notification service for your account.
Each Push Notification sent out may include multiple items corresponding to activities now available for retrieval from the Validic API. Each item inside a Push Notification includes the necessary elements to construct an API call to retrieve a particular activity data.
Once set, Validic will begin pushing data to your Push Notification URL via a POST request:
HTTP
POST http://{YOUR_PUSH_NOTICATION_URL}
JSON
{
"data":[
{
"_id":"51552cd7fded0807c4000017",
"activity_type":"fitness",
"activity_date":"2013-10-08T19:07:01+00:00",
"source":"sample_app"
},
...
]
}
Return Value | Type | Description |
---|---|---|
_id | String | Validic ID of the user |
activity_type | String | Type of activity data corresponding to one Validic API endpoint |
activity_date | String | Timestamp for the measurement set |
source | String | The short name of the application that recorded the activity |
Upon receipt of a Push Notification, you may begin fetching new data from the API through a GET Request using the data parameters from the Push Notification:
Sample Request
GET https://api.validic.com/v1/organizations/{ORGANIZATION_ID}/users/{USER_ID}/{ACTIVITY_TYPE}.json?access_token={ORGANIZATION_ACCESS_TOKEN}&start_date={ACTIVITY_DATE}&end_date={ACTIVITY_DATE}&source={SOURCE}
Sample Response