Merging pull and push API data

  • Developers

Pull API and Push API provide raw data of installs and in-app events. The APIs have different formats and parameters naming conventions. Some are unique whilst others overlap.

If you are unsure of which method to use to get raw data, see Which AppsFlyer Data API is Best for You.

This article contains the following information:

  • Use cases where format comparison and parameter mapping are required
  • Comparision of the format and parameter naming conventions of the APIs

Use cases

Data availability

Push API requires an API endpoint to receive the payload. Sometimes, the endpoint may not be available, and the payload is not delivered. As a fallback, you can use Pull API to fill in the gap. This requires that you have a mechanism to identify lost payloads and to call the Pull API. 

 Example

You use Push API to store data in your BI systems. Your servers experience a two-minute downtime between 08:30 and 08:32. Push APIs sent during this time are not delivered and are therefore lost. 

To recover data and fill in the missing data gaps, you need to call a Pull API at the end of the day. You examine the Pull API entries to identify entries whose timestamp corresponds to the two-minute downtime. These entries need to be recorded.

Using the mapping between Pull and Push API, you can push the data into your BI system, even if the column names in the table don't match those in Pull API.

Data enrichment

Pull API contains data which is not available in Push API. Use the Pull API to supplement the Push API data.

 Example

You use Push API to store data in your BI systems. You want to supplement each entry in the database with contributor data which is only available in Pull API.

For this purpose, you call Pull API at the end of each day, compare the entries and add contributor data from Pull API entries to their respective entries in the database (created from Push API).

Parameter mapping

The following table compares the format and parameter mapping of the following Pull API raw data reports:

  • Installs: Organic and non-organic
  • In-app events: Organic and non-organic

The table below is also available in CSV format.

Comparing Pull and Push APIParameters Unique to Push API
Pull API Push API
Ad af_ad
Ad ID af_ad_id
Ad Type af_ad_type
Adset af_adset
Adset ID af_adset_id
Advertising ID advertising_id
Amazon Fire ID N/A
Android ID android_id
App ID app_id
App Name app_name
App Version app_version
AppsFlyer ID appsflyer_device_id
Attributed Touch Time attributed_touch_time
Attributed Touch Type attributed_touch_type
Attribution Lookback N/A
Bundle ID bundle_id
Campaign campaign
Campaign ID af_c_id
Carrier carrier
Channel af_channel
City city
Contributor 1 Campaign N/A
Contributor 1 Match Type N/A
Contributor 1 Media Source N/A
Contributor 1 Partner N/A
Contributor 1 Touch Time N/A
Contributor 1 Touch Type N/A
Contributor 2 Campaign N/A
Contributor 2 Match Type N/A
Contributor 2 Media Source N/A
Contributor 2 Partner N/A
Contributor 2 Touch Time N/A
Contributor 2 Touch Type N/A
Contributor 3 Campaign N/A
Contributor 3 Match Type N/A
Contributor 3 Media Source N/A
Contributor 3 Partner N/A
Contributor 3 Touch Time N/A
Contributor 3 Touch Type N/A
Cost Currency af_cost_currency
Cost Model af_cost_model
Cost Value af_cost_value
Country Code country_code
Customer User ID customer_user_id
Device Category N/A
Device Type device_model (Android)
device_type (iOS)
DMA N/A
Event Name

event_name or event_type

If the event is an install:

  • Pull API Event Name is install
  • Push API event_name is null
  • Push API event_type is install

If the event is an in-app event:

  • Pull API Event Name and Push API event_name are the same e.g. af_purchase
Event Revenue revenue_in_selected_currency
Event Revenue Currency currency
Event Revenue USD N/A
Event Source N/A
Event Time event_time
Event Value event_value
Google Play Click Time N/A
Google Play Install Begin Time N/A
Google Play Referrer N/A
HTTP Referrer http_referrer
IDFA idfa
IDFV idfv
IMEI imei
Install App Store N/A
Install Time install_time
IP ip
Is Primary Attribution N/A
Is Receipt Validated N/A
Is Retargeting is_retargeting
Keyword Match Type N/A
Keywords af_keywords
Language language
Match Type N/A
Media Source media_source
Operator operator
Original URL click_url
OS Version os_version
Partner agency
Platform platform
Postal Code N/A
Reengagement Window N/A
Region N/A
Retargeting Conversion Type re_targeting_conversion_type
SDK Version sdk_version
Site ID af_siteid
State N/A
Sub Param 1 af_sub1
Sub Param 2 af_sub2
Sub Param 3 af_sub3
Sub Param 4 af_sub4
Sub Param 5 af_sub5
Sub Site ID N/A
User Agent N/A
WIFI wifi
Was this article helpful?
0 out of 1 found this helpful