Mobile App Apis
Use mobile app apis to sync events and customer data with the Growlytics platform.
App Launch API
Call this api everytime when app is launched. This API will require a device id. Pass null if you don't have the device id (case when the app launched for the first time). If you won't pass the device id, this API will return a newly generated device id in response. Store that device id locally for all subsequest requests.
App Launch
POST
https://dc.growlytics.in/mcrs_appl_v1
Headers
Name | Type | Description |
---|---|---|
x-growlytics-key | string | Growlytics Api key. |
Request Body
Name | Type | Description |
---|---|---|
timestamp | number | Event time. Unix Timestamp in milli seconds. |
info | object | A JSON with device details like device type, app version etc. Structure of the info is mentioned below. |
did | string | Device id. If device id is specified, app launch event will be tracked against given device id. If device id not specified, a new device profile will be created and device profile id will be returned in response to use it for next requests. |
The structure of the info object is mentioned below.
Event Tracking API
Call this API when you want to track a particular event.
Track Event API
POST
https://dc.growlytics.in/msv_cevt
Use this API to track events from your mobile app.
Headers
Name | Type | Description |
---|---|---|
x-growlytics-key | string | Growlytics API key. |
Request Body
Name | Type | Description |
---|---|---|
did | string | Device id. Required. |
name | string | Event Name. Required, Max 120 characters. |
timestamp | number | Unix timestamp in milli-seconds. Required.. 13 digits. |
info | array | List of event attributes. Detailed structure of the array is mentioned below seperetely. |
A sample structure of the info object for event tracking is mentioned below.
Customer Login API
Call this API when a customer logs in to your mobile app.
Identify Customer API
POST
https://dc.growlytics.in/msv_cs_id
Headers
Name | Type | Description |
---|---|---|
x-growlytics-key | string | Growlytics API Key. |
Request Body
Name | Type | Description |
---|---|---|
did | string | Device id. Required. |
clientCustomerId | string | Customer identifier of your system/app. For example, if you are using Shopify, it will be sShopify customer id. |
timestamp | string | Unix timestamp in milliseconds. Required, 13 digits. |
info | array | List of customer attributes. The detailed structure of the array is mentioned below seperetely. |
A sample structure of the info object for identifying customers is mentioned below.
Customer Logout API
Call this API when a customer logs out of the app. Make sure after the logout API is successful, you need to generate a new device id by calling AppLaunched API.
Logout User
POST
https://dc.growlytics.in/logout
Request Body
Name | Type | Description |
---|---|---|
did* | String | Device id. Required. |
Save Mobile Push Token API
Call this API when customer subscribes to push notifications. You will need to pass the device id which you have got in the app launch API response.
Save Mobile Push Token
POST
https://dc.growlytics.in/mpush_token
Use this API to save the mobile push firebase token
Headers
Name | Type | Description |
---|---|---|
x-growlytics-key | string | Growlytics API key. |
Request Body
Name | Type | Description |
---|---|---|
did | string | Device id. Required. |
type | string | Type of token. Valid values are "fcm" and "apns". |
token | string | FCM or APNS Token |
timestamp | number | Unix timestamp in milliseconds. Required, 13 digits. |
Last updated