Mobile App Apis
Use mobile app apis to sync events and customer data with the Growlytics platform.
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.
post
https://dc.growlytics.in
/mcrs_appl_v1
App Launch
The structure of the info object is mentioned below.
Structure of Info object in request body
Example of info object
{
appVersionCode: number, required
appVersionName: string, required
sdkVersion: number, required
// Is First Time
firstTime: boolean, required
deviceType: string, required
deviceManufacturer: string, required
deviceModel: string, required
deviceCarrier: string, required
osName: string, required
osVersion: string, required
platform: string, required, valid('ANDROID', 'IOS')
language: string, required
referrer: string, optional, // Traffic Source
utmInfo: {
us: string, required, optional, allow(null) // UTM source
um: string, required, optional, allow(null) // UTM medium
uc: .string, required, optional, allow(null) // UTM campaign
}
}
{
"appVersionCode": 16,
"appVersionName": "4.2.11",
"osName": "Android",
"osVersion": "Android 9",
"language": "en",
"platform": "ANDROID",
"deviceType": "MOBILE",
"deviceManufacturer": "OnePlus",
"deviceModel": "ONEPLUS A5000",
"deviceCarrier": "Vodafone IN",
"sdkVersion": 1,
"firstTime": false,
"referrer": "https://facebook.com",
"utmInfo": {
"us": "google",
"um": "email",
"uc": "Diwali Campaign"
}
}
Call this API when you want to track a particular event.
post
https://dc.growlytics.in
/msv_cevt
Track Event API
A sample structure of the info object for event tracking is mentioned below.
Structure of Info object in request body
Example of info object
info: [
{
"name": Required, Max 120 characters
"value": Required, null allowed, Max 100 characters
"type": Required, Allowed: 'integer', 'float', 'double', 'long', 'boolean', 'date', 'string'
}
]
info: [
{
"name": "Product Name",
"value": "Macbook Pro 2020",
"type": "string"
},
{
"name": "Category",
"value": "Electronics",
"type": "string"
},
{
"name": "SubCategory",
"value": "Laptops",
"type": "string"
},
{
"name": "Price",
"value": 139000,
"type": "integer"
},
{
"name": "Is Under Warranty",
"value": true,
"type": "boolean"
},
{
"name": "Product Expiry Date",
"value": "2020-01-20 19:14:15",
"type": "date"
}
]
Call this API when a customer logs in to your mobile app.
post
https://dc.growlytics.in
/msv_cs_id
Identify Customer API
A sample structure of the info object for identifying customers is mentioned below.
Structure of Info object in request body
Example of info object
info: [
{
"name": Required, Max 120 characters
"value": Required, null allowed, Max 100 characters
"type": Required, Allowed: 'integer', 'float', 'double', 'long', 'boolean', 'date', 'string'
}
]
info: [
{ name: 'name', type: 'string', value: '-My-Name-' },
{ name: 'email', type: 'string', value: '[email protected]' },
{ name: 'mobile', type: 'string', value: 9876543210 },
{ name: 'Department', type: 'string', value: 'Test Department' },
{ name: 'Test Number', type: 'integer', value: 72305 },
{ name: 'Test Float', type: 'float', value: 7230554.345 },
{ name: 'Test Double', type: 'double', value: 723055465462.345 },
{ name: 'Test Long', type: 'long', value: 723055465462345678 },
{ name: 'Test Boolean', type: 'boolean', value: true },
{ name: 'Test Date', type: 'date', value: '2020-01-01 05:05:05' }
]
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.
post
https://dc.growlytics.in
/logout
Logout User
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.
post
https://dc.growlytics.in
/mpush_token
Save Mobile Push Token
Last modified 10mo ago