[Legacy] Publisher APIs

An Introduction

The Fyber Revenue Desk provides all of the information you need at a glance, but for those who want more programmatic control over the data, Fyber provides a few REST APIs.

These APIs provide real-time access to a variety of data about your apps and sites. To access these APIs, you will need to perform the following steps:

  1. Become a Fyber publisher.
  2. Enable Publisher Reports on your account.
  3. Make the appropriate calls to the desired API endpoints.

Let's look at these steps in more detail.

Step 1: Becoming a Fyber Publisher

The first step required to become a Fyber Marketplace publisher is to register for a Fyber Marketplace account, click here for details how to do this.

From there, you must create an App, for any apps through which you want to serve ads.

 

Step 2: Enable Publisher Reports

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.

Note

To obtain the consumer key, consumer secret and publisher ID, please enter the "User Profile" section located in the dropdown on the top of left of your account, under your username.send an email to your Sales Manager/Sales Engineer.

 
The Reporting and Publishers APIs

The Reporting API enables you to retrieve information on available platforms, apps, and performance.
The available APIs include:

  • Get Apps Performance
  • Get Available Platforms
  • Get Available App Categories
  • Get Available Age Groups
  • Get Available Apps
 

Return Codes

All the above APIs return one of the following 3 return codes (unless stated otherwise in the specific API).

Return Code Description
200 – Success This return code indicates that the request was processed properly.
404 – BAD REQUEST This return code indicates a parameter format mismatch.
500 – SERVER EXCEPTION This return code indicates an exception on the server, or a problem communicating with the server, such as a connection failure.

Now let's look at the actual APIs. 

Get Apps Performance

The Get Apps Performance API provides a comprehensive summary of the performance for each of the apps associated with this publisher-id over the requested date range.

Request Example (REST) – GET Method
https://console.inner-active.com/iamp/services/performance/publisher/{publisher-id}/{start-date}/{end-date}

Request Parameters

Required Headers in the Request

Parameter Type Required Default Description
publisher-id Number Required - Your Fyber Publisher ID
Start-date Date Required - Start date of the report, in Unix timestamp format
End-date Date Required - End date of the report, in Unix timestamp format
 

Required Headers

Text
Content-type=application/json
Accept=application/json
 

Response Parameters

The API returns the data per app, per country per day for the full date range sent in the request.

The parameters are as follows:

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 The AppID from the Fyber Revenue Desk
contentId Number Null Numeric ID of the Ad Unit (aka Ad Unit ID)
contentName String Null Human-readable app name as entered in the Create App form
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
 

Response Example

JSON
[
{
"Date":1346284800;
"country":"ID",
"publisherId":2063,
"applicationName": "Publisher_UserAppName_Platform",
"contentId":5187,
"contentName":"contentName",
"distributorName":"iOS",
"contentCategories":[{"name":"lifestype","id":5}]
"adRequests": 50094,
"impressions": 39469,
"fillRate": 78.79,
"clicks": 2683,
"ctr": 6.7977,
"ecpm": 1.171045,
"Revenue":23.15,                                                                          
},
{
"Date":1346284800;
"country":"ID",
"publisherId":2063,
"applicationName": "Publisher_UserAppName_Platform",
"contentId":5187,
"contentName":"contentName",
"distributorName":"iOS",
"contentCategories":[{"name":"lifestype","id":5}],
"adRequests": 40034,
"impressions": 28305,
"fillRate": 77.65,
"clicks": 1603,
"ctr": 6.5434,
"ecpm": 1.171045,
"revenue":19.15,                                                                           
 }
.
.
.
]
 

Get Available Platforms

The Get Available Platforms API provides a list of all platforms supported by Fyber.

Request Example (REST) – GET Method
https://console.inner-active.com/iamp/services/contents/publisher/{publisher-id}/platforms

Request Parameters

Parameter Type Required Default Description
publisher-id Number Required - Your Publisher ID

Required Headers

Text
Content-type=application/json
Accept=application/json

Response Parameters

The API returns a collection of the available platforms supported by Fyber. The parameters are as follows:

Parameter Type Default Description
Key String Null The available platforms (Android, iPhone, iPad...)
Id Number Null The Fyber internal platform id
 
Response Example
JSON
[
{"key":"Android","id":1},
{"key":"iPhone",id":2},
{"key":"iPad","id":3},
{"key":"Nokia","id":4},
{"key":"BB","id":5},
{"key":"Bada","id":6},
{"key":"WP7","id":7},
{"key":"other","id":8}
]

Get Available App Categories

The Get Available App Categories API provides a list of categories related to this publisher-id.

Request Example (REST) – GET Method
https://console.inner-active.com/iamp/services/contents/publisher/{publisher-id}/contentCategories

Request Parameters

Parameter Type Required Default Description
publisher-id Number Required - Your Publisher ID

Required Headers

Text
Content-type=application/json
Accept=application/json

Response Parameters

The API returns a collection of the App categories related to the specific publisher-Id. The parameters are as follows:

Parameter Type Default Description
name String Null The category name
id Number Null The Fyber internal category-Id

Example

JSON
[
{"name": "Arcade and Action","id": 14},
{"name": "Brain and Puzzles","id": 15},
{"name": "Business","id": 26},
{"name": "Cards and Casino","id": 16},
{"name": "eBooks","id": 23},
{"name": "Education","id": 31},
{"name": "Entertainment","id": 17},
{"name": "Lifestyle","id": 28},
{"name": "Music","id": 18},
{"name": "Navigation and Maps","id": 25},
{"name": "News and Info","id": 19},
{"name": "Social and IM","id": 20},
{"name": "Soundboard","id": 30},
{"name": "Sports","id": 21},
{"name": "Tools","id": 22},
{"name": "Wallpaper","id": 29}
]

Get Available Age Groups

The Get Available Age Groups API provides a list of categories related to the specific publisher-Id.

Request Example (REST) – GET Method
https://console.inner-active.com/iamp/services/contents/publisher/{publisher-id}/ageGroups

Request Parameters

Parameter Type Required Default Description
publisher-id Number Required - Your Publisher ID

Required Headers

Text
Content-type=application/json
Accept=application/json

Response Parameters

Parameter Type Default Description
id Number Null The Fyber internal age group-id
From Number Null The lower end of the age group
To Number Null The higher end of the age group
DisplayName String Null The display string representing the age group (e.g. 26-34)
Value String Null The value representing the age group (e.g. 26-34)

Response Example

JSON
[
  {
    "value": "All",
    "id": 8,
    "DisplayName": "-2147483648-2147483647",
    "from": -2147483648,
    "to": 2147483647
  },
  {
    "value": "12-17",
    "id": 1,
    "DisplayName": "12-17",
    "from": 12,
    "to": 17
  },
  {
    "value": "18-25",
    "id": 2,
    "DisplayName": "18-25",
    "from": 18,
    "to": 25
  },
.
.
.
]
 

Get Available Apps

The Get Available Apps API provides a list of the apps related to the specific publisher id.

Request Example (REST) – GET Method
https://console.inner-active.com/iamp/services/contents/publisher/{publisher-id}

Request Parameters

Parameter Type Required Default Description
publisher-id Number Required - Your Publisher ID

Required Headers

Text
Content-type=application/json
Accept=application/json

Response Parameters

Parameter Type Default Description
publisher-id Number Null Your Fyber publisher ID
AppName String Null The AppID (Publisher_UserAppName_DeviceType)
Content-id Number Null Fyber content ID of your application
UserAppName String Null App name as entered in the 'add app' process
Platform String Null Platform like "iOS", "Android"
Description String Null The description of the app
Categories List Null List of category name and ID
URL String Null The app URL
AgeGroups List Null List of age groups
IsActive Boolean Null The status of the app
UseLocation Boolean Null A true/false value indicating whether the application uses location

Response Example

JSON
[
{
"publisherId":2063,
"appName":"pub_419ba_Android",
"contentId":5187,
"userAppName":"419ba"
"platform":{"key":"Android","id":1},
"description":"Text for the description",
"categories":[{"name":"lifestyle","id":5}],
"url":"http://...",
"ageGroups":[{"id":2,"from":18,"to":25,"displayName:"18-25"},{"id":3,"from":26,"to":34, "displayName:"26-34"}],
"isActive":false,
"useLocation":false
},
{
"publisherId":2063,
"appName":"pub_8e22_Android",
"contentId":5188,
"userAppName":"8e22"
"platform":{"key":"Android","id":1},
"description":"Text for the description",
"categories":[{"name":"lifestyle","id":5}],
"url":"http://...",
"ageGroups":null,
"isActive":true,
"useLocation":false}
]
 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request