Create a new Offer

HTTP method EndPoint
POST api/admin/add_offer

Request body example

curl -X POST -H 
"X-Api-Key: {key}"
 -H 
"Content-Type: application/json"
 -H 
"Cache-Control: no-cache"
 -H 
"Postman-Token: cc5d7610-80aa-8f1b-983d-fc5712fcfb53"
-d
'{
  "title": "Exclusive: Leaked RBI document reveals Next 5 Demonetization Rules",
  "url": "http://www.fakingnews.firstpost.com/buzzpoop/exclusive-leaked-rbi-document-reveals-next-5-demonetization-rules-18737?utm_source={click_id}",
  "preview_url": "http://www.fakingnews.firstpost.com/buzzpoop/exclusive-leaked-rbi-document-reveals-next-5-demonetization-rules-18737",
  "image": "http://www.fakingnews.firstpost.com/wp-content/uploads/2016/12/Featured-1.jpg",
  "description": "RBI is changing rules of demonetization faster than the speed of light. Are these changes just random or well planned? A leaked document which has RBI’s seal and Urijit Patel’s signature reveals 5 new demonetization rules that will be applied in the coming days",
  "device": ["all"],
  "user_id": "string",
  "category": ["id1", "id2"],
  "commissions": [
    {
      "model": "cpc",
      "rate": 0.0012,
      "revenue": 0.0015,
      "description": "For traffic from India and US",
      "coverage": ["US", "IN"]
    },
    {
      "model": "cpc",
      "rate": 0.0011,
      "revenue": 0.0015,
      "description": "For traffic for the rest of the world",
      "coverage": ["ALL"]
    }
  ]

}'
"https://{network}/api/admin/add_offer"

Request body parameters

Field Type Description Nullable
title string Title of the campaign No
description string Description of the campaign Yes
url string Url of the campaign No
expiry string - date (Y-m-d) Url of the campaign No
image string Url of the image (which is downloadable) No
preview_url string Password of the campaign No
device array Device array No
category array Categories array No
user_id string Advertiser ID No
commissions array of objects Campaign Commissions No

Commission Object

Field Type Description Nullable
model string cpc OR (cpm, cpi, cpa) No
rate float Payout for the affiliate in Admin Currency (default: USD) No
revenue float Revenue charged from the advertiser Admin Currency (default: USD) No
coverage array Array of country codes Yes
descriptipon string Info regarding the commission Yes
  • Category ID's can be found from the /dictionary/categories
  • Devices can be found using /dictionary/devices
  • User ID can be found from /advertiser

Response body parameters

{

"success"
: 
true
,

"data"
: {

"campaign"
: {

"user_id"
: 
"string"
,

"org_id"
: 
"string"
,

"title"
: 
"string"
,

"description"
: 
"string"
,

"url"
: 
"string"
,

"preview_url"
: 
"string"
,

"creative"
: 
null
,

"image"
: 
"57f88e76df82f.png"
,

"category"
: [

"Technology"

      ],

"type"
: 
"article"
,

"device"
: [

"all"

      ],

"expiry"
: 
null
,

"_id"
: 
"string"
,

"live"
: 
true
,

"created"
: 
"2016-10-08"
,

"modified"
: 
"2016-12-25"
,

"meta"
: []
    },

"commissions"
: [
      {

"ad_id"
: 
"string"
,

"description"
: 
null
,

"model"
: 
"cpi"
,

"revenue"
: 
0.37878787878788
,

"rate"
: 
0.15151515151515
,

"coverage"
: [

"ALL"

        ],

"_id"
: 
"string"
,

"live"
: 
null
,

"created"
: 
"2016-10-08"
,

"modified"
: 
null
,

"meta"
: []
      }
    ]
  }
}

results matching ""

    No results matching ""