API Method – setOffer
API Method – setOffer
setOffer
Create a new offer or Update an existed offer.
API Category
Offer
HTTP Method
POST
Request Call Example
HTTP:
POST /api/v2/setOffer?key=yourapikey HTTP/1.1
Host: yourapplicationdomain
Content-Type: application/x-www-form-urlencoded
expire_date=2019%2F10%2F10&price_model=CPA%2BCPS&preview_url=http%3A%2F%2Fwww.test.com&ssl=0&type=Mobile¤cy=2&payout=1.12345&force_unique=1&description=Description123456789012345678901234567890123&name=Offer_New_005&revenue_percent=20.1234&revenue_type=RPA&secondary_offer=2&revenue=2.23456&conversion_point=DOI&restriction=Restriction12345678901234567890123456789012345&status=Active&tracking_protocol=iFrame+Pixel&advertiser_id=1&url=http%3A%2F%2Fwww.test.com%3Ftid%3D%7BTID%7D&hide_referrer=0&session_lifespan=2+Weeks&access_type=Public&payout_percent=10.1234&payout_type=CPA%2BCPS&need_security_token=0&geo_targeting=1&geo_type=1&geo_enforce=1&geo_redirect_type=1&geo_redirect_target_id=2&geo_countries%5B0%5D=US%3A1%3ATX&geo_countries%5B1%5D=CA%3A0%3ABC%3BNT%3BNU&device_targeting=1&device_redirect_offer_id=1&device_rules%5B0%5D=0%3ADevice+Brand%3AASUS%3BBlackBerry&device_rules%5B1%5D=1%3AOS%3AiOS%3BWindows+phone&has_cap_limit=1&cap_type=Budget&cap_overall_limit=4&cap_interval=Monthly&cap_interval_limit=3&cap_affiliate_overall_limit=2&cap_affiliate_interval=Weekly&cap_affiliate_interval_limit=1&app_id=appid_packagename&categories=6%2C7
Java:
Unirest.post("http://yourapplicationdomain/api/v2/setOffer?key=yourapikey").header("Content-Type", "application/x-www-form-urlencoded").body("expire_date=2019%2F10%2F10&price_model=CPA%2BCPS&preview_url=http%3A%2F%2Fwww.test.com&ssl=0&type=Mobile¤cy=2&payout=1.12345&force_unique=1&description=Description123456789012345678901234567890123&name=Offer_New_005&revenue_percent=20.1234&revenue_type=RPA&secondary_offer=2&revenue=2.23456&conversion_point=DOI&restriction=Restriction12345678901234567890123456789012345&status=Active&tracking_protocol=iFrame%20Pixel&advertiser_id=1&url=http%3A%2F%2Fwww.test.com%3Ftid%3D%7BTID%7D&hide_referrer=0&session_lifespan=2%20Weeks&access_type=Public&payout_percent=10.1234&payout_type=CPA%2BCPS&need_security_token=0&geo_targeting=1&geo_type=1&geo_enforce=1&geo_redirect_type=1&geo_redirect_target_id=2&geo_countries%5B0%5D=US%3A1%3ATX&geo_countries%5B1%5D=CA%3A0%3ABC%3BNT%3BNU&device_targeting=1&device_redirect_offer_id=1&device_rules%5B0%5D=0%3ADevice%20Brand%3AASUS%3BBlackBerry&device_rules%5B1%5D=1%3AOS%3AiOS%3BWindows%20phone&has_cap_limit=1&cap_type=Budget&cap_overall_limit=4&cap_interval=Monthly&cap_interval_limit=3&cap_affiliate_overall_limit=2&cap_affiliate_interval=Weekly&cap_affiliate_interval_limit=1&app_id=appid_packagename&categories=6%2C7").asString();
Parameters
Response
Sample in JSON:
Creating -
Updating -
setOffer
Create a new offer or Update an existed offer.
API Category
Offer
HTTP Method
POST
Request Call Example
HTTP:
POST /api/v2/setOffer?key=yourapikey HTTP/1.1
Host: yourapplicationdomain
Content-Type: application/x-www-form-urlencoded
expire_date=2019%2F10%2F10&price_model=CPA%2BCPS&preview_url=http%3A%2F%2Fwww.test.com&ssl=0&type=Mobile¤cy=2&payout=1.12345&force_unique=1&description=Description123456789012345678901234567890123&name=Offer_New_005&revenue_percent=20.1234&revenue_type=RPA&secondary_offer=2&revenue=2.23456&conversion_point=DOI&restriction=Restriction12345678901234567890123456789012345&status=Active&tracking_protocol=iFrame+Pixel&advertiser_id=1&url=http%3A%2F%2Fwww.test.com%3Ftid%3D%7BTID%7D&hide_referrer=0&session_lifespan=2+Weeks&access_type=Public&payout_percent=10.1234&payout_type=CPA%2BCPS&need_security_token=0&geo_targeting=1&geo_type=1&geo_enforce=1&geo_redirect_type=1&geo_redirect_target_id=2&geo_countries%5B0%5D=US%3A1%3ATX&geo_countries%5B1%5D=CA%3A0%3ABC%3BNT%3BNU&device_targeting=1&device_redirect_offer_id=1&device_rules%5B0%5D=0%3ADevice+Brand%3AASUS%3BBlackBerry&device_rules%5B1%5D=1%3AOS%3AiOS%3BWindows+phone&has_cap_limit=1&cap_type=Budget&cap_overall_limit=4&cap_interval=Monthly&cap_interval_limit=3&cap_affiliate_overall_limit=2&cap_affiliate_interval=Weekly&cap_affiliate_interval_limit=1&app_id=appid_packagename&categories=6%2C7
Java:
Unirest.post("http://yourapplicationdomain/api/v2/setOffer?key=yourapikey").header("Content-Type", "application/x-www-form-urlencoded").body("expire_date=2019%2F10%2F10&price_model=CPA%2BCPS&preview_url=http%3A%2F%2Fwww.test.com&ssl=0&type=Mobile¤cy=2&payout=1.12345&force_unique=1&description=Description123456789012345678901234567890123&name=Offer_New_005&revenue_percent=20.1234&revenue_type=RPA&secondary_offer=2&revenue=2.23456&conversion_point=DOI&restriction=Restriction12345678901234567890123456789012345&status=Active&tracking_protocol=iFrame%20Pixel&advertiser_id=1&url=http%3A%2F%2Fwww.test.com%3Ftid%3D%7BTID%7D&hide_referrer=0&session_lifespan=2%20Weeks&access_type=Public&payout_percent=10.1234&payout_type=CPA%2BCPS&need_security_token=0&geo_targeting=1&geo_type=1&geo_enforce=1&geo_redirect_type=1&geo_redirect_target_id=2&geo_countries%5B0%5D=US%3A1%3ATX&geo_countries%5B1%5D=CA%3A0%3ABC%3BNT%3BNU&device_targeting=1&device_redirect_offer_id=1&device_rules%5B0%5D=0%3ADevice%20Brand%3AASUS%3BBlackBerry&device_rules%5B1%5D=1%3AOS%3AiOS%3BWindows%20phone&has_cap_limit=1&cap_type=Budget&cap_overall_limit=4&cap_interval=Monthly&cap_interval_limit=3&cap_affiliate_overall_limit=2&cap_affiliate_interval=Weekly&cap_affiliate_interval_limit=1&app_id=appid_packagename&categories=6%2C7").asString();
Parameters
| Name | Type | Description |
| id (* for Updating) | Integer | Offer id. It is required for updating. |
| advertiser_id (* for Creating) | Integer | Advetiser id. |
| name (* for Creating) | String | Offer name. |
| status (* for Creating) | String | Offer status: Active/Pending/Paused/Archived |
| expire_date (* for Creating) | String | Offer expiration date: 2018/09/01 |
| type (* for Creating) | String | Type of offer: Desktop/Mobile/Tablet |
| conversion_point | String | Conversion Point: Email Submit/DOI/SOI/Download and Install/ etc. |
| preview_url | String | Preview Url, it must be a valid url. |
| url (* for Creating) | String | Offer Url, it must be a valid url. |
| access_type (* for Creating) | String | Access Type: Public/Need Approval/Private |
| ssl (* for Creating) | Integer |
Enable SSL: 0(by default): disable SSL 1: enable SSL. |
| tracking_protocol (* for Creating) | String | Tracking Protocol: Server Postback URL/iFrame Pixel/Image Pixel |
| currency (* for Creating) | Integer | Currency code. Please refer to Currency List. |
| payout_type (* for Creating) | String | Payout Type: CPA/CPC/CPS/CPI/CPA+CPS/CPL |
| payout | Float | Payout. |
| payout_percent | Float | Payout percentage of CPS and CPA+CPS |
| revenue_type | String | Revenue Type: RPA/RPC/RPS/RPI/RPA+RPS/RPL |
| revenue | Float | Revenue |
| revenue_percent | Float | Revenue percentage of RPS and RPA+RPS |
| need_security_token | Integer |
Enable “Need Security Token”: 0(by default): OFF 1: ON |
| force_unique | Integer |
Enable “Enforce Unique”: 0(by default): OFF 1: ON |
| session_lifespan (* for Creating) | String | Session LifeSpan: 1 Day/1 Week/2 Weeks/1 Month |
| hide_referrer | Integer |
Enable “Hide Referer”: 0(by default): OFF 1: ON |
| secondary_offer | Integer | Secondary Offer id. |
| description | String | Offer description/Initial Event description. |
| restriction | String | Offer restriction. |
| has_cap_limit (* for Creating) | Integer |
Enable Offer Traffic Cap: 0(by default): OFF 1: ON |
| cap_type | String | Traffic Cap type: Budget/Conversion |
| cap_event_range | String |
Traffic Cap range: All/Initial All(by default) |
| cap_overall_limit | Integer |
Offer Overall Cap -1: no limit |
| cap_interval | String | Offer Overall Cap Interval: Daily/Weekly/Monthly |
| cap_interval_limit | Integer |
Offer Interval Cap -1: no limit *cap_interval is required for this |
| cap_affiliate_overall_limit | Integer |
Affiliate Overall Cap -1: no limit |
| cap_affiliate_interval | String | Affiliate Overall Cap Interval: Daily/Weekly/Monthly |
| cap_affiliate_interval_limit | Integer |
Affiliate Interval Cap -1: no limit *cap_affiliate_interval is required for this |
| device_targeting (* for Creating) | Integer |
Enable Offer Device targeting: 0(by default): OFF 1: ON |
| device_rules[] | String |
Array of Device targeting rules: device_rules[0]=0:Device Brand:ASUS;BlackBerry Block the traffic from Device Brand: ASUS and BlackBerry device_rules[1]=1:OS:iOS;Windows phone Allow the traffic from OS: iOS and Windows Phone Special for OS version: device_rules[1]=1:OS:iOS(10.3-11.4);Windows phone(-8);android(6-) Allow the traffic from iOS 10.3 to iOS 11.4, Windows phone 8 and below, android 6 and above Android: "1","2","3.0","3.1","3.2","4.0","4.1","4.2","4.3","4.4","5.0","5.1","6.0","7.0","7.1.0","7.1.1","7.2","8","8.1","9" iOS: "6.0","7.0","7.1","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","10.0","10.1","10.2.0","10.3.0","10.3.1","10.3.2","11.0","11.0.2","11.0.3","11.3","11.4","12" Windows Phone: "7","8","10" |
| device_redirect_offer_id | Integer | Device Targeting redirect offer id |
| geo_targeting (* for Creating) | Integer |
Enable Offer Geo targeting: 0(by default): OFF 1: ON |
| geo_type | Integer |
Geo Type, Include Country or Exclude Country: 1: include 0: exclude INCLUDE accepts regions(states&cities) EXCLUDE accepts countries only |
| geo_countries[] | String |
Array of Geo targeting rules: geo_countries [0]= US:1:TX Allow the traffic from TX of US geo_countries [1]= CA:0:BC;NT;NU Block the traffic from BC,NT,NU of CA |
| geo_enforce | Integer |
Enable Enforce Geo-targeting: 0(by default): OFF 1: ON |
| geo_redirect_type | Integer |
Geo targeting redirect type: 0: offer 1: geo offer group |
| geo_redirect_target_id | Integer |
Get targeting redirect id: An offer id or an offer geo group id, according to “geo_redirect_type” |
| app_id | String | App Id |
| categories | String | A list of offer categories. |
| advertiser_offer_id | String | Max. 50 characters |
Response
Sample in JSON:
Creating -
|
{ "httpStatus": 201, "data": [ { "id": 601 } ] "errorCode": 0, "errorMessage": "", "message": "Created successfully!" } |
Updating -
|
{ "httpStatus": 202, "errorCode": 0, "errorMessage": "", "message": " Updated successfully!" } |
Close All
API V3
API V2
-
User - Network
-
User - Affiliate
-
Offer
-
Report
-
-
User - Advertiser
-
offer
-
Dictionary
API V1 (DEPRECATED)




