Publisher API

From docs.airnowmedia.com
Jump to: navigation, search

Contents

Publisher API Documentation

Preface

This document provides information required to use Airnow Monetization's Publisher APIs.

Introduction

Airnow Monetization Publisher API has been designed to let publishers manage applications directly with REST APIs.

The following sections include description of entities contained in the APIs and the information required to work with applications. Use cases with sample code for the APIs have also been included.

Authentication

An API Key is required for all inbound API requests. Developers will have to login into their account on Airnow Monetization portal and go to "API" section. Go to the "Generate Open API key section". Press Generate API KEY button to get openapikey.

API Rate Limit for overall APIs is 5000 per day.

Parameters and description

List of mandatory parameters required to create Publisher's applications:

Parameter Name Description Required
appName Application Name yes
appType Application Type - Android Market URL or Off-Market URL yes
appUrl Application URL yes
category Application category - list is included below yes
subCategory Application subcategory - list is included below yes
platformType Platform on which ads need to be targeted. It can be Android, iOS or MobileWeb. yes
pushAds For push ad types with details no
PushAds - targettedUsers Number of users to be targetted no
PushAds - adFrequency This describes how often the ads will be delivered to the users no
PushAds - firstAdDelay Number of days to delay a user's first ad no
iconAds This describes the icon ads details no
iconAds - adsPerUser Maximum number of icon ads per user per month no
smartWall The interstitial(appwallAds, dialogAds, landingPageAds, richMediaFullPageAds, videoAds, overlayAds) ads can be enabled/disabled here no
bannerAds Airnow Monetization Banner Ads automatically mediate between rich media banner ads and static banner ads based on the best yielding ad inventory no
360BannerAds It includes standard and abstract ads, abstract ads can be customized. no
inlineBannerAds It includes bannerAds, 360VideoAds, animatedAds & abstractSmallAds can be customized. no
inlineAds It includes 360VideoAds animatedAds, abstractSmallAds, inlineAppwallAds, inlineDialogAds, inlineLandingpageAds, inlineOverlayAds & inlineStandardbannerAds can be customized. no
adIntervals Control the intervals between the ads. yes
measure What percentage of adtype to be served in custom mode. Mandatory for custom mode. no
orientationControl Display ads in given orientation. Mandatory for custom mode. no
backFill Serves the most profitable ad if demand for pre-selected options is temporary unavailable. Mandatory for custom mode. no
excludeDatingCampaigns Describes whether dating campaigns are to be included or excluded. yes

Application Types

Types
Off-Market URL
Android Market URL

Ad Frequency

Value to be used Description
1 3 Ads/Day
2 2 Ads/Day
3 1 Ad/Day
4 1 Ad in 2 Days
5 1 Ad in 3 Days
6 1 Ad in 4 Days
7 1 Ad in 5 Days
8 1 Ad in 6 Days
9 1 Ad in 7 Days

Sample APIs

The below mentioned sample url will be used for all requests.

Sample Url: http://openapi.airpush.com/<METHOD NAME>?openapikey=<API KEY>&<BODY PARAMETER>

Adding Application

Method Name: addApplication

Body Parameter:

Parameter Name is application and

Value is

   {
      "appName": "New_app_name",
      "appType": "Android Market URL",
      "appUrl": "https://play.google.com/store/apps/details?id=xyz",
      "category": "Automotive",
      "subCategory": "Auto Parts",
      "pushAds": {
                   "targettedUsers": "ALL",
                   "adFrequency": "2",
                   "firstAdDelay": "1"
                 },
      "iconAds": {
                   "adsPerUser": "3"
                 },
      "smartWall": {
                      "appwallAds": "N",
                      "dialogAds": "N",
                      "landingPageAds": "Y",
                      "richMediaFullPageAds": "N",
                      "overlayAds": "Y",
                      "videoAds": "N"
                   },
      "360BannerAds": {
        "1": {
           "maximizerMode": {
               "adIntervals": {
                   "closeInterval": "45",
                   "clickInterval": "45",
                   "adInterval": "45"
               }
             }
           },
         "2": {
           "customMode": {
               "abstract": {
                   "measure": "20%",
                   "orientationControl": "Both",
                   "subTypes": {
                       "animatedAds": "Y",
                       "360VideoAds": "Y",
                       "300*250Ads": "Y"
                   }
               },
               "standard": {
                   "measure": "80%",
                   "orientationControl": "Potrait"
               },
               "adIntervals": {
                   "closeInterval": "30",
                   "clickInterval": "45",
                   "adInterval": "40"
               },
               "backFill": "Y"
            }
         }
      },
      "bannerAds": "Y",
      "inlineBannerAds": {
                          "bannerAds": "N",
                          "360VideoAds": "N",
                          "animatedAds": "Y",
                          "abstractSmallAds": "N"
         },
        "inlineAds": {
                      "360VideoAds": "N",
                      "animatedAds": "N",
                      "abstractSmallAds": "Y",
                      "inlineAppwallAds": "N",
                      "inlineDialogAds": "N",
                      "inlineLandingpageAds": "N",
                      "inlineOverlayAds": "N",
                      "inlineStandardbannerAds": "N",
        },
      "excludeDatingCampaigns": "N"
   }

Success Response format: {"status" => 200, "message" => "You have successfully created your Application with Id as 'appId'. Your API Key is: 'apiKey' And Your Package Name is: 'packageName'"};

Error Response Format: {"status":"<error_code>","message":"<error_message>"}

Notes:

1) The value of 'appUrl' can only be Google Play Url if the appType is 'Android Market URL'. If the appType is 'Off-Market URL', the appUrl can be any Url (not necessarily Google Play Url).

2) The 'targettedUsers' parameter values:

     - 'ALL'     -> When you want your App for All Types of Users.
     - '1 to 99' -> When you give a value between 1 to 99, then it specifies the 'User's inactive for these many day's'

3) The value of 'firstAdDelay' can either be '1' or '0'. (For technical and performance reasons, the maximum ad delay setting is now 1 day)

4) The maximum value for the parameter 'adsPerUser' can be 5.

5) For the 'bannerAds' and the ad types under 'smartWall Ads', Y is for 'enable' and N is for 'disable'.

6) The value N for 'excludeDatingCampaigns' will allow the dating campaigns to get included and vice-versa.

7) In custom mode "backFill" parameter is mandatory and it accepts either "Y"(enable) or "N"(disable).

8) measure can vary from 0% to 100% but sum of abstract and standard measure should be 100%.

9) orientationControl can accept values like "Potrait" or "Landscape" or "Both".

10) subTypes param is mandatory for abstract ad enabling.

11) All the 3 ads need to be passed under subTypes and each can accept value "Y" or "N" which indicated enable or disable respectively. It is mandatory to enable atleast one ad under abstract to have abstract ads.

12) Mentioned "1", "2" inside "360BannerAds" are placement ids. Placement ids can vary from 1 to 100. At a time maximum 5 placement ids can be added.

Editing Application

Method Name: editApplication

Body Parameter:

Parameter Name is application and

Value is

   {
      "appId": "your_appId",
      "appName": "ChangedName",
      "appType": "Off-Market URL",
      "appUrl": "http://example.com",
      "category": "Automotive",
      "subCategory": "Auto Parts",
      "pushAds": {
                    "targettedUsers": "10",
                    "adFrequency": "2",
                    "firstAdDelay": "1"
                 },
       "iconAds": {
                     "adsPerUser": "3"
                  },
       "smartWall": {
                       "appwallAds": "N",
                       "dialogAds": "N",
                       "landingPageAds": "Y",
                       "richMediaFullPageAds": "N",
                       "overlayAds": "Y",
                       "videoAds": "N"
                    },
       "360BannerAds": {
         "2": {
          "maximizerMode": {
              "adIntervals": {
                  "closeInterval": "45",
                  "clickInterval": "45",
                  "adInterval": "45"
              }
            }
          },
          "3": {
          "customMode": {
              "abstract": {
                  "measure": "20%",
                  "orientationControl": "Both",
                  "subTypes": {
                      "animatedAds": "Y",
                      "360VideoAds": "Y",
                      "300*250Ads": "Y"
                  }
              },
              "standard": {
                  "measure": "80%",
                  "orientationControl": "Potrait"
              },
              "adIntervals": {
                  "closeInterval": "30",
                  "clickInterval": "45",
                  "adInterval": "40"
              },
              "backFill": "Y"
            }
          }
        },
        "bannerAds": "Y",
        "inlineBannerAds": {
                            "bannerAds": "N",
                            "360VideoAds": "N",
                            "animatedAds": "Y",
                            "abstractSmallAds": "N"
         },
        "inlineAds": {
                      "360VideoAds": "N",
                      "animatedAds": "N",
                      "abstractSmallAds": "Y",
                      "inlineAppwallAds": "N",
                      "inlineDialogAds": "N",
                      "inlineLandingpageAds": "N",
                      "inlineOverlayAds": "N",
                      "inlineStandardbannerAds": "N",
        },
        "excludeDatingCampaigns": "N"
     }
 

Success Response format: {"status" => 200, "message" => "Your App Id 'appId' has been updated successfully."};

Error Response Format: {"status":"<error_code>","message":"<error_message>"}

Notes:

- You need to specify only those parameters which needs to be updated.

- Edit application based on individual as well multiple placement id. Existing placement id can be edited and new placement id can also be added in editApplication call.

- Can convert maximizer mode to custom mode and vice-versa.

- Edit only subTypes, adIntervals, measures, backFill, orientationControl is possible.

- To enable 360BannerAds, new placement ids has to be added. To disable 360BannerAds, "N" should be passed.

View Application

Method Name: getApplicationDetailsById

Body Parameter:

Parameter Name is application and

Value is

   {
      "applicationId": "your_appId"
   }

Change the status of the Ad Types of your App

The Ad Types under you App can be 'enabled' or 'disabled'.

Method Name: changeAdTypeStatus

Body Parameter:

Parameter Name is application and

Value is

   {
      "appId": "Your_appId",
      "pushAds": "disable",
      "iconAds": "enable",
      "smartWallAds": "enable",
      "bannerAds": "disable",
      "360BannerAds": "enable",
      "inlineBannerAds": "enable",
      "inlineAds": "disable"
   }

Success Response format: {"status" => 200, "message" => "The status of your Application 'appId' has been changed successfully."};

Error Response Format: {"status":"<error_code>","message":"<error_message>"}

Note: The value can either be 'enable' or 'disable'.

Delete Your Application

You can 'delete' your app using this API.


Method Name: deleteApplication

Body Parameter:

Parameter Name is application and

Value is

   {
      "appId": "your_appId_to_be_deleted"
   }

Success Response format: {"status" => 200, "message" => "Your Application 'appId' has been deleted successfully."};

Error Response Format: {"status":"<error_code>","message":"<error_message>"}

Note: Once the App is deleted, it cannot be enabled. Only 'paused' applications can be 'enabled'.

Change status of Your Application

You can change the status of your app using this API.


Method Name: changeApplicationStatus

Body Parameter:

Parameter Name is application and

Value is

   {
       "appId": "<APP ID>",
       "status": "pause or resume"
   }

Success Response format: {"status" => 200, "message" => "The status of your application has been changed successfully"};

Error Response Format: {"status":"<error_code>","message":"<error_message>"}

View Your Application Details

View your app details using this API. You just need to specify method name along with openapikey to get data.

Method Name: getApplicationsForUser

Sample url: http://openapi.airpush.com/getApplicationsForUser?openapikey=xyz

Success Response Format: Lists all the application details under the user.

Error Response Format: {"status":"<error_code>","message":"<error_message>"}


Application Categories

Application Categories subCategories
Arts & Entertainment Books & Literature
Celebrity Fan/Gossip
Fine Art
Humor
Movies
Television
Automotive Auto Parts
Auto Repair
Buying/Selling Cars
Car Culture
Certified Pre-Owned
Convertible
Coupe
Crossover
Diesel
Electric Vehicle
Hatchback
Hybrid
Luxury
MiniVan
Mororcycles
Off-Road Vehicles
Performance Vehicles
Pickup
Road-Side Assistance
Sedan
Trucks & Accessories
Vintage Cars
Wagon
Business Advertising
Agriculture
Biotech/Biomedical
Business Software
Construction
Forestry
Government
Green Solutions
Human Resources
Logistics
Marketing
Metals
Careers Career Advice
Career Planning
College
Financial Aid
Job Fairs
Job Search
Nursing
Resume Writing/Advice
Scholarships
Telecommuting
U.S. Military
Dating Dating
Education 7-12 Education
Adult Education
Art History
Colledge Administration
College Life
Distance Learning
English as a 2nd Language
Graduate School
Homeschooling
Homework/Study Tips
K-6 Educators
Language Learning
Private School
Special Education
Studying Business
Family & Parenting Adoption
Babies & Toddlers
Daycare/Pre School
Eldercare
Family Internet
Parenting - K-6 Kids
Parenting teens
Pregnancy
Special Needs Kids
Finance Personal Beginning Investing
Credit/Debt & Loans
Financial News
Financial Planning
Hedge Fund
Insurance
Investing
Mutual Funds
Options
Retirement Planning
Stocks
Tax Planning
Food & Drink American Cuisine
Barbecues & Grilling
Cajun/Creole
Chinese Cuisine
Cocktails/Beer
Coffee/Tea
Cuisine-Specific
Desserts & Baking
Dining Out
Food Allergies
French Cuisine
Health/Lowfat Cooking
Italian Cuisine
Japanese Cuisine
Mexican Cuisine
Vegan
Vegetarian
Wine
Games Arcade & Action Games
Board Games/Puzzles
Brain & Puzzle Games
Card Games
Cards & Casino Games
Casual Games
Live Wallpaper Games
Racing Games
Roleplaying Games
Sports Games
Widgets Games
Health & Fitness A.D.D.
AIDS/HIV
Allergies
Alternative Medicine
Arthritis
Asthma
Autism/PDD
Bipolar Disorder
Brain Tumor
Cancer
Cholesterol
Chronic Fatigue Syndrome
Chronic Pain
Cold & Flu
Deafness
Dental Care
Depression
Dermatology
Diabetes
Epilepsy
Exercise
GERD/Acid Reflux
Headaches/Migraines
Heart Disease
Herbs for Health
Holistic Healing
IBS/Crohn's Disease
Incest/Abuse Support
Incontinence
Infertility
Men's Health
Nutrition
Orthopedics
Panic/Anxiety Disorders
Pediatrics
Physical Therapy
Psychology/Psychiatry
Senor Health
Sexuality
Sleep Disorders
Smoking Cessation
Substance Abuse
Thyroid Disease
Weight Loss
Women's Health
Hobbies & Interests Art/Technology
Arts & Crafts
Beadwork
Birdwatching
Candle & Soap Making
Chess
Cigars
Collecting
Comic Books
Drawing/Sketching
Freelance Writing
Genealogy
Getting Published
Guitar
Home Recording
Investors & Patents
Jewelry Making
Magic & Illusion
Needlework
Painting
Photography
Radio
Sci-Fi & Fantasy
Scrapbooking
Screenwriting
Stamps & Coins
Video & Computer Games
Woodworking
Home & Garden Appliances
Entertaining
Environmental Safety
Gardening
Home Repair
Home Theater
Interior Decorating
Landscaping
Remodeling & Construction
Illegal Content Copyright Infringement
Illegal Content
Spyware/Malware
Warez
Law, Gov't & Politics Commentary
Immigration
Legal Issues
Politics
U.S. Government Resources
News International News
Local News
National News
Non-Standard Content Extreme Graphic/Explicit Violence
Hate Content
Incentivized
Pornography
Profane Content
Under Construction
Unmoderated UGC
Pets Aquariums
Birds
Cats
Dogs
Large Animals
Reptiles
Veterinary Medicine
Real Estate Apartments
Architects
Buying/Selling Homes
Religion & Spirituality Alternative Religions
Atheism/Agnosticism
Buddhism
Catholicism
Christianity
Hinduism
Islam
Judaism
Latter-Day Saints
Pagan/Wiccan
Science Astrology
Biology
Botany
Chemistry
Geography
Geology
Paranormal Phenomena
Physics
Space/Astronomy
Weather
Shopping Comparison
Contests & Freebies
Couponing
Engines
Society Divorce Support
Ethnic Specific
Gay Life
Marriage
Senior Living
Teens
Weddings
Sports Auto Racing
Baseball
Bicycling
Bodybuilding
Boxing
Canoeing/Kayaking
Cheerleading
Climbing
Cricket
Figure Skating
Fly Fishing
Football
Freshwater Fishing
Game & Fish
Golf
Horse Racing
Horses
Hunting/Shooting
Inline Skating
Martial Arts
Mountain Biking
NASCAR Racing
Olympics
Paintball
Power & Motorcycles
Pro Basketball
Pro Ice Hockey
Rodeo
Rugby
Running/Jogging
Sailing
Saltwater Fishing
Scuba Diving
Skateboarding
Skiing
Snowboarding
Surfing/Bodyboarding
Swimming
Table Tennis/Ping-Pong
Tennis
Volleyball
Walking
Waterski/Wakeboard
World Soccer
Style & Fashion Accessories
Beauty
Body Art
Clothing
Fashion
Jewelry
Technology & Computing 3-D Graphics
Animation
Antivirus Software
C/C++
Cameras & Camcorders
Cell Phones
Computer Certification
Computer Networking
Computer Peripherals
Computer Reviews
Data Centers
Databases
Desktop Publishing
Desktop Video
Email
Entertainment
Graphics Software
Home Video/DVD
Internet Technology
Java
JavaScript
Mac Support
MP3/MIDI
Net Conferencing
Net for Beginners
Network Security
Palmtops/PDAs
PC Support
Portable
Shareware/Freeware
Unix
Visual Basic
Web Clip Art
Web Design/HTML
Web Search
Windows
Travel Adventure Travel
Africa
Air Travel
Australia & New Zealand
Bed & Breakfasts
Budget Travel
Business Travel
By US Locale
Camping
Canada
Caribbean
Cruises
Eastern Europe
Europe
France
Greece
Honeymoons/Getaways
Hotels
Italy
Japan
Mexico & Central America
National Parks
South America
Spas
Theme Parks
Traveling with Kids
United Kingdom
Uncategorized Uncategorized

Error Codes

Error Code Error Messages
4001 This Publisher does not exist.
4002 Application Name cannot be empty.
4003 Application Name is too large.
4004 Please provide the Application Type.
4005 This App Type is not available.
4006 App URL cannot be left empty.
4007 Invalid URL.
4008 Category cannot be empty.
4009 Sub Category cannot be empty.
4010 This Category does not exist.
4011 This Sub Category does not belong to the Category specified.
4012 Your Application could not be created successfully.
4013 Please specify the targeted users.
4014 This Targeted User value is invalid.
4015 Number of days should be a whole number.
4016 Ad Frequency field cannot be left empty.
4017 This Ad Frequency option is not available.
4018 The First Ad Delay fields cannot be left empty.
4019 The Ad can be delayed maximum for 1 day.
4020 Please specify the number of ads per user for icon ads.
4021 Only 5 icon ads allowed per user per month.
4022 At least 1 icon ad should be served per user per month.
4023 At least one Interstitial Ad Type is required.
4024 Please specify the details for Banner Ad Types.
4025 Please enter the Android market store URL.
4026 This Application Name already exists.
4027 This Applications does not belong to this user.
4028 Ad Types could not be updated.
4029 Please specify a category also if you want a sub category.
4030 You cannot edit details for a deleted application.
4031 App Id field cannot be left empty.
4032 The App info has been updated successfully.
4033 This Application Status is not available.
4034 Please provide the Ad Type and the status to be changed.
4035 App Name cannot have special characters.
4036 Please select atleast one adtype.
4037 The value of first ad delay has to be numeric.
4038 Please provide a numeric value for Ads Per User field.
4039 Please provide proper value for Exclude Dating Campaigns field.
4040 This user does not belong to the Affiliate.
4041 Application information is not available.
4042 This Application cannot be deleted.
4043 No Parameters received.
4044 Invalid User.
4045 Application status cannot be changed.
4046 Status field cannot be left empty.
4047 The Application is already Running.
4048 The Application is already Paused
4049 Please provide valid information.
4050 Please subscribe ad type with details before changing the status of the Ad Type.
4051 Further validation is needed on this application. Please contact the support team to prevent any account interruptions.
4052 Frequency value is too small.
4053 Frequency value is too large.
4054 At least one ad type is required for 360 Banner Ads.
4055 Abstract Banner Large Frequency could not be set.
4056 Please enable the Abstract Banner Large ad type to set up a frequency.
4057 Invalid application Id.
4058 No application under this user.
4059 This platform type does not exist.
4060 App type is not required for this platform type.
4061 Push ads settings cannot be done for this platform type.
4062 Icon ads settings cannot be done for this platform type.
4063 Smartwall ads settings cannot be done for this platform type.
4064 You cannot provide more than 5 placement details.
4065 You cannot set the details for abstract or standard types for maximizer mode.
4066 Please provide value for close interval.
4067 The range for close interval is between 30 and 120.
4068 Please provide value for click interval.
4069 The range for click interval is between 30 and 120.
4070 Please provide value for ad interval.
4071 The range for ad interval is between 30 and 120.
4072 Please provide valid ad interval details.
4073 You cannot make the orientation setting or sub types settings if the Abstract measure is set to 0%.
4074 Please provide the measure value within the range.
4075 Please provide the measure value.
4076 Abstract Settings are mandatory for enabling custom mode.
4077 Please provide a valid orientation control value.
4078 Orientation control value is mandatory.
4079 Invalid values for the Sub types.
4080 Please provide details for the subtypes.
4081 Please provide details for all 3 types of ads under Abstract type.
4082 Standard settings are mandatory for enabling custom mode.
4083 The summation value of abstract and standard settings should be 100%.
4084 You are not enabled for MobileWeb.
4085 Please provide abstract measure value to update the standard measure value.
4086 Please enable at least one abstract ad type.
4087 You can only disable the 360BannerAds for mobile web by providing the value as N.
4088 Please provide details for 360BannerAds.
4089 The allowed range for placement id values is between 1 and 100.
4090 Please provide value for excludeDatingCampaigns.
4091 Placement Id value cannot be 0.
4092 Please provide numeric values for placement Id.
4093 Placement Id cannot exceed 100.
4094 Please enable smart Wall to proceed.
4095 Banner Ads not available for this platform.
4096 Please subscribe at least one ad type.
4097 Please enable 360 banner to add placement or customize settings.
4098 Please provide valid back fill value.
4099 Back fill value cannot be blank.
4100 Please provide standard measure value to update the standard measure value.
4101 Please provide proper value for mode.
4102 Back fill settings cannot be done for maximizer mode.
4103 Back fill is mandatory for custom mode.
4104 You cannot edit back fill setting for placement in maximizer mode.
Personal tools
Namespaces

Variants
Actions
Toolbox