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

Request Body

{
    "did": "--device-id--goes-here",
    "sid": "--session id goes here"
}

The structure of the info object is mentioned below.

{
    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
    }
}

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

Request Body

{ success: true }

A sample structure of the info object for event tracking is mentioned below.

info: [
    {
        "name": Required, Max 120 characters
        "value": Required, null allowed, Max 100 characters
        "type": Required, Allowed: 'integer', 'float', 'double', 'long', 'boolean', 'date', 'string'
    }
]

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

Request Body

{ success: true }

A sample structure of the info object for identifying customers is mentioned below.

info: [
    {
        "name": Required, Max 120 characters
        "value": Required, null allowed, Max 100 characters
        "type": Required, Allowed: 'integer', 'float', 'double', 'long', 'boolean', 'date', 'string'
    }
]

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

{
    // Response
}

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

Request Body

{ success: true }

Last updated