Marketplace Reporting API

Introduction

This article relates to the Marketplace Rest API. This API allows you to receive a breakdown of performance data by Apps, Spots, Ad Units and Countries. 

Authentication

Set out below are the details of how to obtain the required credentials for authentication for the Marketplace Rest API.

Obtaining OAuth Credentials

To secure your information, Fyber uses the OAuth1.0 authentication protocol and two-legged OAuth (not three-legged). Using two-legged OAuth, there is no need for an access token. Instead, just add the consumer key and consumer secret to your OAuth client and execute your request. For more information, click here

Obtaining the Reporting API Keys

To obtain the Publisher ID, Consumer Key and Consumer Secret:

  1. Enter the "User Profile" section in top of left of your account
2ece9a2-Screen_Shot_2020-01-12_at_13.44.39.png
  1. The details can be found at the bottom of the window.

Sample API Request

The following parameters must be included in the API Request.

Parameter Description
publisherId Publisher ID from the Revenue Desk Console
startDateEpoch Start date of the report in epoch format
endDateEpoch End date of the report in epoch format
oauth_consumer_key Consumer Key from the Revenue Desk Console
oauth_signature Computed OAuth 1.0 OAuth signature
Endpoint
https://revenuedesk.fyber.com/iamp/services/performance/{{publisherId}}/vamp/{{startDateEpoch}}/{{endDateEpoch}}?oauth_consumer_key={{oauth_consumer_key}}&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1578318569&oauth_nonce=zu0325ETTem&oauth_version=1.0&oauth_signature={{oauth_signature}}
Required Headers
Content-type=application/json
Accept=application/json

Response

The data returned is per ad unit.

The response itself is first broken down to apps and spots, then ad units with the various response parameters.

A publisher can have a certain number of apps, each app with a different number of spots with various units under those spots.

The API Response is structured so that each parameter is placed under its parent. The top level information is the Publisher ID. Under the Publisher ID is App ID followed by the Spot ID and then, Unit ID for each App.

The Unit ID object contains all the requested parameters such as Country, Content Name, Clicks and CTR etc. The Unit ID is represented as the Content ID in the response.

Parameter Type Default Description
date Unix timestamp Null Representing a day in the date range
country 2-letter string Null 2 letter country code
publisherId Number Null Your Fyber Publisher ID
applicationName String Null Human-readable app name as entered in the Create App form
contentId Number Null Numeric ID of the Ad Unit (aka Ad Unit ID)
contentName String Null The AppID from the Fyber Revenue Desk
distributorName String Null Platform like “iOS” or “Android”
contentCategories List Null List of category Name & ID
adRequests Number Null Number of ad requests
impressions Number Null Number of impressions
fillRate Number Null The fill rate calculated by Impressions/AdRequests * 100
clicks Number Null Number of clicks
ctr Number Null Click through rate – calculated by click/impressions * 100
ecpm Number Null Effective CPM Calculated by Revenue/Impressions * 1000
revenue Number Null Amount of revenue

The API returns the requested data, as follows:

JSON
{
    "publisherId": 1,
    "apps": [
        {
            "appId": "1",
            "spots": [
                {
                    "spotId": "1",
                    "units": [
                        {
                            "date": 1500940800,
                            "country": "US",
                            "contentId": 1,
                            "spotId": "",
                            "contentName": "Content Name",
                            "applicationName": "Application Name",
                            "distributorName": "iPhone",
                            "contentCategories": [],
                            "adRequests": 2611,
                            "impressions": 1,
                            "fillRate": 0.00038299502106472615,
                            "clicks": 0,
                            "ctr": 0,
                            "ecpm": 0.7,
                            "revenue": 0.0007
                        }
                    ]
                },
                {
                    "spotId": "2",
                    "units": [
                        {
                            "date": 1500854400,
                            "country": "RU",
                            "contentId": 2,
                            "spotId": "",
                            "contentName": "Content Name 2",
                            "applicationName": "Application Name 2",
                            "distributorName": "iPhone",
                            "contentCategories": [],
                            "adRequests": 5,
                            "impressions": 0,
                            "fillRate": 0,
                            "clicks": 0,
                            "ctr": 0,
                            "ecpm": 0,
                            "revenue": 0
                        }
                    ]
                }
            ]
        }
    ]
}
 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request