User API Documentation

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

Contents

Preface

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

Audience

The intended audience is Airnow Monetization's clients who use the Advertiser features.

Introduction

Airnow Monetization Users API has been designed to let advertisers/resellers (users) manage their API account directly with rest APIs. Advertisers/Resellers can add users and manage the account of users.

Authentication

An API Key is required for all inbound API requests. Advertisers will have to login into their account on Airnow Monetization portal and go to "API" section. Press Generate API KEY button to get apikey.

Parameters and description

Parameter Name Description Mandatory
apikey For Authentication Yes
email email of the user Yes
firstName First Name of the user Yes
lastName Last Name of the user Yes
userId User Id yes
messengerSource The IM being used by the user. No
messengerId The IM Name of the user. No
company The name of the company, the user is associated with. No
phone The phone number where the user can be contacted. No

Sample APIs

Request End Points

Add user

Adding a user under account

Request Example:

Body Format : http://airpushapi.com/rest.json?method=user.addUser&apikey=<api_key> Body Parameter :

{

   "apiKey": "xyz",
   "accountId": "123",
   "email": "ww",
   "firstName": "Xyz",
   "lastName": "Abc"

}

Kindly note that 'email' field in the request parameter will be email of the user being added.

Response Format: {"status" => 200, "message" => 'You have successfully add an user'}

Retrive User list

Retrive the list of user for an account

Request Example:

Body Format : http://airpushapi.com/rest.json?method=user.getUserForReseller&apikey=<api_key> Body Parameter :

{

   "apiKey": "xyz",
   "accountId": "21"

}

Check Balance

Checking balance of an account

Request Example:

Body Format : http://airpushapi.com/rest.json?method=user.getUserBalance&apikey=<api_key> Body Parameter :

{

   "apiKey": "xyz",
   "accountId": "21"

}

Checking balance of an user

Request Example:

Body Format : http://airpushapi.com/rest.json?method=user.getUserBalance&apikey=<api_key> Body Parameter :

{

   "apiKey": "xyz",
   "userId": "21"

}

Error Codes

Error Code Error Messages
1001 No parameters received
1002 User does not exist
1003 No Data Received
1004 Name field cannot be left empty
1005 Invalid Email
1006 Account Id cannot be left empty
1007 Incorrect Name Format
1008 Not a valid Account
1009 This email Id has already been registered
1010 The length of first name cannot be more than 30 characters.
1011 The length of last name cannot be more than 100 characters.
1012 The length of company name cannot be more than 100 characters.
1013 email field cannot be empty
1014 The user could not be registered successfully. Please try after sometime
Personal tools
Namespaces

Variants
Actions
Toolbox