Skip to content
lm-srinivas edited this page May 8, 2019 · 7 revisions

Welcome to the lmadsapi wiki!

LMADS API integration guide

Getting Started

Getting started with the lmadsapi is very simple. The following section will let you quickly start using the lemma ads platform.

Integration can be done in three phases:

  • Integration Phase: Use our test end point to try our ad samples and make changes in your system so that you can parse our responses and render them in your end user device; After this phase your system is ready for making calls to our platform and able to parse our responses

  • Test Phase: Use our live end point to start with limited ad requests and match the numbers In this phase we will focus on if both the systems are able to track the ads being displayed on end user devices

  • Live Phase: If the above phase passes then we are good to go live with the agreed SLA and traffic


1. Integration

Test Endpoint: http://testads.lemmamedia.com/lmads?

Example GET URL to make ads request to our platform:

http://testads.lemmamedia.com/lmads?pid=1&aid=1011&at=3&rtb=1&vw=1920&vh=1080&ifa=3EB415D6-C7C2-A8A7-2354-D96F6D9EAC8D&dpidsha=C925FFC16CED7852211D1C456FF939DEF102D1CC42008E3A23344998B65E94C4&dpidmd=EEF45E1ECEB14FF0B31128C654E3E1E6&os=windows&dmake=LENOVO&dmodel=80K6

Where the query parameters pid, aid are generated while you register an adunit in our platform

  • pid :the partner identifier unique to each partner
  • aid :the specific adtag in case of RTB display / mobile requests. In case of outdoor screen it represent the specific screen

List of API Request parameters

Mandatory

Name Type Description Default Value
pid Integer Partner Identifier
aid Integer Screen Identifier or adtag
at Integer Ad Type banner/video/Richmedia
rtb Integer Is RTB demand requested
ip String End device IP
dlat,dlon Double device location parameters latitude and longitude

Recommended

Name Type Description Default Value
ifa / dpidsha/ dpidmd String Any or all of Device Identifiers
os String OS Name
osv String OS Version
vh Integer video height
vw Integer video width

Optional

Name Type Description Default Value
iploc String comma separated lat,lon

API Response Object

NO ADS Response

In case of no ads or some error you will receive empty http response with http status code 204

Ad Response

  • In case of valid response lemma system will respond with a JSON document
  • Response contains an array of Ad objects each describing a single Ad and its related content
  • An ad object can be a video ad or banner ad
  • Format/Example of Video Ad
{
  "duration" : 30,
  "creative"  : "URL",
  "pixels"   : ["pixelurl1", "pixelurl2"],
  "events"   : [
                {"ID":1, "pixel": "URL"},
                {"ID":2, "pixel": "URL"},
  ]
}
  • Format/Example of Banner Ad
{
  "creative"  : "URL",
  "pixels"   : ["pixelurl1", "pixelurl2"],
  "events"   : [
                {"ID":1, "pixel": "URL"},
                {"ID":2, "pixel": "URL"},
  ]
}

API Response Parameter Details

  • Duration : Specify the video ad length
  • pixels : Pixel should be fired on starting the video/banner ad
  • Events : Events describe the list of events and the pixel inside an event should be fired as per eventID Event ID - 1 Pixel should be fired after 25% of ad is played Event ID - 2 Pixel should be fired after 50% of ad is played Event ID - 3 Pixel should be fired after 75% of ad is played Event ID - 4 Pixel should be fired after 100% of ad is played

For more details on the API response please contact at support@lemmatechnologies.com