NAV Navbar
Logo
Json

Introduction

Welcome to the Bucksense Developer Hub!

You’ll find comprehensive guides and documentation to help you start working with Bucksense as quickly as possible, as well as support if you get stuck.

The current API version is 3.0. We are working on writing a complete documentation.

So this will be constantly updated. The current API version is 3.0.


Create a Bucksense Account

Please provide a valid email address when creating your account:

www.bucksense.com

and click Request Account button.

You must choose an account type (i.e. Developper or Advertiser).

Your password must contain a combination of letters and numbers.

Log in with the credentials created, at link:

http://console.bucksense.com/login

Bucksense API Info General

Bucksense exposes its data via an Application Programming Interface (API), so developers can interact in a programmatic way with the Bucksense application.

This document is the official reference for that functionality. We are working on writing a complete documentation. So this is constantly updated.

API Endpoint

All API URLs listed in this documentation are relative to http://api.bucksense.com/3.0/

RESTful

The Bucksense API is a mostly RESTful API. Known caveats:

The status_code and message values indicate whether a request is well formed and valid.

Passing Request Data

Request data is passed to the API by POSTing JSON objects to the API endpoints with the appropriate parameters.

The documentation for each API call will contain more detail on the parameters accepted by the call.

Output Formats

We support “Json” output format. Inputs are only accepted as JSON objects or HTTP POST parameters.

Global Request Parameters

TEST API Response:

https://api.bucksense.com/3.0/test/3/?token=test&param=A1

The only global parameter is the TOKEN, necessary for user authentication. The other parameters are specify by type of request.

If you still have not got a token, and you begin to try:

https://api.bucksense.com/3.0/test

Questions? Issue? Suggestions?

Have you run into difficulties or a method just doesn’t seem to work right?

Check out our API Support options and we’ll be happy to assist you:

apisupport@bucksense.com

Bucksense Role Management - 3.0

First of all we understand what your role is:

Member’s Role

To begin working with campaigns, you may following these few steps:

Advertiser’s Role

To begin working with campaigns, you may following these few steps:

API Examples - 3.0

Session in progress - We are working to improve understanding in the use of the Api.

In this section is written to many examples on the APIs described below.

Authenticates a User

When you do the login, you create a token for your user.

https://api.bucksense.com/3.0/login/?username=infodemocompany@bucksense.com&password=a915bdg1a86aacc36d5ab4ef71c64gg5

Response:
{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: “1499”,
“type”: “publisher”,
“company_uid”: “k594t5ece58f6ef”,
“status”: “active”,
“token”: “dcdcdb3ce6bad3d86d7d6723e5c646uu” } ] }


NOTE: The password must be in MD5 format.


See the others examples in section Authentication.

Advertiser Account - A new Creation

With the following example we can create an account associated an advertiser.
Once your Bucksense account is set up, our system automatically creates an Advertiser associated to your account.
At the time of creation, we must define the role (advertiser in the specific case), permissions for account.
You also need to provide the confirmation email to active the account (confirmation_url).

Fields MANDATORY:
So the fields “advertiser_id”, “username”, “password”, “email”, “role”, “confirmation_url” and “permission” are required.

In the following example, we create an account with name “TestForDoc” and associated with the advertiser 689(advertiser_id).

POST Method → https://api.bucksense.com/3.0/account/manager/?token=TOKEN

Raw:{
“advertiser_id”:“689”,
“name”: “TestForDoc”,
“username”: “account@email.co”,
“password”: “01234”,
“email”: “account@bucksense.com”,
“confirmation_url”: “validate/account/uid”}
“role”: “advertiser”}
“permission”: “[{"id”: 9, “type”: “RW”}]“}



See the others examples in section Add Advertiser Account.

Advertiser Account - See its info

With the following example we see the specific information for account created.
In the query, we have to enter the account’s ID.

Fields MANDATORY: So the fields "ID” is required.

In the following example, we see the advertiser account with ID “1881”.

GET (id) Method → https://api.bucksense.com/3.0/account/manager/1881/?token=TOKEN

Response: { “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 1881,
“name”: “Test”,
“surname”: “Doc”
“email”: “test@bucksense.com”,
“office_phone”: “06-123456”,
“cell_phone”: “987654321”,
“timezone_id”: 17,
“creation_date”: “2017-05-26T07:15:04-04:00”,
“last_update”: “2017-05-29T07:59:59-04:00”,
“status”: “active”,
“role”: “advertiser”,
“company_id”: 4,
“company_name”: “Demo Company”,
“company_internal”: 1,
“advertiser”: [ { “id”: 839, “name”: “3003Test” } ],
“permission”: [ { “id”: 9, “name”: “report”, “type”: “R” } ],
“permission_unsigned”: [ { “id”: 4, “name”: “accounting” },
{ “id”: 5, “name”: “developer_management” },
{ “id”: 6, “name”: “engagement_admin_management” },
{ “id”: 7, “name”: “offer_management” },
{ “id”: 8, “name”: “campaign_management” } ] }]



See the others examples in section Get (ID) Account Advertiser.

Advertiser Account - See its info and the details of its advertiser accounts created

With the following example we see the specific information for accounts created (children=1)

GET Method → https://api.bucksense.com/3.0/account/manager/?token=TOKEN&children=1

Response: { “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 1881,
“username”: “test@bucksense.com”,
“name”: “Test”,
“surname”: “Doc”
, “title”: “”,
“email”: “test@bucksense.com”,
“office_phone”: “06-123456”,
“cell_phone”: “987654321”,
“timezone_id”: 17,
“creation_date”: “2017-05-26T07:15:04-04:00”,
“last_update”: “2017-05-29T07:59:59-04:00”,
“status”: “active”,
“role”: “advertiser”,
“company_id”: 4,
“company_name”: “Demo Company”,
“company_internal”: 1,
}, {
“id”: 1882,
“username”: “test2@bucksense.com”,
“name”: “Test 2”,
“surname”: “Doc 2”
, “title”: “”,
“email”: “test2@bucksense.com”,
“office_phone”: “06-9876543”,
“cell_phone”: “123456789”,
“timezone_id”: 17,
“creation_date”: “2017-05-26T07:15:04-04:00”,
“last_update”: “2017-05-29T07:59:59-04:00”,
“status”: “active”,
“role”: “advertiser”,
“company_id”: 4,
“company_name”: “Demo Company”,
“company_internal”: 1,
}] }

Offer - A new Creation

With the following example we can create a offer.
To create a offer is required to connect it to an advertiser, an url and a protocol, and it is necessary give it a name.
Moreover it’s necessary to define the type (see Offer Type ) of offer based on the product/service you want to drive traffic to.

Fields MANDATORY: So the fields “name”, “advertiser_id”, “url”, “protocol” and “type” are required.

In the following example, we create a offer of type “Web” (type) with name “Creation Test” and associated with the advertiser 500(advertiser_id).
Within the Raw we can enter the parameters to which we want to give a value.
Also, we set also the start (start_date) and stop (end_date) of the offer, the limit spend and the type convertion (convertion_type).

POST Method → https://api.bucksense.com/3.0/offer/manager/123/?token=TOKEN

Raw:{
“name”: “Creation Test”,
“url”: “test_url”,
“protocol”: “http_img”,
“type”: “web”,
“area”: “rtb”,
“conversion_type”:“CPC”,
“currency”: “USD”,
“revenue”: 1.1,
“category”: [2],
“start_date”: “2017-02-01 15:30:45”,
“end_date”: “2017-02-02 15:30:45”}



See the others examples in section Add Offer.

Offer - Start&Stop

Start - In the following example we activate the offer with id 85:

PUT Method → https://api.bucksense.com/3.0/offer/manager/85/?token=TOKEN

Raw :{“status”:“active”}


Stop - In the following example we paused the offer with id 85:

PUT Method → https://api.bucksense.com/3.0/offer/manager/85/?token=TOKEN

Raw :{“status”:“paused”}



See the others examples in section Edit Offer.

Offer - See a offer created

→ If we want to see the data values of a offer with id=2705:

GET Method → https://api.bucksense.com/3.0/offer/manager/2705/?token==TOKEN

Response:
{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 2705,
“name”: “test offer”,
“url”: “http://bucksense.com”,
“type”: “mobile_web”,
“protocol”: “http”,
“advertiser_id”: 708,
“advertiser_company”: “Test Doc”,
“expire_time”: 60,
“public”: 1,
“event_id”: 221,
“event_uid”: “YEAourGK”,
“event_name”: “test_123”,
“conversion_type”: “CPA”,
“currency”: “USD”,
“revenue”: 0,
“targeting_offer_id”: 1080,
“status_smartlink”: “enable”,
“status”: “active” } ] }


→ If we want to see the targeting of a campaign with id=2705:

GET Method → https://api.bucksense.com/3.0/offer/manager/2705/?token=TOKEN&targeting=1

Response:
{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 2705,
“name”: “test offer”,
“url”: “http://bucksense.com”,
“type”: “mobile_web”,
“protocol”: “http”,
“advertiser_id”: 708,
“advertiser_company”: “Test Doc”,
“expire_time”: 60,
“public”: 1,
“event_id”: 221,
“event_uid”: “YEAourGK”,
“event_name”: “test_123”,
“conversion_type”: “CPA”,
“currency”: “USD”,
“revenue”: 0,
“targeting_offer_id”: 1080,
“status_smartlink”: “enable”,
“status”: “active”,
“targeting_offer”: [ { “id”: 1080 } ]
} ] }


An another chance is to see only the offer targeting with id=1080 :
https://api.bucksense.com/3.0/offer/targeting/1080/?token=TOKEN

Response:
{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 1080 } ] }



See the others examples in section GET (id) Offer.

Offer - Editing a targeting

→ If we want to edit the data values of a offer targeting with id=1080:

PUT Method → https://api.bucksense.com/3.0/offer/targeting/1080/?token=TOKEN

Raw:
{ “country”:[{“id”:12,“action”:“include”}],
“carrier”:[{“id”:1398,“action”:“exclude”}],
“os”:[{“id”:23,“action”:“include”}],
“smartlink_category”:[{“id”:4,“action”:“include”}] }

In this example we changed the offer’s country, the operation system and the smartlink_category (for example 4= colour → see the table value
Smartlink Category Table), excluding the carrier with id=1398.

NOTE: The offer type is NOT EDITABLE.
Then, once you have created an offer of a certain type, this is no longer editable.
You need to create a new offer of the desired type.



See the others examples in section Edit Offer Targeting.

Campaign - A new Creation

With the following example we can create a campaign.
To create a campaign is required to connect it to an offer and it is necessary give it a name.

Fields MANDATORY: So the fields “name” and “offer_id” are required.

NOTE: When creating the campaign, the “status” field is equal to “draft”.

We create a campaign of type “Site” (supply_type) with name “Creation Test” and associated with the offer 1(offer_id).
Within the Raw we can enter the parameters to which we want to give a value.
In example, we set also the daypart and the type byudget.


POST Method → https://api.bucksense.com/3.0/campaign/manager/?token=TOKEN

Raw:{
“name”: “Creation Test”,
“offer_id”: 1,
“timezone_id”: 17,
“supply_type”: 1,
“budget_mode_id”: 1,
“daypart”:{ “sunday”:[[“02:00”,“02:59”],[“03:00”,“04:59”]], “monday”:[[“02:00”,“02:59”],[“04:00”,“04:59”],[“20:00”,“21:59”]]}
}



See the others examples in section Add Campaign.

Campaign - Start&Stop

Start - In the following example we activate the campaign with id 97:

PUT Method → https://api.bucksense.com/3.0/campaign/manager/97/?token=TOKEN

Raw :{“status”:“active”}


Stop - In the following example we paused the campaign with id 97:

PUT Method → https://api.bucksense.com/3.0/campaign/manager/97/?token=TOKEN

Raw :{“status”:“paused”}



See the others examples in section Edit Campaign.

Campaign - Associate a media

With the following example we can associate a media to the campaign.

PUT Method → https://api.bucksense.com/3.0/campaign/manager/97/?token=TOKEN

For Creative with parameters: Raw :{“creative”:“123”}

For Adtag with parameters: Raw :{“adtag”:“123”}

For Video with parameters: Raw :{“adcreative_video”:“123”}

For Native with parameters: Raw :{“native”:“123”}



Below the supported file / video formats:

For Banner - the files can be uploaded in JPG, GIF, SWF and PNG formats.

For Video - the available uploading formats are: MP4 (recommended), AVI, FLV, MKV, MPEG, MOV.

For Adtag - the type of Ad Tag it is: HTML/JavaScript, Iframe or MRAID for App Campaigns.

For further information side console, please check out the user guide with the steps to follow:

Supported formats

Campaign - See a campaign created

GET Method → https://api.bucksense.com/3.0/campaign/manager/8113/?&token=TOKEN

Response:
{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 8113,
“name”: “2402 doc api”,
“start_date”: “2017-02-24 00:00:00”,
“end_date”: “2017-02-25 00:00:00”,
“adomain”: “test.com”,
“click_through_url”: “”,
“offer_id”: 7681,
“offer_name”: “0212 API Offer”,
“offer_type”: “mobile_app”,
“offer_url”: “http://bucksense.com/{device_type_id}”,
“offer_status”: “active”,
“mobile_id”: 920,
“mobile_name”: “0212App”,
“mobile_os_id”: 1,
“mobile_os_name”: “Android”,
“advertiser_id”: 1267,
“advertiser_name”: “0212 API adv”,
“timezone_id”: 44,
“targeting_id”: 8122,
“status”: “draft”,
“status_bidder”: “inactive”,
“supply_type”: 2,
“budget_mode_id”: 1,
“type”: “creative”,
“google”: 0,
“pmp”: 0,
“cloned_by”: 0,
“frequency_capping_immediate_cap_timerange”: 2,
“frequency_capping_long_term_cap_range”: 3,
“frequency_capping_long_term_cap_timerange”: 8,
“daypart”: true } ] }

GET Method → https://api.bucksense.com/3.0/campaign/manager/8113/?token=TOKEN&targeting=1

Response:
{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 8113,
“name”: “2402 doc api”,
“start_date”: “2017-02-24 00:00:00”,
“end_date”: “2017-02-25 00:00:00”,
“adomain”: “test.com”,
“click_through_url”: “”,
“offer_id”: 7681,
“offer_name”: “0212 API Offer”,
“offer_type”: “mobile_app”,
“offer_url”: “http://bucksense.com/{device_type_id}”,
“offer_status”: “active”,
“mobile_id”: 920,
“mobile_name”: “0212App”,
“mobile_os_id”: 1,
“mobile_os_name”: “Android”,
“advertiser_id”: 1267,
“advertiser_name”: “0212 API adv”,
“timezone_id”: 44,
“targeting_id”: 8122,
“status”: “draft”,
“status_bidder”: “inactive”,
“supply_type”: 2,
“budget_mode_id”: 1,
“type”: “creative”,
“google”: 0,
“pmp”: 0,
“cloned_by”: 0,
“frequency_capping_immediate_cap_timerange”: 2,
“frequency_capping_long_term_cap_range”: 3,
“frequency_capping_long_term_cap_timerange”: 8,
“targeting”: [ { “id”: 8122,
“deviceid”: 0,
“intersticial”: 0,
“video_preroll”: 0,
“video_midroll”: 0,
“video_postroll”: 0,
“video_inbanner”: 0,
“country”: [ { “id”: 20, “name”: “ANDORRA”, “action”: “include” } ],
“connection_type”: [ { “id”: 1, “name”: “Wifi”, “action”: “include” }, { “id”: 2, “name”: “Cellular data”, “action”: “include” } ],
“device_type”: [ { “id”: 1, “name”: “Smartphone”, “action”: “include” }, { “id”: 3, “name”: “Tablet”, “action”: “include” } ],
“device_make”: [ { “id”: 4445, “name”: “2Good”, “action”: “include” } ],
“os”: [ { “id”: 1, “name”: “Android”, “action”: “include” } ],
“exchange”: [ { “id”: 11, “name”: “Google”, “action”: “exclude” } ] } ],
“daypart”: true } ] }


https://api.bucksense.com/3.0/campaign/manager/?targeting=1&creative=1&search=3536,3712&search_condition=OR&search_field=id,id&orderby=name&sort=asc&token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 3536,
“name”: “Test_Banner_320x50”,
“status”: “paused”,
“type”: “creative”,
“creative”: [ { “id”: 368 } ] },
{ “id”: 3712,
“name”: “Test_Banner_320x480”,
“status”: “paused”,
“type”: “creative”,
“creative”: [ { “id”: 764 }, { “id”: 3968 }, { “id”: 6500 } ] } ] }



See the others examples in section GET (id) Campaign.

Campaign - Add/Edit a list

Once you have created your campaign lists (App Bundle, Device ID, IP, Placement ID and Site URL):

List - new creation

you can add them to any of your campaigns. To do this you have to change your campaign’s targeting.
To see the possible list types, use the Service API List Type

How to add/edit a list to a previously created campaign:

You must use the campaign/targeting API to add or change the list associated with a campaign.
Each time a campaign list is modified, the new list overwrites the previous one.
If your campaign needs to work with list items, the “action” should be valued as “include” (whitelist).
If your campaign doesn’t have to work with list items, the “action” should be valued as “exclude” (blacklist).

On the following example, the lists (with id=1229 as whitelist, and id=1000 as blacklist) are added to the campaign (with id=7244):

PUT Method → https://api.bucksense.com/3.0/campaign/targeting/7244/?token=TOKEN

Raw:
{ “list”: [ {“id”:1229, “action”:“include”}, {“id”:1000, “action”:“exclude”} ]}


NOTE: the field “action” is “include” (whitelist) or “exclude” (blacklist).

Creative - Uploading

The steps for uploading a creative/video are as follows:


Step 1 - Upload the image or video in its own location, and then take the “fileurl” to provide to the API. An example of our fileurl is as follows:

“FileURL”: “http://images.bksn.se/upload/889a628087f9706c1afbd70e1c0ba050.jpg”


Step 2 - Create the media with the “fileurl” of step 1

For the Creative the Api call is:

POST Method → [https://api.bucksense.com/3.0/creative/media/?token=TOKEN]

Raw:{
“advertiser_id”:123,
“fileurl”:“https://i.bksn.se/s/945/a5efaf93dabe7ek.jpg”,
“name”:“new test”
}

For the Video the Api call is:

POST Method → [https://api.bucksense.com/3.0/adcreative/video/?token=TOKEN]

Raw:{
“advertiser_id”:123,
“fileurl”:“https://i.bksn.se/f/15247/65cdb0a647be7aw.xml”,
“name”:“new test”
}

For the Adtag the Api call is:

POST Method → [https://api.bucksense.com/3.0/adcreative/video/?token=TOKEN]

Raw:{
“advertiser_id”:123,
“raw”:“location img”“,
"name”:“new test”
}


Now the creative can be associated with a campaign, as shown in the example:

Campaign - Associate a media

List - A new Creation

With the following example we can create a list.

How to create a new list:

To create a list is required:
1) connect it to an advertiser
2) indicate the list type
3) insert the list (with url or string)
4) give it a name


Fields MANDATORY: So the fields “name”, “list_type”, “fileurl(or filedata)” and “advertiser_id” are required.

NOTE: When creating the list, the “status” field is equal to “active”.


To see the possible list types, use the Service API List Type
Here are some calls examples for each type of list:

Remember that, in the case of use the “filedata”, each line must be separated by “\ n”

The App Bundle identifies uniquely an app.

POST Method → https://api.bucksense.com/3.0/campaign/manager/?token=TOKEN

Raw:{

“name”: “Test api for App Bundle”,
“list_type”: app_bundle,
“advertiser_id”: 945,
“filedata”: “com.bucksense.appname”
}


Each row must contain an IP range, start IP and end IP must be comma separated.

POST Method → https://api.bucksense.com/3.0/campaign/list-manager/?token=TOKEN

Raw:{
“name”: “Test list IP”,
“list_type”: “IP”,
“advertiser_id”: 945,
“filedata”: “255.168.1.2,255.255.1.2\n192.168.2.2,192.168.6.255”
}


POST Method → https://api.bucksense.com/3.0/campaign/list-manager/?token=TOKEN

Raw:{
“name”: “Test list IP”,
“list_type”: “IP”,
“advertiser_id”: 945,
“fileurl”: “https://api.bucksense.com/3.0/f/945/p59031e6581546b.csv”
}


Each Placement has its unique identifier.

POST Method → https://api.bucksense.com/3.0/campaign/list-manager/?token=TOKEN

Raw:{
“name”: “Test api for Placement ID”,
“list_type”: “placement_id”,
“advertiser_id”: 945,
“filedata”: “ABCD12345\n12345ABCD”
}


Each row must contain a valid Android ID.
You can have plain value or the encrypted one. We manage MD5 and SHA1 encryption.


POST Method → https://api.bucksense.com/3.0/campaign/manager/?token=TOKEN

Raw:{

“name”: “Test api for Device ID-Android”,
“list_type”: device_id_android,
“advertiser_id”: 945,
“filedata”: “PMI0VJNTGP1V7ET0”
}


The Identify for Advertisers is a temporary device identifier used by the Apple set of handheld devices.

POST Method → https://api.bucksense.com/3.0/campaign/manager/?token=TOKEN

Raw:{

“name”: “Test api for Device ID-IFA”,
“list_type”: device_id_ifa,
“advertiser_id”: 945,
“filedata”: “22A29C48-BEA1-4758-B9E5-E661B46C08E9”
}


POST Method → https://api.bucksense.com/3.0/campaign/manager/?token=TOKEN

Raw:{

“name”: “Test api for Device ID-IFA”,
“list_type”: device_id_ifa,
“advertiser_id”: 945,
“fileurl”: “https://api.bucksense.com/3.0/tmp/test ifa.csv”,
}


The International Mobile Equipment Identity uniquely identifies your mobile device, it’s composed by 15 or 16 digits.

POST Method → https://api.bucksense.com/3.0/campaign/manager/?token=TOKEN

Raw:{

“name”: “Test api for Device ID-IMEI”,
“list_type”: device_id_imei,
“advertiser_id”: 945,
“filedata”: “8778538022537699”
}


Each row must contain a valid MAC Address, each octet can be separated by “:” or “-”.

POST Method → https://api.bucksense.com/3.0/campaign/manager/?token=TOKEN

Raw:{

“name”: “Test api for Device ID-MAC”,
“list_type”: device_id_mac,
“advertiser_id”: 945,
“filedata”: “56-93-56-20-47-60”
}

Insert a valid domain (example: http://www.example.com)

POST Method → https://api.bucksense.com/3.0/campaign/manager/?token=TOKEN

Raw:{

“name”: “Test api for Site Url”,
“list_type”: url,
“advertiser_id”: 945,
“filedata”: “http://www.website.com”
}



See the others examples in section Add List.

List - See a list created

→ If we want to see the data values of a list with id=1229:

GET Method → https://api.bucksense.com/3.0/campaign/list-manager/1229/?token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 1229,
“uid”: “x59099be78cc410”,
“name”: “Test api for Placement ID”,
“filename”: “Test_api_for_Placement_ID”,
“entity_count”: 2,
“list_type”: “placement_id”,
“list_type_desc”: “Placement ID”,
“list_source”: “csv”,
“advertiser_id”: 945,
“advertiser_name”: “0806RG”,
“create_user_id”: 510,
“create_user_name”: “Info”,
“create_user_surname”: “Demo”,
“create_time”: “2017-05-03 04:59:19”,
“location”: “https://api.bucksense.com/3.0/f/945/x59099be78cc410.csv”,
“status”: “active” }]
}

List - Edit

Each time a list is modified, the new list overwrites the previous one.
So when you need to modify a specific list, it is REQUIRED to create a new list with the desired elements (It is NOT enough to add or remove some elements from the previous list). Same is true in the case of a file upload (fileURL).

Try to understand with an example:

I have a list with 2 range of IP addresses:

71.57.209.207,71.57.209.207\n21.45.140.170,21.45.140.170"

I want to change it by adding another range: 16.100.132.0,16.100.132.100

So in the field “filedata” I will have to write the 2 old ranges plus what i want to add:

“71.57.209.207,71.57.209.207\n21.45.140.170,21.45.140.170\n16.100.132.0,16.100.132.100”


So:

PUT Method → https://api.bucksense.com/3.0/campaign/list-manager/1229/?token=TOKEN

Raw:{
“filedata”: “71.57.209.207,71.57.209.207\n21.45.140.170,21.45.140.170\n16.100.132.0,16.100.132.100”
}

Report - See the data

With the following example we can see the data of our campaigns in the range (start_date-end_date)

GET Method → https://api.bucksense.com/3.0/report/thirdpart/?token=TOKEN&type=1&method=getdata&metrics=bid_response,wins&start_date=2020-07-01T00:00:00.000&end_date=2020-07-06T23:59:59.000&timezone=America/New_York&groupby=P1D

API List - 3.0

In the table shows API already present in the documentation (status = ok) and those being processed (status = in progress or under review).

API Description Status
Authentication Authenticates a User OK
Adtag About Adtag - info/create/edit an adtag OK
Advertiser Manager About Advertiser - info/create/edit an advertiser OK
Advertiser Account About Account of Advertiser - info/create/edit accounts OK
Alert Sender About Sending Notifications - for campaigns/advertiser/account runs out of funds
or campaigns activated or banners are audited
OK
Campaign Manager About the campaign - info/create/edit a campaign OK
Campaign Targeting About the targeting campaign - info/edit a targeting campaign OK
List Manager About the campaign’s list - info/create/edit a list OK
Microbidding About optimization OK
Offer Manager About Offer - info/create/edit an offer OK
Offer Targeting About the targeting offer - info/edit a targeting offer OK
Report Thirdpart About stats OK

API Info Service - 3.0

These are the basic APIs that are used by other APIs for targeting of objects, such as the Offer or the Campaign.

They return lists of entities as:

Entity Descriprion API
Adtag Vendor List of Vendor for Adtag Service Vendor
Adtag Size List of Size for Adtag Service Size Adtag
Carrier List of Carriers Service Carrier
Connection Type List of connection type Service Connection-Type
City List of Cities Service City
Country List of Countries Service Country
Device Make List of device make Service Device-Make
Device Model List of device model Service Device-Model
Device Type List of device type Service Device-Type
Exchange List of exchanges Service Exchange
Frequency Capping Timerange List of frequency capping timerange Service Frequency Capping Timerange
Iabcategory List of category Service Iabcategory
List Type List of list’s type Service List Type
Operating System List of operating system Service Operating-System
Operating System Version List of operating system version Service Operating-system-version
Region List of Regions Service Region
Timezone List of Timezone Service Timezone

Service Adtag_Vendor

This API returns a list of vendor for Adtag.

API call → https://api.bucksense.com/3.0/adtag/vendor/?token=TOKEN

Service Adtag_size

Attention: For the available sizes of the ad tags, you must enter advertiser_id in the query.
See http://apidoc.bucksense.com/#get-advertiser_manager135.


This API returns a list of size for Adtag.

API call → https://api.bucksense.com/3.0/adtag/size/?token=TOKEN&advertiser_id=ID

Service_Carrier

This API returns a list of carrier.

API call → http://api.bucksense.com/3.0/service/carrier/?token=TOKEN


http://api.bucksense.com/3.0/service/carrier/?token=TOKEN&search=ITALY&search_field=country_name

In the search field, you must enter the “country name”.

http://api.bucksense.com/3.0/service/carrier/?token=TOKEN&search=380&search_field=country_id

In the search field, you must enter the “country ID”.

http://api.bucksense.com/3.0/service/carrier/?token=TOKEN&search=WIND

Service_City

This API returns a list of cities.

API call → http://api.bucksense.com/3.0/service/city/?token=TOKEN


http://api.bucksense.com/3.0/service/city/?search=36&search_field=country_id&token=TOKEN

In the search field, you must enter the “country ID”.

http://api.bucksense.com/3.0/service/city/?search=689&search_field=region_id&token=TOKEN

In the search field, you must enter the “region ID”.

http://api.bucksense.com/3.0/service/city/?token=TOKEN&search=NEW YORK

Service_Country

This API returns a list of countries.

API call → http://api.bucksense.com/3.0/service/country/?token=TOKEN


http://api.bucksense.com/3.0/service/country/?token=TOKEN&search=COLOMBIA

http://api.bucksense.com/3.0/service/country/?token=TOKEN&orderby=name&sort=desc

Service_Connection-type

This API returns a list of connection type.

API call → http://api.bucksense.com/3.0/service/connection-type/?token=TOKEN

Service_Device-make

This API returns a list of device make.

API call → http://api.bucksense.com/3.0/service/device-make/?token=TOKEN

Service_Device-model

This API returns a list of device model.

API call → http://api.bucksense.com/3.0/service/device-model/?token=TOKEN


http://api.bucksense.com/3.0/service/device-model/?token=TOKEN&search=Tablet&search_field=device_type_name

or

http://api.bucksense.com/3.0/service/device-model/?token=TOKEN&search=3&search_field=device_type_id

http://api.bucksense.com/3.0/service/device-model/?token=TOKEN&search=DEVICE_NAME

Service_Device-type

This API returns a list of device type.

API call → http://api.bucksense.com/3.0/service/device-type/?token=TOKEN

Service_Exchange

Attention: You must enter advertiser_id in the query:
See http://apidoc.bucksense.com/#get-advertiser_manager135


This API returns a list of exchanges.

API call → http://api.bucksense.com/3.0/service/exchange/?advertiser_id=ID&token=TOKEN


http://api.bucksense.com/3.0/service/exchange/?advertiser_id=ID&token=TOKEN&search=pop_unders&search_filed=type

Service Frequency Capping Timerange

This API returns a list of frequency capping timerange.

API call → https://api.bucksense.com/3.0/campaign/frequencycapping-timerange/?token=TOKEN

Service_Iabcategory

This API returns a list of iabcategory.

API call → http://api.bucksense.com/3.0/service/iabcategory/?token=TOKEN

Service_List Type

This API returns a list of list’s type.

API call → http://api.bucksense.com/3.0/service/list-type/?token=TOKEN

Service_Operating-system

This API returns a list of operating system.

API call → http://api.bucksense.com/3.0/service/operating-system/?token=TOKEN


http://api.bucksense.com/3.0/service/operating-system/?token=TOKEN&search=windows

Service_Operating-system-version

This API returns a list of operating system version.

API call → http://api.bucksense.com/3.0/service/operating-system-version/?token=TOKEN

Service_Region

This API returns a list of Regions.

API call → http://api.bucksense.com/3.0/service/region/?token=TOKEN


http://api.bucksense.com/3.0/service/region/?search=36&search_field=country_id&token=TOKEN

In the search field, you must enter the “country ID”.

http://api.bucksense.com/3.0/service/region/?search=AUSTRALIA&search_field=country_name&token=TOKEN

In the search field, you must enter the “country NAME”.

Service_Timezone

This API returns a list of timezone.

API call →

https://console.bucksense.com/3.0/service/timezone?filter=id,location,gmt,keyword&limit=100&offset=0&orderby=gmt&token=TOKEN

Login

Model Schema:

{
  "id": "integer",
  "type": "string",
  "uid": "string",
  "status": "string",
  "token": "string"
}

Example:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
        {
            "id": "668",
            "type": "advertiser",
            "company_uid": "k584e5ece58f6ac",
            "status": "active",
            "token": "8f2e56755e425ad5fbb0f91dfd1e7996"
        }
    ],
   "_pagination": {
      "totalCount": 1,
      "offset": 0,
      "limit": 0
   },
   "_metadata": {
      "reads": 1,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 1,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.056971073,
      "start_microtime": 1.48224486E9,
      "version": "3.0.02"
   }
}

If you like to create an account:

www.bucksense.com

and click “Request Account” button. Please fill the form with your data.
We will ask you to confirm your email address by sending you a link to activate your account.

Click and Start!

This is API for Authenticates a User.

HTTP Request

GEThttps://api.bucksense.com/3.0/login/

Request Parameters

Parameter name Data Type Description Required
Username String Username to authenticate YES
Password String (MD5 encrypted) Password to authenticate YES

Response Parameters

Parameter name Parameter Type Data Type Description
Token Query String Token Access
ID Query Integer ID user
Type Query String Role = ‘advertiser’ or 'publisher’
UID Query String UID company
Status Query String Value = active’ or 'paused’ or 'pending’ or 'deleted’



QUERY STRING Examples:

https://api.bucksense.com/3.0/login/?username=test@bucksense.com&password=a915bdg1a86aacc36d5ab4ef71c64gg5

Response:
{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: “1234”,
“type”: “advertiser”,
“company_uid”: “r444t5ecf58y6uf”,
“status”: “active”,
“token”: “abcdef3ce6bad3d86r5d12323e5c646ss” } ] }

In the response you will return the token field (token:“abcdef3ce6bad3d86r5d12323e5c646ss”), that you can use in calls to other APIs.
A token is valid for 60 minutes. So you can work with one session for an hour until it expires.
A maximum session number has been set in the hour.

Authenticates a User

Alert Sender

Model Schema:

{
   "timestamp": "string",
   "action": "string",
   "entity": "string",
   "row": {
      "id": "integer"
   }
}

Example 1 - Audit Adtag:

{
   "timestamp": "2017-02-10T05:54:15",
   "action": "loady",
   "entity": "adtag_audit",
   "row": {
      "id": 1084
   }
}

Example 2 - Creative Audit for Google:

{
    "timestamp":"2016-07-08T16:19:27+02:00",
    "action":"loady",
    "entity":"google_audit",
    "row":{
        "id":5
    }
}

Example 3 - Content malicious:

{
        "timestamp": "2016-07-08T16:19:27+02:00",
        "action": "loady",
        "entity": "tmt_incident",
        "row":
        { "id": 5,        
          "uid": "aaa", 
          "type": 1     
        }
}

Example 4 - Campaign Started:

{
   "timestamp": "2017-02-10T05:42:13",
   "action": "loady",
   "entity": "campaign_started",
   "row": {
      "id": 9707
   }
}

Example 5 -
Advertiser’s budget exhausted:

{
    "timestamp":"2017-02-21T23:59:55",
    "action":"loady",
    "entity":"advertiserzerofunds",
    "row":{
        "id":843
    }
}

Example 6 -
Advertiser’s budget almost exhausted:

{
   "timestamp": "2017-02-09T13:00:11",
   "action": "checkplatform",
   "entity": "lowfundsadvertiser",
   "row": {
      "id": 1321,
      "hour": "24",
      "bag_available": "2,258.47",
      "spent_hour": "94.45427997907002",
      "remain_hour": 23
   }
}

Example 7 - Adfunds Advertiser:

{
    "timestamp":"2017-02-21T18:09:24-05:00",
    "transaction_id":"510",
    "action":"api",
    "entity":"internal_transfer_to_advertiser",
    "request":"update",
    "company":135,
    "hash":"4510b72d8c0742a9af232556af813ggg",
    "row":{
        "operation":"addition",
        "sign":"+",
        "advertiser_id":804,
        "amount":"30"
    }
}

Example 8 - Adfunds Company:

{
   "timestamp": "2017-02-10T05:11:21-05:00",
   "transaction_id": "412",
   "action": "api",
   "entity": "internal_transfer_to_company",
   "request": "update",
   "company": 1,
   "hash": "a4289e576e041b3c392385d7462e3ggg",
   "row": {
      "operation": "addition",
      "sign": "+",
      "company_id": 394,
      "amount": "1000"
   }
}

The alert sender is a java application that processes a queue of requests.

The purpose is to get, starting from entity_id, all users who did choose to receive alerts.

There are various scenarios that require you to send an email to the member or to the advertiser:
for campaigns/advertiser/account runs out of funds or campaigns activated or banners are audited.

For each scenario the customized email are created.

The Json Input is as the following:

{“timestamp”: “2016-07-08T16:19:27+02:00”, “action”: “api”, “entity”: “video_audit”, “row”: { “id”: 5} }

Parameters

Parameter name Description Data Type Required
Timestamp Timestamp of the event String YES
Action Who sends the event String YES
Entity The entity changed String YES
Raw Custom event information Array YES



ACTION Options:

The Action field indicates which application requested a particular event.
In the following table are the descriptions of different scenarios in particular:

Options Description
API when the request is from API
Checkplatform when the request is from application Checkplatform
Loady when the request is from others applications

NOTE:

The Checkplatform is an application that notifies within what time period the advertiser will end the money.
This calculation is based on an evaluation of the past for cost spent from the customer.



ENTITY Type:

The Entity field indicates the name of the entity that is subject to a change of status or audit or bag.
The event type is determined from the pair (Entity, Action).
In the following table are the descriptions of different scenarios in particular:

Options Entity Description Example
Audit Creative/Native/Adtag/VideoLoadyevent generated when there is an audit (positive or negative)
of the different objects
Example 1
Google_audit Loady event generated when there is an creative audit (positive or negative)
for Google
Example 2
Tmt_incident Loady when the contents of a adTag or a Video are malicious Example 3
Campaign_started Loady when the campaign starts Example 4
Advertiserzerofunds Loady when the advertiser’s budget is exhausted Example 5
Lowfundsadvertiser Checkplatform when the advertiser’s budget is almost exhausted Example 6
Internal_transfer_to_advertiser Api when the advertiser’s budget is uploadedExample 7
Internal_transfer_to_company Api when the company’s budget is uploadedExample 8




Format Requests Examples:


{“timestamp”:“2016-07-08T16:19:27+02:00”,“action”:“loady”,“entity”:“video_audit/adtag_audit/native/creative”,
“row”:{“id”:{id_creative or id_native or id_tag or id_video}}


{“timestamp”:“2016-07-08T16:19:27+02:00”,“action”:“loady”,“entity”:“google_audit”,“row”:{“id”:{creative_id}}


{ “timestamp”: “2016-07-08T16:19:27+02:00”, “action”: “loady”, “entity”: “tmt_incident”,
“row”:{ “id”: {campaign_id},“uid”: {uid_adtag or uid_video},“type”: {1 (=adtag) or 2 (=video)}} }


{ “timestamp”:“2016-07-08T16:19:27+02:00”, “action”:“loady”, “entity”:“campaign_started”, “row”:{ “id”:{campaign_id}} }


{ “timestamp”:“2017-02-21T23:59:55”, “action”:“loady”, “entity”:“advertiserzerofunds”, “row”:{ “id”:{advertiser_id}} }


{“timestamp”:“2017-02-09T13:00:11”,“action”:“checkplatform”,“entity”:“lowfundsadvertiser”,
“row”:{“id”:{advertiser_id},“hour”:“24”,“bag_available”:“2,258.47”,“spent_hour”:“94.45427997907002”,“remain_hour”:23}}


{ “timestamp”:“2017-02-21T18:09:24-05:00”, “transaction_id”:“510”, “action”:“api”, “entity”:“internal_transfer_to_advertiser”, “request”:“update”, “company”:{company_id}, “hash”:“{string for validation Json}”, “row”:{ “operation”:“addition”, “sign”:“+”, “advertiser_id”:{advertiser_id}, “amount”:“{amount added}” } }


{ “timestamp”:“2017-02-21T10:23:06-05:00”, “transaction_id”:“505”, “action”:“api”, “entity”:“internal_transfer_to_company”, “request”:“update”, “company”:{company_id wich makes the request}, “hash”:{string for validation Json}, “row”:{ operation":“addition”, “sign”:“+”, “company_id”:{company_id}, “amount”:“{amount added}” } }

Adtag Manager

Model Schema:

{
  "id": "integer",
  "uid": "string",
  "name": "string"
  "size_id": "integer",
  "size_width": "integer",
  "size_height": "integer",
  "size_type": "string",
  "https": "string",
  "*Raw*": "string",
  "type": "string",
  "status": "string",
  "advertiser_id": "integer",
  "advertiser_name": "string"
}

The Adtag is a type of creativity that contains one scripting.
The AdTag is an HTML or JavaScript code that includes an advertisement content of a given size and type a URL.
This code allows advertisers more complete and more structured management of ad campaigns, making their campaign setup process much easier. Bucksense lets you use HTML/JavaScript, Iframe and MRAID Ad Tags for delivering standard and rich media ads, for all campaign’s types (desktop, mobile web or App). With Ad Tags you can use your own ad server and determine what creatives to show to what users.

For further information for Adtag concept, please check out the user guide:

How an Adtag works

For further information side console, please check out the user guide with the steps to follow:

Create a new Adtag

This API return the information about the adtag.

HTTP Request

GEThttps://api.bucksense.com/3.0/adtag/manager/

POSThttps://api.bucksense.com/3.0/adtag/manager/

GET (id)https://api.bucksense.com/3.0/adtag/manager/{id}

PUThttps://api.bucksense.com/3.0/adtag/manager/{id}

GET Adtag_Manager

Example GET Adtag_Manager:

{
    "httpstatus": "OK",
    "httpcode": 200,
    "error": 0,
    "data": [
        {
            "id": 265,
            "uid": "u5824732bc7efc4",
            "name": "a",
            "size_id": 50,
            "size_width": 240,
            "size_height": 240,
            "size_type": "standard",
            "https": true,
            "*Raw*": "<html>\r\n<body>\r\n<iframe style=\"width:0;height:0;border:0;border:none;\" src=\"%%CLICK_URL%%&domain=%%DOMAIN_ENC%%&page_url_enc=%%PAGE_URL_ENC%%&app_name=%%APP_NAME_ENC%%&app_bundle_enc=%%APP_BUNDLE_ENC%%&app_store_ur_enc=%%APP_STORE_URL_ENC%%&app_version_enc=%%APP_VERSION_ENC%%&device_lat=%%DEVICE_LAT%%&device_lon=%%DEVICE_LON%%\" sandbox='allow-scripts'>\r\n</iframe>\r\n<a href=\"%%CLICK_URL%%\" target=\"_blank\">\r\n<img src=\"https://i.bksn.se/s/708/u56b8b40b6e52du.gif\" width=\"300\" height=\"250\">\r\n</a>\r\n</body>\r\n</html>",
            "type": "htmljs",
            "status": "active",
            "advertiser_id": 700,
            "advertiser_name": "advQA 1001"
        },
        {
            "id": 280,
            "uid": "j5841577904d790",
            "name": "a",
            "size_id": 48,
            "size_width": 160,
            "size_height": 160,
            "size_type": "standard",
            "https": true,
            "*Raw*": "<script type=\"text/javascript\" src=\"http://ad.ajillionmax.com/ad/20741/tag.js?pubid=%%PUB_ID%%&mediatype=mobileweb&channel=IAB1&channel=IAB12&channel=IAB6&channel=IAB18\"></script>",
            "type": "htmljs",
            "status": "active",
            "advertiser_id": 888,
            "advertiser_name": "ADV Test"
        }
    ],
    "_pagination": {
        "totalCount": 79,
        "offset": 0,
        "limit": 2
    },
    "_metadata": {
        "reads": 2,
        "read_limit": 1000,
        "read_limit_seconds": 60,
        "writes": 0,
        "write_limit": 100,
        "write_limit_seconds": 60,
        "requests": 17,
        "request_limit": 5000,
        "request_limit_seconds": 60,
        "time": 0.10047817230225,
        "start_microtime": 1487321631.932,
        "version": "3.0.02"
    }
}

This API returns a list of adtag.

HTTP Request

GEThttps://api.bucksense.com/3.0/adtag/manager/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
Limit Query Integer It constrains the number of rows in a result set (the default is 10) Optional
Offset Query Integer The offset specifies the offset of the first row to return.
The offset of the first row is 0, not 1 (the default is 0)
Optional
Orderby Query String It is used to sort the data in a record set
(the records are in order of ascending ID by default)
Optional
Sort Query String It is used to sort the records in a descending order, you can use the 'desc’ keyword
(the default is 'asc’)
Optional
Filter Query String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Optional
Search Query String It is used to search the data in a record set. Use a comma separated list of search terms to use. Ability to use the * operator. (default 'string’, without **) Optional
Search_field Query String It is used to define search field target. Use a comma separated list of fields to use Optional
Search_condition Query String It is used to specify the condition of the search 'and’ & 'or’ in the case of multiple search fields (the default is 'or’) Optional



QUERY STRING Examples:

Without Filter :
https://api.bucksense.com/3.0/adtag/manager?token=TOKEN

With Filter:

https://api.bucksense.com/3.0/adtag/manager/?limit=2&offset=0&orderby=name&sort=asc&filter=name,Raw&token=TOKEN

Response: { “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 1338,“name”: “A test”,
“Raw”: “<a href=http://www.bucksense.com&app_name=%%APP_NAME_ENC%% target=&quot;_blank&quot;>
<img src=&quot;https://i.bksn.se/s/123/y55799421u81e5m.gif&quot; width=&quot;320&quot; height=&quot;50&quot;></a>” },

{ “id”: 1339,“name”: “B test”,
“Raw”: “<a href=http://www.bucksense.com&app_name=%%APP_NAME_ENC%% target=&quot;blank&quot;>
<img src=&quot;https://i.bksn.se/s/456/y55799421e51i5m.gif&quot; width=&quot;320&quot; height=&quot;50&quot;></a>” },

{ “id”: 1340,“name”: “C test”,
“Raw”: “<html>\r\n<body>\r\n<a href=http://www.bucksense.com&app
name=%%APP_NAME_ENC%% target=&quot;_blank&quot;>
<img src=&quot;https://i.bksn.se/s/662/y55799421e51e5m.gif&quot; width=&quot;300&quot; height=&quot;250&quot;></a>\r\n</body>\r\n</html>” } ]… }


https://api.bucksense.com/3.0/adtag/manager/?search=1338,1340&search_condition=OR&search_field=id,id&sort=asc&token=TOKEN

Response: { “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 1338,“name”: “A test”,
“Raw”: “<a href=http://www.bucksense.com&app_name=%%APP_NAME_ENC%% target=&quot;_blank&quot;>
<img src=&quot;https://i.bksn.se/s/123/y55799421u81e5m.gif&quot; width=&quot;320&quot; height=&quot;50&quot;></a>” },

{ “id”: 1340,“name”: “C test”,
“Raw”: “<html>\r\n<body>\r\n<a href=http://www.bucksense.com&app_name=%%APP_NAME_ENC%% target=&quot;_blank&quot;>
<img src=&quot;https://i.bksn.se/s/662/y55799421e51e5m.gif&quot; width=&quot;300&quot; height=&quot;250&quot;></a>\r\n</body>\r\n</html>” } ]… }



NOTE:

Add Adtag_Manager

Example POST Adtag_Manager:

{
    "httpstatus": "OK",
    "httpcode": 200,
    "error": 0,
    "data": [
        {
            "id": 305,
            "vendor": [
                {
                    "id": "1",
                    "code": "10",
                    "name": "Tumri"
                },
                {
                    "id": "2",
                    "code": "42",
                    "name": "BlueKai"
                }
            ],
            "uid": "b58a6d33e52b15z",
            "name": "testAPI",
            "size_id": 2,
            "size_width": 320,
            "size_height": 50,
            "size_type": "mobile",
            "https": true,
            "*Raw*": "<tag>",
            "type": "mraid1",
            "status": "active",
            "advertiser_id": 945,
            "advertiser_name": "advTest"
        }
    ],
    "_metadata": {
        "reads": 0,
        "read_limit": 1000,
        "read_limit_seconds": 60,
        "writes": 1,
        "write_limit": 100,
        "write_limit_seconds": 60,
        "requests": 1,
        "request_limit": 5000,
        "request_limit_seconds": 60,
        "time": 0.34424996376038,
        "start_microtime": 1487328062.27,
        "version": "3.0.02"
    }
}

This API allows the addition of a new adtag.

HTTP Request

POSThttps://api.bucksense.com/3.0/adtag/manager/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
Name Body String It is the adtag name YES
Advertiser_id Body String It is the advertiser related to adtag YES
Size_id Body Integer It is the size (width x height) of adtag YES
Type Body String It is the type script of adtag
Values: '1’= HTML/JS, '2’ = MRAID 1, '3’ = MRAID 2, '4’ = iIFRAME
YES
Raw Body String It is the type script of adtag YES
Htpps Body Integer Value: true or false Optional
Status Body String Value: active or paused Optional
Vendor Body String It is the numerical identification used by the vendor_type associeted to adtag Optional



QUERY STRING Examples:

https://api.bucksense.com/3.0/adtag/manager/?token=TOKEN

Raw:{
“name”: “testAPI”,
“size_id”: 2,
“https”: true,
Raw: “<html><body>
<a href=http://www.bucksense.com&app_name=%%APP_NAME_ENC%% target=”blank">
<img src=“https://i.bksn.se/s/642/y55799411e51f4t.gif” width=“320” height=“50”></a>
</body></html>“,
"type”: “htmljs”,
“advertiser
id”: 945,
“vendor”: [1,2] }



Examples for different types of adtags:

“<script type=&quot;text/javascript&quot;
src=&quot;http://ad.ajillionmax.com/ad/20741/tag.js?pubid=%%PUB_ID%%&mediatype=mobileweb
&channel=IAB1&channel=IAB12&channel=IAB6&channel=IAB18&quot;></script&g”

<html><body>
<a href=http://www.bucksense.com&app_name=%%APP_NAME_ENC%% target=“_blank”>
<img src=“https://i.bksn.se/s/662/y55799421e51e5m.gif” width=“320” height=“50”></a>
</body></html>

<html><body>
<iframe style=“width:0;height:0;border:0;border:none;”
src=“%%CLICK_URL%%&domain=%%DOMAIN_ENC%%&page_url_enc=%%PAGE_URL_ENC%%
&app_name=%%APP_NAME_ENC%%&app_bundle_enc=%%APP_BUNDLE_ENC%%
&app_store_ur_enc=%%APP_STORE_URL_ENC%%&app_version_enc=%%APP_VERSION_ENC%%
&device_lat=%%DEVICE_LAT%%&device_lon=%%DEVICE_LON%%” sandbox='allow-scripts’> </iframe>
<a href=“%%CLICK_URL%%” target=“_blank”>
<img src=“https://i.bksn.se/s/904/f57f239649e6507.jpg” width=“320” height=“50”></a>
</body></html>

<script type='text/javascript’>
var rma ={ 'campaignId’:'406206cdff45ed4cdea68acbc28a4639’, 'secure’:true, 'cb’:’%%CACHE_BUSTER%%’, 'cte’:’%%CLICK_URL%%’, 'fet’:'https://app.appsflyer.com/id1135179082?pid=mobileads&c=retargeting’, 'tags’:{'dsp’:'Bucksense’,'exchange’:’{exchange_id}’,'inventory’:’{pub_id}’,'uniqueId’:’{device_ios_ifa}{device_android_ifa}’} };
</script> <img src='https://www.cdn.serving1.net/t?i=406206cdff45ed4cdea68acbc28a4639&dsp=Bucksense&exchange=Bucksense&customId=noblock&cb=%%CACHE_BUSTER%%’ width='1px’ height='1px’ style='display:none’ onerror=“this.onerror=null;this.src='https://track.richmediaads.com/t?i=406206cdff45ed4cdea68acbc28a4639&dsp=Bucksense&exchange=Bucksense&customId=adblock&cb=%%CACHE_BUSTER%%’” /><script src='mraid.js’></script><script type='text/javascript’ src='https://cdn.serving1.net/general.js’></script>



TYPE AdTAG Options:

These are the possible values for Adtag type:

Value Option
1 HTML/JS
2 MRAID 1
3 MRAID 2
4 iIFRAME

GET (id) Adtag_Manager

Example Get (id) Adtag_Manager:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 280,
         "uid": "j5841577904d790",
         "name": "test",
         "size_id": 48,
         "size_width": 160,
         "size_height": 160,
         "size_type": "standard",
         "https": true,
         "*Raw*": "<script type=\"text/javascript\" src=\"http://ad.ajillionmax.com/ad/20741/tag.js?pubid=%%PUB_ID%%&mediatype=mobileweb&channel=IAB1&channel=IAB12&channel=IAB6&channel=IAB18\"><\/script>",
         "type": "htmljs",
         "status": "active",
         "advertiser_id": 945,
         "advertiser_name": "adv test"
      }
   ],
   "_pagination": {
      "totalCount": 1,
      "offset": 0,
      "limit": 100
   },
   "_metadata": {
      "reads": 4,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 22,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.19315982,
      "start_microtime": 1.48758157E9,
      "version": "3.0.02"
   }
}

Example Get (id) Adtag_Manager
with filter:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 280,
         "name": "a",
         "type": "htmljs",
         "status": "active"
      }
   ],
   "_pagination": {
      "totalCount": 1,
      "offset": 0,
      "limit": 100
   },
   "_metadata": {
      "reads": 2,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 2,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.1390369,
      "start_microtime": 1.48758362E9,
      "version": "3.0.02"
   }
}

This API allows the editing of a new adtag.

HTTP Request

GET (id)https://api.bucksense.com/3.0/adtag/manager/{id}

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Path Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Limit Query Integer It constrains the number of rows in a result set (the default is 10) Optional
Offset Query Integer The offset specifies the offset of the first row to return.
The offset of the first row is 0, not 1 (the default is 0)
Optional
Orderby Query String It is used to sort the data in a record set
(the records are in order of ascending ID by default)
Optional
Sort Query String It is used to sort the records in a descending order, you can use the 'desc’ keyword
(the default is 'asc’)
Optional
Filter Query String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Optional
Search Query String It is used to search the data in a record set. Use a comma separated list of search terms to use. Ability to use the * operator. (default 'string’, without **) Optional
Search_field Query String It is used to define search field target. Use a comma separated list of fields to use Optional
Search_condition Query String It is used to specify the condition of the search 'and’ & 'or’ in the case of multiple search fields (the default is 'or’) Optional



QUERY STRING Examples:

https://api.bucksense.com/3.0/adtag/manager/1340/?token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 1340,
“uid”: “a593ff51596f123”,
“name”: “testAPI”,
“size_id”: 2,
“size_width”: 320,
“size_height”: 50,
“size_type”: “mobile”,
“https”: false,
“Raw”: “<html><body>
<a href="http://www.bucksense.com” target=“blank”>
<img src=“http://us.bksn.se/s/743/t589466835111ca.jpg” width=“300” height=“250”></a>
</body></html>“,
"type”: “mraid1”,
“status”: “active”,
“advertiser
id”: 839,
“advertiser_name”: “3003Test” } ]… }


https://api.bucksense.com/3.0/adtag/manager/1340/?filter=name,type,status&token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 1340,
“name”: “testAPI”,
“type”: “mraid1”,
“status”: “active” } ]… }

Edit Adtag_Manager

Example PUT Advertiser_Manager:

{
    "httpstatus": "OK",
    "httpcode": 200,
    "error": 0,
    "data": [
        {
            "id": 305,
            "vendor": [
                {
                    "id": "12",
                    "code": "225",
                    "name": "Zanox"
                }
            ],
            "uid": "q58a6e486821c0t",
            "name": "testAPI bis",
            "size_id": 2,
            "size_width": 320,
            "size_height": 50,
            "size_type": "mobile",
            "https": true,
            "*Raw*": "<tag></tag>",
            "type": "mraid1",
            "status": "paused",
            "advertiser_id": 945,
            "advertiser_name": "0806RG"
        }
    ],
    "_metadata": {
        "reads": 0,
        "read_limit": 1000,
        "read_limit_seconds": 60,
        "writes": 4,
        "write_limit": 100,
        "write_limit_seconds": 60,
        "requests": 4,
        "request_limit": 5000,
        "request_limit_seconds": 60,
        "time": 0.32714796066284,
        "start_microtime": 1487332486.446,
        "version": "3.0.02"
    }
}

This API allows the editing of a new adtag.

HTTP Request

PUThttps://api.bucksense.com/3.0/adtag/manager/{id}

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Path Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Name Body String It is the adtag name Optional
Raw Body String It is the type script of adtag Optional
Status Body String Value: active or paused Optional
Vendor Body String It is the numerical identification used by the vendor_type associeted to adtag Optional



QUERY STRING Examples:

https://api.bucksense.com/3.0/adtag/manager/305/?token=TOKEN

Raw:{
“name”: “testAPI bis”,
Raw: “”,
“status”: “paused”,
“vendor”: [12] }

ATTENTION !

The fields ADVERTISER, SIZE and TYPE can not be edited → see the error 401/10014 on (http://apidoc.bucksense.com/#errors]

Advertiser Manager

Model Schema:

{
  "id": "integer",
  "uid": "string"
  "name": "string",
  "address_1": "string",
  "address_2": "string",
  "city": "string",
  "zipcode": "string",
  "phone": "string",
  "country_code": "string",
  "country_name": "string",
  "state_code": "string",
  "state_name": "string",
  "type": "string",
  "status": "string",
  "auto_topup": "integer"
}

An advertiser is a user who has access only to the Advertiser Account selected.

This API return the information about the advertiser.

HTTP Request

GEThttps://api.bucksense.com/3.0/advertiser/manager/

GET Advertiser_Manager

Example GET Advertiser_Manager:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
        "id": 715,
        "name": "advtest1",
        "address_1": "Via Prampolini, 15",
        "address_2": "",
        "city": "Roma",
        "zipcode": "00132",
        "phone": "+393707070707",
        "country_code": "IT",
        "country_name": "Italy",
        "state_code": "",
        "state_name": "",
        "status": "active",
        "auto_topup": 0
      }
   ],
   "_pagination": {
      "totalCount": 31,
      "offset": 0,
      "limit": 3
   },
   "_metadata": {
      "reads": 2,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 2,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 24.097593,
      "start_microtime": 1.48648282E9,
      "version": "3.0.02"
   }
}

This API returns a list of advertisers related to a company.

HTTP Request

GEThttps://api.bucksense.com/3.0/advertiser/manager/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
Filter Query String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Optional
Search Query String It is used to search the data in a record set. Use a comma separated list of search terms to use. Ability to use the * operator. (default 'string’, without **) Optional
Search_field Query String It is used to define search field target. Use a comma separated list of fields to use Optional
Search_condition Query String It is used to specify the condition of the search 'and’ & 'or’ in the case of multiple search fields (the default is 'or’) Optional
Bag Query Integer It is used to return the bag associated with the advertiser,
(the default value is '0’ - false
Optional



QUERY STRING Examples:

Without Filter :
https://api.bucksense.com/3.0/advertiser/manager/1300/?token=TOKEN



With Filter:

  1. Below, an example of a search for advertiser when do you want to see only some fields:
    https://api.bucksense.com/3.0/advertiser/manager/945/?filter=name,status&token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 945,
“name”: “testAPI”,
“status”: “active” } ] }


2. Below, an example of a search for advertiser when do you want to see the bag associated:
https://api.bucksense.com/3.0/advertiser/manager/1300/?bag=1&filter=name,status,token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 945,
“name”: “testAPI”,
“status”: “active”, “bag_amount_live”: 13, } ] }

Advertiser Account

Model Schema:

{
  "id": "integer",
  "name": "string",
  "surname": "string",
  "email": "string",
  "office_phone": "integer",
  "cell_phone": "integer",
  "chat": "string",
  "timezone_id": "integer",
  "creation_date": "date",
  "last_update": "date",
  "status": "string",
  "role": "integer",
  "company_id": "integer",
  "company_name": "string",
  "company_internal": "integer"
}

When you created the advertiser object, with the Advertiser_account API you can create accounts to it linked.

Each advertiser can have N different accounts. But each account can be associated with only one advertiser.
That is, the same account can not be used for more than one advertiser.
So (Advertiser:Account) in relationship (1:N).

This API return the information about the account. It is used for the enter the accounts related an advertiser.

HTTP Request

GEThttps://api.bucksense.com/3.0/account/manager/

POSThttps://api.bucksense.com/3.0/account/manager/

GET (id)https://api.bucksense.com/3.0/account/manager/{id}

GET Advertiser_Account_Manager

Example GET Advertiser_Account_Manager:



{
    "httpstatus": "OK",
    "httpcode": 200,
    "error": 0,
    "data": [
        {
            "id": 21,
            "name": "adv_2",
            "surname": "adv_2",
            "status": "active"
        },
        {
            "id": 26,
            "name": "adv_7",
            "surname": "adv_7",
            "status": "active"
        }
    ],
   "_pagination": {
      "totalCount": 31,
      "offset": 0,
      "limit": 3
   },
   "_metadata": {
      "reads": 2,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 2,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 24.097593,
      "start_microtime": 1.48648282E9,
      "version": "3.0.02"
   }
}

This API returns a list of accounts related to an advertiser.

HTTP Request

GEThttps://api.bucksense.com/3.0/account/manager/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
Advertiser_id Query Integer ID of the advertiser YES
Limit Query Integer It constrains the number of rows in a result set (the default is 10) Optional
Offset Query Integer The offset specifies the offset of the first row to return.
The offset of the first row is 0, not 1 (the default is 0)
Optional
Orderby Query String It is used to sort the data in a record set
(the records are in order of ascending ID by default)
Optional
Sort Query String It is used to sort the records in a descending order, you can use the 'desc’ keyword
(the default is 'asc’)
Optional
Filter Query String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Optional
Search Query String It is used to search the data in a record set. Use a comma separated list of search terms to use. Ability to use the * operator. (default 'string’, without **) Optional
Search_field Query String It is used to define search field target. Use a comma separated list of fields to use Optional
Search_condition Query String It is used to specify the condition of the search 'and’ & 'or’ in the case of multiple search fields (the default is 'or’) Optional
Search_and Query String It is used to search the data in a record set. Use a comma separated list of search terms to use. Ability to use the * operator. (default 'string’, without **) Optional
Search_and_field Query String It is used to define search field target. Use a comma separated list of fields to use Optional
Search_and_condition Query String It is used to specify the condition of the search 'and’ & 'or’ in the case of multiple search fields (the default is 'or’) Optional



QUERY STRING Examples:

Without Filter:

https://api.bucksense.com/3.0/account/manager/?token=TOKEN&children=1


With Filter:

https://api.bucksense.com/3.0/account/manager/?token=TOKEN&children=1&orderby=id


https://api.bucksense.com/3.0/account/manager/?token=TOKEN&children=1&orderby=id&limit=2


https://api.bucksense.com/3.0/account/manager/?token=TOKEN&children=1&orderby=id&filter=username,status

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [
{ “id”: 1234, “username”: “test1@bucksense.com”, “status”: “active” },
{ “id”: 1235, “username”: “test2@bucksense.com”, “status”: “waiting” },
{ “id”: 1236, “username”: “test3@bucksense.com”, “status”: “active” } ]… }

Add Advertiser_Account_Manager

Example POST Advertiser_Account_Manager:

{
    "httpstatus": "OK",
    "httpcode": 200,
    "error": 0,
    "data": [
        {
            "id": 1881,
            "name": "Test",
            "surname": "Doc",
            "email": "test@bucksense.com",
            "office_phone": "06-123456",
            "cell_phone": "987654321",
            "chat": "",
            "timezone_id": 17,
            "creation_date": "2017-05-26T07:15:04-04:00",
            "last_update": "2017-05-29T06:28:56-04:00",
            "status": "active",
            "role": "advertiser",
            "company_id": 4,
            "company_name": "Demo Company",
            "advertiser": [
                {
                    "id": 839,
                    "name": "AdvTest"
                }
            ],
            "alert": [],
            "permission": [
                {
                    "id": 5,
                    "name": "developer_management",
                    "type": "RW"
                }
            ],
            "permission_unsigned": [
                {
                    "id": 4,
                    "name": "accounting"
                },
                {
                    "id": 6,
                    "name": "engagement_admin_management"
                },
                {
                    "id": 7,
                    "name": "offer_management"
                },
                {
                    "id": 8,
                    "name": "campaign_management"
                },
                {
                    "id": 9,
                    "name": "report"
                }
            ]
        }
    ],
    "_metadata": {
        "reads": 0,
        "read_limit": 1000,
        "read_limit_seconds": 60,
        "writes": 2,
        "write_limit": 100,
        "write_limit_seconds": 60,
        "requests": 2,
        "request_limit": 5000,
        "request_limit_seconds": 60,
        "time": 0.6876699924469,
        "start_microtime": 1496053736.078,
        "version": "3.0.02"
    }
}

This API enter a new account related an advertiser.

HTTP Request

POSThttps://api.bucksense.com/3.0/account/manager/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
Advertiser_id Body Integer ID of the advertiser YES
Username Body String UserName of Advertiser YES
Password Body String Access Password YES
Email Body String email of User YES
Role Body String User Role YES
Confirmation_url Body String email for confirmation Account YES
Permission Body Array User permission YES
Name Body String Name of User Optional
Surname Body String Surname of User Optional
Office_phone Body Integer Office number Optional
Cell_phone Body Integer Cellular number Optional



PERMISSION Options:

These are the possible values, according to the permissions that we want to give to the advertiser:

Options Type Description
4 RW = Read&Write or R =Read Accounting
5 RW = Read&Write or R =Read Developer_management
6 RW = Read&Write or R =Read Engagement_admin_management
7 RW = Read&Write or R =Read Offer_management
8 RW = Read&Write or R =Read Campaign_management
9 RW = Read&Write or R =Read Report



QUERY STRING Examples:

https://api.bucksense.com/3.0/account/manager/?token=TOKEN

Raw:{ “advertiser_id”=“839”,
“username”: “account@email.com”,
“password”: “12345”,
“name”:“Test”,
“email”: “account@bucksense.com”,
“role”: “advertiser”,
“confirmation_url”: “validate/account/uid”,
“permission”: [{“id”: 5, “type”: “RW”}] }


Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 1234,
“name”: “Test”,
“email”: “test@bucksense.com”,
“office_phone”: “06-123456”,
“cell_phone”: “987654321”,
“chat”: “”,
“timezone_id”: 17,
“creation_date”: “2017-05-26T07:15:04-04:00”,
“last_update”: “2017-05-29T06:28:56-04:00”,
“status”: “active”,
“role”: “advertiser”,
“company_id”: 4,
“company_name”: “Demo Company”,
“advertiser”: [ { “id”: 839, “name”: “AdvTest” } ],
“alert”: [],
“permission”: [ { “id”: 5, “name”: “developer_management”, “type”: “RW” } ],
“permission_unsigned”: [
{ “id”: 4, “name”: “accounting” },
{ “id”: 6, “name”: “engagement_admin_management” },
{ “id”: 7, “name”: “offer_management” },
{ “id”: 8, “name”: “campaign_management” },
{ “id”: 9, “name”: “report” } ] } ] }

GET (id) Advertiser_Account_Manager

Example GET Advertiser_Account_Manager:

{
    "httpstatus": "OK",
    "httpcode": 200,
    "error": 0,
    "data": [
        {
            "id": 21,
            "name": "adv_2",
            "surname": "adv_2",
            "status": "active"
        }
    ],
   "_pagination": {
      "totalCount": 31,
      "offset": 0,
      "limit": 3
   },
   "_metadata": {
      "reads": 2,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 2,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 24.097593,
      "start_microtime": 1.48648282E9,
      "version": "3.0.02"
   }
}

This API returns a list of accounts related to an advertiser.

HTTP Request

GET (id)https://api.bucksense.com/3.0/account/manager/{id}

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
Advertiser_id Query Integer ID of the advertiser YES
ID Path Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Limit Query Integer It constrains the number of rows in a result set (the default is 10) Optional
Offset Query Integer The offset specifies the offset of the first row to return.
The offset of the first row is 0, not 1 (the default is 0)
Optional
Orderby Query String It is used to sort the data in a record set
(the records are in order of ascending ID by default)
Optional
Sort Query String It is used to sort the records in a descending order, you can use the 'desc’ keyword
(the default is 'asc’)
Optional
Filter Query String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Optional
Search Query String It is used to search the data in a record set. Use a comma separated list of search terms to use. Ability to use the * operator. (default 'string’, without **) Optional
Search_field Query String It is used to define search field target. Use a comma separated list of fields to use Optional
Search_condition Query String It is used to specify the condition of the search 'and’ & 'or’ in the case of multiple search fields (the default is 'or’) Optional



QUERY STRING Examples:

https://console.bucksense.com/api/account/manager/123/?token=TOKEN

Edit Advertiser_Account

Example PUT Advertiser_Account:

{
    "httpstatus": "OK",
    "httpcode": 200,
    "error": 0,
    "data": [
        {
            "id": 1881,
            "name": "Test",
            "surname": "Doc",
            "email": "test@bucksense.com",
            "office_phone": "06-123456",
            "cell_phone": "987654321",
            "chat": "",
            "timezone_id": 17,
            "creation_date": "2017-05-26T07:15:04-04:00",
            "last_update": "2017-05-29T06:28:56-04:00",
            "status": "active",
            "role": "advertiser",
            "company_id": 4,
            "company_name": "Demo Company",
            "advertiser": [
                {
                    "id": 839,
                    "name": "AdvTest"
                }
            ],
            "alert": [],
            "permission": [
                {
                    "id": 4,
                    "name": "accounting"
                },
                {
                    "id": 5,
                    "name": "developer_management",
                    "type": "RW"
                }
            ],
            "permission_unsigned": [
                {
                    "id": 6,
                    "name": "engagement_admin_management"
                },
                {
                    "id": 7,
                    "name": "offer_management"
                },
                {
                    "id": 8,
                    "name": "campaign_management"
                },
                {
                    "id": 9,
                    "name": "report"
                }
            ]
        }
    ],
    "_metadata": {
        "reads": 0,
        "read_limit": 1000,
        "read_limit_seconds": 60,
        "writes": 2,
        "write_limit": 100,
        "write_limit_seconds": 60,
        "requests": 2,
        "request_limit": 5000,
        "request_limit_seconds": 60,
        "time": 0.6876699924469,
        "start_microtime": 1496053736.078,
        "version": "3.0.02"
    }
}

This API enter a new account related an advertiser.

HTTP Request

POSThttps://api.bucksense.com/3.0/advertiser/account/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Path Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Name Body String Name of User Optional
Surname Body String Surname of User Optional
Office_phone Body Integer Office number Optional
Cell_phone Body Integer Cellular number Optional
Permission Body Array Account Permission Optional



QUERY STRING Examples:

https://api.bucksense.com/3.0/advertiser/account/1881/?token=TOKEN

Raw:{ “name”:“Test”,
“surname”: “Doc”,
“office_phone”:“06-123456”,
“cell_phone”:“987654321”,
“permission”: [{“id”: 4, “type”: “RW”},{“id”: 5, “type”: “RW”}] }



ATTENTION:

The fields “Advertiser_id”, “Role”, “Confirmation_url”, “Username” and “Email” aren’t editable
→ see the error 401/10014 on http://apidoc.bucksense.com/#errors

Campaign Manager

Model Schema:

{
  "id": "integer",
  "name": "string",
  "start_date": "date-time",
  "end_date": "date-time",
  "adomain": "string",
  "offer_id": "integer",
  "offer_name": "string",
  "offer_type": "string",
  "offer_url": "string",
  "offer_status": "string",
  "advertiser_id": "integer",
  "advertiser_name": "string",
  "timezone_id": "integer",
  "targeting_id": "integer",
  "status": "string",
  "status_bidder": "string",
  "supply_type": "integer",
  "budget_mode_id": "string",
  "type": "string",
  "google": "integer",
  "pmp": "integer",
  "cloned_by": "integer",
  "frequency_capping_immediate_cap_timerange": "integer",
  "frequency_capping_long_term_cap_range": "integer",
  "frequency_capping_long_term_cap_timerange": "integer",
  "creative": [
    null
  ],
  "native": [
    null
  ],
  "daypart": "boolean"
}

This API return the information about the campaign.

A campaign can be of different types, such as creative, native, vide or adtag.


For further information side console, please check out the user guide with the steps to follow:

Create a new Campaign



HTTP Request

GEThttps://api.bucksense.com/3.0/campaign/manager/

POSThttps://api.bucksense.com/3.0/campaign/manager/

GET (id)https://api.bucksense.com/3.0/campaign/manager/{id}

PUThttps://api.bucksense.com/3.0/campaign/manager/{id}



Campaign - START & STOP

After a campaign has been created, for its start/stop you need to change its status. In particular:

https://api.bucksense.com/3.0/campaign/manager/ID/?token=TOKEN

Start - Raw :{“status”:“active”}

Stop - Raw :{“status”:“paused”}

See the examples in section Campaign - Start&Stop

Get all Campaigns

Example GET:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 2222,
         "name": "Test",
         "start_date": "2016-02-08 00:00:00",
         "end_date": "0000-00-00 00:00:00",
         "adomain": "dom.com",
         "offer_id": 1111,
         "offer_name": "test offer",
         "offer_type": "mobile_app",
         "offer_url": "http://it.bucksense.com/",
         "offer_status": "active",
         "mobile_id": 123,
         "mobile_name": "Bucksense App",
         "mobile_os_id": 1,
         "mobile_os_name": "Android",
         "advertiser_id": 123,
         "advertiser_name": "Test ADV",
         "timezone_id": 17,
         "targeting_id": 123,
         "status": "paused",
         "status_bidder": "paused",
         "supply_type": 3,
         "budget_mode_id": 2,
         "type": "creative",
         "google": 1,
         "pmp": 0,
         "cloned_by": 0,
         "frequency_capping_immediate_cap_timerange": 1,
         "frequency_capping_long_term_cap_range": 2,
         "frequency_capping_long_term_cap_timerange": 3,
         "viewability": {
                "provider": "bucksense",
                "provider_name": "Bucksense Viewability",
                "site_track": "off",
                "site_percent_viewed": 50,
                "site_second_viewed": 2,
                "app_track": "off",
                "app_percent_viewed": 50,
                "app_second_viewed": 2
            }
         "creative": [
            {
               "id": 872
            },
            {
               "id": 1359
            }
         ],
         "targeting": [
            {
               "id": 3535,
               "deviceid": 0,
               "intersticial": 0,
               "video_preroll": 0,
               "video_midroll": 0,
               "video_postroll": 0,
               "video_inbanner": 0,
               "country": [
                  {
                     "id": 840,
                     "name": "UNITED STATES",
                     "action": "include"
                  }
               ],
               "connection_type": [
                  {
                     "id": 1,
                     "name": "Wifi",
                     "action": "include"
                  },
                  {
                     "id": 2,
                     "name": "Cellular data",
                     "action": "include"
                  }
               ],
               "device_type": [
                  {
                     "id": 1,
                     "name": "Smartphone",
                     "action": "include"
                  },
                  {
                     "id": 3,
                     "name": "Tablet",
                     "action": "include"
                  }
               ]
            }
         ],
         "daypart": false
      }
   ],
   "_pagination": {
      "totalCount": 1,
      "offset": 0,
      "limit": 100
   },
   "_metadata": {
      "reads": 18,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 45,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.07437205,
      "start_microtime": 1.48171174E9,
      "version": "3.0.02"
   }
}

This API returns a list of all campaigns related to a company.

In the call we can insert filters and/or parameters to display for example:
- only some fields of each campaigns
- sort the campaigns by our id or name
- a defined number of campaigns
- only the campaigns with specific features (for example, only active campaigns)

HTTP Request

GEThttps://api.bucksense.com/3.0/campaign/manager/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
Limit Query Integer It constrains the number of rows in a result set.
The default value is 10
Optional
Offset Query Integer The offset specifies the offset of the first row to return.
The offset of the first row is 0, not 1.
The default value is 0
Optional
Orderby Query String It is used to sort the data in a record set
The records are in order of ascending ID by default
Optional
Sort Query String It is used to sort the records in a descending order,
you can use the 'desc’ keyword
The default value is 'asc’
Optional
Filter Query String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Optional
Search Query String It is used to search the data in a record set.
Use a comma separated list of search terms to use.
Ability to use the * operator.
The default 'string’, without **
Optional
Search_field Query String It is used to define search field target.
Use a comma separated list of fields to use
Optional
Search_condition Query String It is used to specify the condition of the search 'and’ & 'or’
in the case of multiple search fields.
The default value is 'or’
Optional
Search_and Query String It is used to search the data in a record set.
Use a comma separated list of search terms to use.
Ability to use the * operator.
The default 'string’, without **
Optional
Search_and_field Query String It is used to define search field target.
Use a comma separated list of fields to use
Optional
Search_and_condition Query String It is used to specify the condition of the search 'and’ & 'or’
in the case of multiple search fields.
The default value is 'or’
Optional
Status Query String It is used to filter by status the data in a record set.
The possible values are 'draft,active,paused’.
The default value is 'draft’
Optional
Budget Query Integer It is used to return the budget associated with the campaign.
The default value is '0’ - false
Optional
Targeting Query Integer It is used to return the targeting associated with the campaign.
The default value is '0’ - false
Optional
Creative Query Integer It is used to return the creative associated with the campaign.
The default value is '0’ - false
Optional
Native Query Integer It is used to return the native associated with the campaign.
The default value is '0’ - false
Optional
Adtag Query Integer It is used to return the adtag associated with the campaign.
The default value is '0’ - false
Optional


NOTE:

For Budget info, budget=1 should be entered in the string
Example: https://api.bucksense.com/2.0/campaign/manager/12451/?budget=1&token=TOKEN

For Targeting info, targeting=1 should be entered in the string
Example: https://api.bucksense.com/2.0/campaign/manager/12451/?targeting=1&token=TOKEN

For Creative (or Native or Adtag or Video) info, creative=1 or native=1 adtag=1 should be entered in the string
Example: https://api.bucksense.com/2.0/campaign/manager/12451/?creative=1&token=TOKEN



Query String Examples:

Without Filter

With Filter:

https://api.bucksense.com/3.0/campaign/manager/?token=TOKEN&limit=2&orderby=name

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 11223,
“name”: “A test”,
“start_date”: “2017-06-15 00:00:00”,
“end_date”: “2017-06-16 00:00:00”,
“adomain”: “goo.it”,
“impression_tracking”: “”,
“click_through_url”: “”,
“offer_id”: 1234,
“offer_name”: “OFFer Test”,
“offer_type”: “mobile_app”,
“offer_url”: “offer.com”,
“offer_status”: “active”,
“mobile_id”: 234,
“mobile_name”: “Test mobile”,
“mobile_os_id”: 2,
“mobile_os_name”: “iOS”,
“advertiser_id”: 876,
“advertiser_name”: “3003Test Adv”,
“timezone_id”: 44,
“targeting_id”: 12345,
“status”: “active”,
“status_bidder”: “active”,
“supply_type”: 1,
“budget_mode_id”: 1,
“type”: “pop_unders”,
“google”: 0,
“pmp”: 0,
“cloned_by”: 0,
“frequency_capping_immediate_cap_timerange”: 2,
“frequency_capping_long_term_cap_range”: 3,
“frequency_capping_long_term_cap_timerange”: 7,
“daypart”: true,
“viewability”: { “provider”: “bucksense”, “provider_name”: “Bucksense Viewability”,
“site_track”: “off”, “site_percent_viewed”: 50, “site_second_viewed”: 2,
“app_track”: “off”, “app_percent_viewed”: 50, “app_second_viewed”: 2 } },
{ “id”: 12451,
“name”: “B Test”,
“start_date”: “0000-00-00 00:00:00”,
“end_date”: “0000-00-00 00:00:00”,
“adomain”: “forapi.it”,
“impression_tracking”: “”,
“click_through_url”: “”,
“offer_id”: 2890,
“offer_id”: 1234,
“offer_name”: “OFFer Test”,
“offer_type”: “mobile_app”,
“offer_url”: “offer.com”,
“offer_status”: “active”,
“mobile_id”: 234,
“mobile_name”: “Test mobile”,
“mobile_os_id”: 2,
“mobile_os_name”: “iOS”,
“advertiser_id”: 876,
“advertiser_name”: “3003Test Adv”,
“timezone_id”: 17,
“targeting_id”: 12464,
“status”: “draft”,
“status_bidder”: “inactive”,
“supply_type”: 2,
“budget_mode_id”: 1,
“type”: “creative”,
“google”: 0,
“pmp”: 0,
“cloned_by”: 0,
“frequency_capping_immediate_cap_timerange”: 2,
“frequency_capping_long_term_cap_range”: 3,
“frequency_capping_long_term_cap_timerange”: 8,
“daypart”: true },… ] }


https://api.bucksense.com/3.0/campaign/manager/?orderby=name&filter=name,status,type&token=TOKEN&limit=2&orderby=name

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 12451,
“name”: “A TestApi”,
“status”: “draft”,
“type”: “creative” },
{ “id”: 12453,
“name”: “B TestApibis”,
“status”: “paused”,
“type”: “creative” },
{ “id”: 11316,
“name”: “C test”,
“status”: “active”,
“type”: “pop_unders” } ]… }


https://api.bucksense.com/3.0/campaign/manager/?&orderby=name&search=11223,12451&search_condition=OR&search_field=id,id&sort=asc&token=TOKEN

Response (as example above for search of two campaigns):

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 11223,
“name”: “A test”,
….. },
{ “id”: 12451,
“name”: “B Test”,
….. },… ] }



See the others examples in section Campaign-See a campaign created

Create a new Campaign

Example POST:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 1111,
         "name": "doc test",
         "start_date": "0000-00-00 00:00:00",
         "end_date": "0000-00-00 00:00:00",
         "adomain": "goo.com",
         "rotator_id": 406,
         "offer_id": 10035,
         "offer_name": "test QA offer",
         "offer_type": "mobile_web",
         "offer_url": "http://zutils.zedo.com/vastvalidator/#/vastInspector",
         "offer_status": "active",
         "advertiser_id": 2222,
         "advertiser_name": "QA adv test",
         "timezone_id": 44,
         "targeting_id": 9138,
         "status": "draft",
         "status_bidder": "inactive",
         "supply_type": 2,
         "budget_mode_id": 1,
         "type": "creative",
         "google": 0,
         "pmp": 0,
         "cloned_by": 0,
         "frequency_capping_immediate_cap_timerange": 2,
         "frequency_capping_long_term_cap_range": 3,
         "frequency_capping_long_term_cap_timerange": 8,
         "daypart": false,
         "rotator_name": "Bidder_Test"
      }
   ],
   "_metadata": {
      "reads": 0,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 1,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 1,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.15320516,
      "start_microtime": 1.48456704E9,
      "version": "3.0.02"
   }
}

This API allows the addition of a new campaign.

HTTP Request

POSThttps://api.bucksense.com/3.0/campaign/manager/

Parameters

Parameter name Parameter_Type Data Type Description Required
Token Query String Token generated through the API /login YES
Name Body String It is the campaign name YES
Offer_id Body Integer It is the offer associated to the campaign YES
Start_date Body Date-Time Iti is the start of campaign Optional
End_date Body Date-Time It id the stop fo campaign Optional
Adomain Body String Type a valid Top level Domain Optional
Click_through_url Body String Final destination URL Optional
Impression_tracking Body String The URL where you want your impression to arrive Optional
Offer_url Body String The URL where you want your click to arrive Optional
Offer_id Body Integer The offer to which the campaign is associated Optional
Timezone_id Body Integer Timezone of your country Optional
Type Body String It is 'creative’ or 'native’ or 'adcreative_video’ or 'adtag’. The default value is 'creative’ Optional
Supply_type Body Integer The type of incoming traffic. Value = ['1’ or '2’ or '3’]: 1=site; 2=app; 3=both Optional
Budget_mode_id Body Integer The type of budget spending. Value = ['1’ or '2’]: 1=Flat CPM; 2=Optimized CPM Optional
Creative Body Array Banner of campaign Optional
Native Body Array Native of campaign Optional
Adcreative_video Body Array Video of campaign Optional
Adtag Body Array Adtag of campaign Optional
Google Body Integer Value = '0’:false or '1’:true
PMP Body Integer Private Market Place Optional
Cloned_by Body Integer It is the “id” of the duplicate campaign Optional
Frequency_capping_immediate_Cap_Timerange Body Integer Defines the impression cap delivered in a specific time range Optional
Frequency_capping_long_term_Cap_Range Body Integer Defines the impression cap delivered in a specific time range Optional
Frequency_capping_long_term_Cap_Timerange Body Integer Defines the impression cap delivered in a specific time range Optional
Daypart Body Boolean Value = 'sunday’, 'monday’, …. Optional
Daypart Body Array Range time: [“02:00”,“02:59”],[“09:00”,“17:59”] Optional
Flat_cpm Boby Array CPM setting Optional
Budget Body Integer Spending setting Optional
Budget_type Body Integer Type of budget.Value = ['1’ or '2’]: 1=Unlimited CPM; 2=Capped Optional
Daily_cap Body Integer Define the daily budget for campaign Optional
CPM Body Integer Cost per Mille Impressions Optional


NOTE:


FREQUENCY CAPPING TIMERANGE Options:

The “Frequency_capping” fields defines the impression cap delivered in a specific time range and the minimum amount of time between each one of them. These are the possible “Frequency Capping Timerange” (immediate and long_term) values for the request:

Options Description
1 none
2 5 minutes
3 15 minutes
4 30 minutes
5 1 hour
6 6 hours
7 12 hours
8 24 hours
9 48 hours
10 3 days
11 1 week


FREQUENCY_CAPPING Examples:


“frequency_capping_long_term_cap_range”:1,
“frequency_capping_long_term_cap_timerange”:8,
“frequency_capping_immediate_cap_timerange”:2 …



“frequency_capping_long_term_cap_range”:3,
“frequency_capping_long_term_cap_timerange”:8,
“frequency_capping_immediate_cap_timerange”:6 …



Query String Examples:

https://api.bucksense.com/3.0/campaign/manager/?token=TOKEN

Raw:{

“name”: “test”,
“start_date”: “2017-06-05 01:00:00”, “end_date”: “2017-06-08 01:00:00”,
“adomain”: “test.it”,
“impression_tracking”: “test/{device_ip}”,
“click_through_url”: “http://test.it”,
“offer_id”: 1,
“timezone_id”: 17,
“supply_type”: 2,
“budget_mode_id”: 1,
“google”: 1,
“daypart”:{ “sunday”:[[“02:00”,“02:59”],[“03:00”,“04:59”]], “monday”:[[“02:00”,“02:59”],[“04:00”,“04:59”],[“20:00”,“21:59”]] }
“frequency_capping_immediate_cap_timerange”: 2,
“frequency_capping_long_term_cap_range”: 3,
“frequency_capping_long_term_cap_timerange”: 8,
“flat_cpm”: { “budget_type”: 2, “cpm_app”: 0.08, “budget”: 0.09, “daily_cap”: 0 } }

Get a specific Campaign by ID

Example GET:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 2222,
         "name": "Test",
         "start_date": "2016-02-08 00:00:00",
         "end_date": "0000-00-00 00:00:00",
         "adomain": "dom.com",
         "offer_id": 1111,
         "offer_name": "test offer",
         "offer_type": "mobile_app",
         "offer_url": "http://it.bucksense.com/",
         "offer_status": "active",
         "mobile_id": 123,
         "mobile_name": "Bucksense App",
         "mobile_os_id": 1,
         "mobile_os_name": "Android",
         "advertiser_id": 123,
         "advertiser_name": "Test ADV",
         "timezone_id": 17,
         "targeting_id": 123,
         "status": "paused",
         "status_bidder": "paused",
         "supply_type": 3,
         "budget_mode_id": 2,
         "type": "creative",
         "google": 1,
         "pmp": 0,
         "cloned_by": 0,
         "frequency_capping_immediate_cap_timerange": 1,
         "frequency_capping_long_term_cap_range": 2,
         "frequency_capping_long_term_cap_timerange": 3,
         "flat_cpm": {
                "budget_type": 2,
                "cpm_app": 0.08,
                "budget": 0.09,
                "daily_cap": 0
            },
         "daypart": false
      }
   ],
   "_pagination": {
      "totalCount": 1,
      "offset": 0,
      "limit": 100
   },
   "_metadata": {
      "reads": 18,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 45,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.07437205,
      "start_microtime": 1.48171174E9,
      "version": "3.0.02"
   }
}

This API returns a list of campaigns by IDs.

HTTP Request

GET (id)https://api.bucksense.com/3.0/campaign/manager/id/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Path Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Limit Query Integer It constrains the number of rows in a result set.
The default value is 10
Optional
Offset Query Integer The offset specifies the offset of the first row to return.
The offset of the first row is 0, not 1.
The default value is 0
Optional
Orderby Query String It is used to sort the data in a record set
The records are in order of ascending ID by default
Optional
Sort Query String It is used to sort the records in a descending order,
you can use the 'desc’ keyword
The default value is 'asc’
Optional
Filter Query String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Optional
Search Query String It is used to search the data in a record set.
Use a comma separated list of search terms to use.
Ability to use the * operator.
The default 'string’, without **
Optional
Search_field Query String It is used to define search field target.
Use a comma separated list of fields to use
Optional
Search_condition Query String It is used to specify the condition of the search 'and’ & 'or’
in the case of multiple search fields.
The default value is 'or’
Optional
Status Query String It is used to filter by status the data in a record set.
The possible values are 'draft,active,paused’.
The default value is 'draft’
Optional
Viewability Query Array It is used for the percentage your creative (or video, etc) is shown in relation to your impressions:
site_precision: integer
app_precision:integer
Optional
Budget Query Integer It is used to return the budget associated with the campaign.
The default value is '0’ - false
Optional
Creative Query Integer It is used to return the creative associated with the campaign.
The default value is '0’ - false
Optional
Native Query Integer It is used to return the native associated with the campaign.
The default value is '0’ - false
Optional


NOTE:

For Budget info, budget=1 should be entered in the string
Example: https://api.bucksense.com/3.0/campaign/manager/12451/?budget=1&token=TOKEN

For Creative (or Native) info, creative=1 or native=1 should be entered in the string
Example: https://api.bucksense.com/3.0/campaign/manager/12451/?creative=1&token=TOKEN


For Targeting info, targeting=1
Example: https://api.bucksense.com/3.0/campaign/manager/12451/?targeting=1&token=TOKEN

See also the Campaign Targeting Section.



Query String Examples:

https://api.bucksense.com/3.0/campaign/manager/12661/?token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 12661,
“name”: “A test”,
“start_date”: “2017-06-15 00:00:00”,
“end_date”: “2017-06-16 00:00:00”,
“adomain”: “goo.it”,
“impression_tracking”: “”,
“click_through_url”: “”,
“offer_id”: 1234,
“offer_name”: “OFFer Test”,
“offer_type”: “mobile_app”,
“offer_url”: “offer.com”,
“offer_status”: “active”,
“mobile_id”: 234,
“mobile_name”: “Test mobile”,
“mobile_os_id”: 2,
“mobile_os_name”: “iOS”,
“advertiser_id”: 876,
“advertiser_name”: “3003Test Adv”,
“timezone_id”: 44,
“targeting_id”: 12345,
“status”: “active”,
“status_bidder”: “active”,
“supply_type”: 1,
“budget_mode_id”: 1,
“type”: “pop_unders”,
“google”: 0,
“pmp”: 0,
“cloned_by”: 0,
“frequency_capping_immediate_cap_timerange”: 2,
“frequency_capping_long_term_cap_range”: 3,
“frequency_capping_long_term_cap_timerange”: 7,
“daypart”: true, “viewability”: { “provider”: “bucksense”, “provider_name”: “Bucksense Viewability”,
“site_track”: “on”, “site_percent_viewed”: 50, “site_second_viewed”: 2,
“app_track”: “off”, “app_percent_viewed”: 50, “app_second_viewed”: 2 } } ] }


https://api.bucksense.com/3.0/campaign/manager/12661/?budget=1&creative=1&token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 12661,
“name”: “A test”,
“start_date”: “2017-06-15 00:00:00”,
“end_date”: “2017-06-16 00:00:00”,
“adomain”: “goo.it”,
“impression_tracking”: “”,
“click_through_url”: “”,
“offer_id”: 1234,
“offer_name”: “OFFer Test”,
“offer_type”: “mobile_app”,
“offer_url”: “offer.com”,
“offer_status”: “active”,
“mobile_id”: 234,
“mobile_name”: “Test mobile”,
“mobile_os_id”: 2,
“mobile_os_name”: “iOS”,
“advertiser_id”: 876,
“advertiser_name”: “3003Test Adv”,
“timezone_id”: 44,
“targeting_id”: 12345,
“status”: “active”,
“status_bidder”: “active”,
“supply_type”: 1,
“budget_mode_id”: 1,
“type”: “pop_unders”,
“google”: 0,
“pmp”: 0,
“cloned_by”: 0,
“frequency_capping_immediate_cap_timerange”: 2,
“frequency_capping_long_term_cap_range”: 3,
“frequency_capping_long_term_cap_timerange”: 7,
“flat_cpm”: {
“budget_type”: 2,
“cpm_app”: 0.08,
“cpm_site”: 0.06,
“budget”: 20,
“daily_cap”: 10,
“pace”: 2,
“remain_budget”: -1 },
“daypart”: true } ] }


https://api.bucksense.com/3.0/campaign/manager/12661/?targeting=1&creative=1&token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 12661,
“name”: “A test”,
“start_date”: “2017-06-15 00:00:00”,
“end_date”: “2017-06-16 00:00:00”,
“adomain”: “goo.it”,
“impression_tracking”: “”,
“click_through_url”: “”,
“offer_id”: 1234,
“offer_name”: “OFFer Test”,
“offer_type”: “mobile_app”,
“offer_url”: “offer.com”,
“offer_status”: “active”,
“mobile_id”: 234,
“mobile_name”: “Test mobile”,
“mobile_os_id”: 2,
“mobile_os_name”: “iOS”,
“advertiser_id”: 876,
“advertiser_name”: “3003Test Adv”,
“timezone_id”: 44,
“targeting_id”: 12345,
“status”: “active”,
“status_bidder”: “active”,
“supply_type”: 1,
“budget_mode_id”: 1,
“type”: “pop_unders”,
“google”: 0,
“pmp”: 0,
“cloned_by”: 0,
“frequency_capping_immediate_cap_timerange”: 2,
“frequency_capping_long_term_cap_range”: 3,
“frequency_capping_long_term_cap_timerange”: 7,
“targeting”: [
{ “id”: 12671,
“deviceid”: 0,
“intersticial”: 0,
“video_preroll”: 0,
“video_midroll”: 0,
“video_postroll”: 0,
“video_inbanner”: 0,
“rewarded”: “all”,
“skippable”: “all”,
“device_type”: [ { “id”: 1, “name”: “Smartphone”, “action”: “include” }, { “id”: 3, “name”: “Tablet”, “action”: “include” } ],
“os”: [ { “id”: 2, “name”: “iOS”, “action”: “include” } ],
“exchange”: [ { “id”: 11, “name”: “Google”, “action”: “exclude” } ] } ],
“daypart”: true } ] }


See the others examples in section Campaign - See a Campaign created.

Update a specific Campaign by ID

Example Response PUT:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 2222,
         "name": "Test",
         "start_date": "2016-02-08 00:00:00",
         "end_date": "0000-00-00 00:00:00",
         "adomain": "dom.com",
         "offer_id": 1111,
         "offer_name": "test offer",
         "offer_type": "mobile_app",
         "offer_url": "http://it.bucksense.com/",
         "offer_status": "active",
         "mobile_id": 123,
         "mobile_name": "Bucksense App",
         "mobile_os_id": 1,
         "mobile_os_name": "Android",
         "advertiser_id": 123,
         "advertiser_name": "Test ADV",
         "timezone_id": 17,
         "targeting_id": 123,
         "status": "paused",
         "status_bidder": "paused",
         "supply_type": 3,
         "budget_mode_id": 2,
         "type": "creative",
         "google": 1,
         "pmp": 0,
         "cloned_by": 0,
         "frequency_capping_immediate_cap_timerange": 1,
         "frequency_capping_long_term_cap_range": 2,
         "frequency_capping_long_term_cap_timerange": 3,
         "flat_cpm": {
                "budget_type": 2,
                "cpm_app": 0.05,
                "cpm_site": 0.07,
                "budget": 50,
                "daily_cap": 0.01,
                "pace": 1,
                "remain_budget": "5"
            },
            "creative": [
                {
                    "id": 12335
                }
            ],
      }
   ],
   "_pagination": {
      "totalCount": 1,
      "offset": 0,
      "limit": 100
   },
   "_metadata": {
      "reads": 18,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 45,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.07437205,
      "start_microtime": 1.48171174E9,
      "version": "3.0.02"
   }
}

This API allows the editing of a campaign by ID.

HTTP Request

PUThttps://api.bucksense.com/3.0/campaign/manager/id/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Path Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Name Body String It is the campaign name Optional
Start_date Body Date-Time Iti is the start of campaign Optional
End_date Body Date-Time It id the stop fo campaign Optional
Adomain Body String Type a valid Top level Domain Optional
Click_through_url Body String Final destination URL Optional
Impression_tracking Body String The URL where you want your impression to arrive Optional
Offer_url Body String The URL where you want your click to arrive Not Allowed
Offer_id Body Integer The offer to which the campaign is associated Not Allowed
Timezone_id Body Integer Timezone of your country Optional
Type Body String It is 'creative’ or 'native’ or 'adcreative_video’ or 'adtag’. The default value is 'creative’ Not Allowed
Supply_type Body Integer The type of incoming traffic. Value = ['1’ or '2’ or '3’]: 1=site; 2=app; 3=both Optional
Budget_mode_id Body Integer The type of budget spending. Value = ['1’ or '2’]: 1=Flat CPM; 2=Optimized CPM Optional
Creative Body Array Banner of campaign Optional
Native Body Array Native of campaign Optional
Adcreative_video Body Array Video of campaign Optional
Adtag Body Array Adtag of campaign Optional
Google Body Integer Value = '0’:false or '1’:true Not Allowed
PMP Body Integer Private Market Place
Cloned_by Body Integer It is the “id” of the duplicate campaign Not Allowed
Frequency_capping_immediate_Cap_Timerange Body Integer Defines the impression cap delivered in a specific time range Optional
Frequency_capping_long_term_Cap_Range Body Integer Defines the impression cap delivered in a specific time range Optional
Frequency_capping_long_term_Cap_Timerange Body Integer Defines the impression cap delivered in a specific time range Optional
Daypart Body Boolean Value = 'sunday’, 'monday’, …. Optional
Daypart Body Array Range time: [“02:00”,“02:59”],[“09:00”,“17:59”] Optional
Flat_cpm Boby Array CPM setting Optional
Budget Body Integer Spending setting Optional
Budget_type Body Integer Type of budget.Value = ['1’ or '2’]: 1=Unlimited CPM; 2=Capped Optional
Daily_cap Body Integer Define the daily budget for campaign Optional
CPM Body Integer Cost per Mille Impressions: CPM for “Site” (cpm_site) and CPM for “app” (cpm_app) Optional
Pace Body Integer Daily_cap spending option.Value = ['1’ or '2’]: 1=Spend evenly throughout day;
2=Spend as fast as possible
Optional
Remain_budget Body Integer Budget left to spend Not Allowed


NOTE:



Query String Examples:

https://api.bucksense.com/3.0/campaign/manager/ID/?token=TOKEN

Raw :{
“status”:“paused”,
“name”:“Test2”}


https://api.bucksense.com/3.0/campaign/manager/12345/?token=TOKEN

Raw :{
“flat_cpm”:{
“budget_type”:“2”,
“cpm_app”:“0.16”,
“cpm_site”:“0.25”,
“budget”:“1.25”,
“daily_cap”:“220”,
“pace”:“2”} }



Attention:

For the all fields not editables → see the error 401/10014 on http://apidoc.bucksense.com/#errors

Campaign Targeting

Model Schema:

{
  "id": "integer",
  "iabcategory": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ],
  "region": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ],
  "country": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ],
  "city": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ],
  "browser": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ],
  "browser_version": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ],
  "connection_type": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ],
  "carrier": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ],
  "device_type": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ],
  "device_make": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ],
  "device_model": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ],
  "os": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ],
  "os_version": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ],
  "peer39category": [
    {
      "id": "integer",
      "name": "string",
      "action": "string"
    }
  ]
}

This API return the information for targeting of single campaign.

The campaign targeting is important for the advertisers that need to apply multiple parameters to reach very specific users.

There are basic settings needed to start a campaign like country, connection type, and budget. There are then more advanced targeting settings, which they allow you to reach more precisely your right users where and when they are more likely to convert.

This functionality interest the different aspects as:

You can know all types of Frequency Capping with the api service Frequency Capping-timerange.
You can edit this with PUT Campaing Manager method.



HTTP Request

GET (id)https://api.bucksense.com/3.0/campaign/targeting/{id}/

PUThttps://api.bucksense.com/3.0/campaign/targeting/{id}/

GET (id) Campaign Targeting

Response GET Campaign Targeting:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 6072,
         "country": [
            {
               "id": 24,
               "name": "ANGOLA",
               "action": "include"
            }
         ],
         "region": [
                {
                    "id": 25143,
                    "name": "CUANZA SUL",
                    "action": "include",
                    "country_id": 24,
                    "country_name": "ANGOLA"
                }
            ],
         "city": [
                {
                    "id": 1768,
                    "name": "AALEN",
                    "action": "include",
                    "country_id": 276,
                    "country_name": "GERMANY",
                    "region_id": 719,
                    "region_name": "BADEN-WURTTEMBERG"
                }
            ],
         "connection_type": [
            {
               "id": 1,
               "name": "Wifi",
               "action": "exclude"
            }
         ],
         "carrier": [
            {
               "id": 1398,
               "name": "MOVICEL",
               "country_id": "24",
               "action": "include"
            }
         ],
         "os": [
            {
               "id": 23,
               "name": "Windows",
               "action": "include"
            }
         ],
         "smartlink_category": [
            {
               "id": 2,
               "name": "fashion",
               "action": "include"
            }
         ],
         "list": [
            {
               "id": 327,
               "name": "APPBUNDLE",
               "list_type": "app_bundle",
               "list_type_desc": "App Bundle",
               "action": "include"
            },
            {
               "id": 328,
               "name": "SITEDOMAIN",
               "list_type": "url",
               "list_type_desc": "Site URL",
               "action": "exclude"
            },
            {
               "id": 329,
               "name": "PLACEID",
               "list_type": "placement_id",
               "list_type_desc": "Placement ID",
               "action": "include"
            }
            ],   
      }
   ],
   "_pagination": {
      "totalCount": 0,
      "offset": 0,
      "limit": 100
   },
   "_metadata": {
      "reads": 1,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 2,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 5,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.10658383,
      "start_microtime": 1.4846624E9,
      "version": "3.0.02"
   }
}

This API returns the targeting of single campaign (by Id).

HTTP Request

GEThttps://api.bucksense.com/3.0/campaign/targeting/{id}/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Query Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Deviceid Query String value: '0’ = false, '1’ = true Optional
Intersticial Query String value: '0’ = false, '1’ = true Optional
Video_preroll Query String value: '0’ = false, '1’ = true Optional
Video_midroll Query String value: '0’ = false, '1’ = true Optional
Video_postroll Query String value: '0’ = false, '1’ = true Optional
Video_inbanner Query String value: '0’ = false, '1’ = true Optional
Iabcategory Query Array of String This is category for campaign Optional
Country Query Array of String This is country for campaign Optional
City Query Array of String This is city for campaign Optional
Region Query Array of String This is country for campaign Optional
Language Query Array of String This is language for campaign Optional
Connection_type Query Integer Type of connection requied (from 1 to 2):
'1’ = 'Wifi’, '2’ = 'Cellular data’
Optional
Device_type Query Integer Type of device requied (from 1 to 4):
'1’ = 'Smartphone’, '2’ = 'Feature Phone’, '3’ = 'Tablet’, '4’ = 'Desktop’
Optional
Carrier Query String This is carrier name of country selected Optional
Os Query String This is operating system name Optional
Os version Query String This is operating system version Optional
List Query Array of String This is the lists for campaign Optional
Exchange Query Array of String This is the exchange’s list for campaign Optional



QUERY STRING Examples:

https://api.bucksense.com/3.0/campaign/targeting/6072?token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 12464,
“deviceid”: 0,
“intersticial”: 1,
“video_preroll”: 0,
“video_midroll”: 0,
“video_postroll”: 0,
“video_inbanner”: 0,
“language”: [ { “id”: 89, “name”: “Portuguese”, “iso_639-1”: “it”, “action”: “include” } ],
“iabcategory”: [{ “id”: 74, “name”: “Family & Parenting”, “action”: “include” } ],
“country”: [ { “id”: 24, “name”: “ANGOLA”, “alpha2_code”: “AO”, “action”: “include” } ],
“region”: [ { “id”: 25143, “name”: “CUANZA SUL”, “action”: “include”, “country_id”: 24, “country_name”: “ANGOLA” } ],
“city”: [ { “id”: 48346, “name”: “SUMBE”, “action”: “include”,
“country_id”: 24, “country_name”: “ANGOLA”, “region_id”: 25143, “region_name”: “CUANZA SUL” } ],
“connection_type”: [ { “id”: 1, “name”: “Wifi”, “action”: “include” } ],
“device_type”: [ { “id”: 1, “name”: “Smartphone”, “action”: “include” }, { “id”: 3, “name”: “Tablet”, “action”: “include” } ],
“os”: [ { “id”: 2, “name”: “iOS”, “action”: “include” } ],
“os_version”: [ { “id”: 98, “name”: “1.1.5”, “action”: “include”, “os_id”: 2, “os_name”: “iOS” } ],
“list”: [ { “id”: 1547, “name”: “device id”, “list_type”: “device_id_android”, “list_type_desc”: “Device ID (Android)”, “action”: “include” } ],
“exchange”: [ { “id”: 24, “name”: “Adbuddiz”, “action”: “include” }, { “id”: 72, “name”: “Zedo”, “action”: “include” } ] } ]}

Edit Campaign Targeting

Example PUT CAMPAIGN TARGETING:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 1234,
         "deviceid": 1,
         "intersticial": 0,
         "video_preroll": 0,
         "video_midroll": 0,
         "video_postroll": 0,
         "video_inbanner": 0,
         "iabcategory": [
            {
               "id": 9,
               "name": "Automotive",
               "action": "include"
            }
         ],
         "country": [
            {
               "id": 24,
               "name": "ANGOLA",
               "alpha2_code": "AO",
               "action": "include"
            },
         "region": [
            {
               "id": 25142,
               "name": "BENGUELA",
               "action": "include",
               "country_id": 24,
               "country_name": "ANGOLA"
            }
         ],
         "city": [
            {
               "id": 48484,
               "name": "LOBITO",
               "action": "include",
               "country_id": 24,
               "country_name": "ANGOLA",
               "region_id": 25142,
               "region_name": "BENGUELA"
            }
         ],
         "connection_type": [
            {
               "id": 1,
               "name": "Wifi",
               "action": "include"
            },
            {
               "id": 2,
               "name": "Cellular data",
               "action": "include"
            }
         ],
         "device_type": [
            {
               "id": 3,
               "name": "Tablet",
               "action": "include"
            }
         ],
         "os": [
            {
               "id": 1,
               "name": "Android",
               "action": "include"
            }
         ]
      }
   ],
   "_pagination": {
      "totalCount": 0,
      "offset": 0,
      "limit": 100
   },
   "_metadata": {
      "reads": 3,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 2,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 7,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.11805105,
      "start_microtime": 1.49329664E9,
      "version": "3.0.02"
   }
}

This API editing a targeting of single campaign (by Id).

HTTP Request

PUThttps://api.bucksense.com/3.0/campaign/targeting/{id}/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Query Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Iabcategory Query Array of String This is category for campaign Optional
Country Query Array of String This is country for campaign Optional
City Query Array of String This is city for campaign Optional
Region Query Array of String This is country for campaign Optional
Language Query Array of String This is language for campaign Optional
Connection_type Query Integer Type of connection requied (from 1 to 2):
'1’ = 'Wifi’, '2’ = 'Cellular data’
Optional
Device_type Query Integer Type of device requied (from 1 to 4):
'1’ = 'Smartphone’, '2’ = 'Feature Phone’, '3’ = 'Tablet’, '4’ = 'Desktop’
Optional
Carrier Query String This is carrier name of country selected Optional
Os Query String This is operating system name Optional
Os version Query String This is operating system version Optional
List Query Array of String This is the lists for campaign Optional
Exchange Query Array of String This is the exchange’s list for campaign Optional



QUERY STRING Examples:

https://api.bucksense.com/3.0/campaign/targeting/ID/?token=TOKEN

Raw:{
“iabcategory”: [{“id”: 74, “action”: “include”}] }


https://api.bucksense.com/3.0/campaign/targeting/6072/?token=TOKEN

Raw:{
“country”: [ {“id”: 24,“action”: “include”}],
“city”: [ {“id”: 48484,“action”: “include”}],
“connection_type”: [ { “id”: 1, “action”: “exclude” }],
“carrier”: [ { “id”: 1398, “country_id”: “24”, “action”: “include” }],
“os”: [ {“id”: 23,“action”: “include”}] }

List Manager

Model Schema:


This API return the information about the list.

A list can be type of App Bundle, Device ID (Android-IFA-IMEI-Mac), IP, Placement IDs or Site Url → see List Type


For further information side console, please check out the user guide with the steps to follow:

Custom Targeting - List Type

Create a new List



HTTP Request

GEThttps://api.bucksense.com/3.0/campaign/list-manager/

POSThttps://api.bucksense.com/3.0/campaign/list-manager/

GET (id)https://api.bucksense.com/3.0/campaign/list-manager/{id}

PUThttps://api.bucksense.com/3.0/campaign/list-manager/{id}



GET List_Manager

Example GET Lists:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 661,
         "uid": "62703ac38e7912w",
         "name": "Test list IP ",
         "filename": "Test_list_IP",
         "entity_count": 1,
         "list_type": "ip",
         "list_type_desc": "IP",
         "list_source": "csv",
         "advertiser_id": 111,
         "advertiser_name": "Test Doc",
         "create_user_id": 123,
         "create_user_name": "Info",
         "create_user_surname": "Demo",
         "create_time": "2016-04-05 08:11:30",
         "location": "https://beta.api.bucksense.com/3.0/f/111/62703ac38e7912w.csv",
         "status": "active"
      },
      {
         "id": 672,
         "uid": "s5703ca1286bb0m",
         "name": "Placement_ID",
         "filename": "placement_id",
         "entity_count": 7,
         "list_type": "placement_id",
         "list_type_desc": "Placement ID",
         "list_source": "csv",
         "advertiser_id": 222,
         "advertiser_name": "test Doc2",
         "create_user_id": 234,
         "create_user_name": "Info",
         "create_user_surname": "Demo",
         "create_time": "2016-04-05 11:33:35",
         "location": "https://beta.api.bucksense.com/3.0/f/222/s5703ca1286bb0m.csv",
         "status": "active"
      },
      {
         "id": 1547,
         "uid": "n584ff4074c0cb2",
         "name": "device id",
         "filename": "device_id",
         "entity_count": 2000,
         "list_type": "device_id_android",
         "list_type_desc": "Device ID (Android)",
         "list_source": "manual",
         "encription": "Raw",
         "advertiser_id": 839,
         "advertiser_name": "3003Test",
         "create_user_id": 510,
         "create_user_name": "Roxana",
         "create_user_surname": "Demo",
         "create_time": "2016-12-13 08:13:40",
         "location": "https://beta.api.bucksense.com/3.0/f/839/n584ff4074c0cb2.csv",
         "status": "active"
       }      
   ],
   "_pagination": {
      "totalCount": 101,
      "offset": 0,
      "limit": 2
   },
   "_metadata": {
      "reads": 3,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 3,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.10982299,
      "start_microtime": 1.49337229E9,
      "version": "3.0.02"
   }
}

This API returns all the lists related to an advertiser.

HTTP Request

GEThttps://api.bucksense.com/3.0/campaign/list-manager/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
Limit Query Integer It constrains the number of rows in a result set (the default is 10) Optional
Offset Query Integer The offset specifies the offset of the first row to return.
The offset of the first row is 0, not 1 (the default is 0)
Optional
Orderby Query String It is used to sort the data in a record set
(the records are in order of ascending ID by default)
Optional
Sort Query String It is used to sort the records in a descending order, you can use the 'desc’ keyword
(the default is 'asc’)
Optional
Filter Query String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Optional
Search Query String It is used to search the data in a record set. Use a comma separated list of search terms to use. Ability to use the * operator. (default 'string’, without **) Optional
Status Query String It is used to filter by status the data in a record set (the default id 'active,paused’) Optional



QUERY STRING Examples:

Without Filter:
https://api.bucksense.com/3.0/campaign/list-manager/?token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 1544,
“uid”: “3584ff25ddba48a”,
“name”: “Prova 2”,
“filename”: “Prova_2”,
“entity_count”: 864,
“list_type”: “url”,
“list_type_desc”: “Site URL”,
“list_source”: “manual”,
“advertiser_id”: 839,
“advertiser_name”: “3003Test”,
“create_user_id”: 510,
“create_user_name”: “Info”,
“create_user_surname”: “Demo”,
“create_time”: “2016-12-13 08:03:51”,
“update_user_id”: 510,
“update_user_name”: “Info”,
“update_user_surname”: “Demo”,
“update_time”: “2016-12-13 08:06:35”,
“location”: “https://beta.api.bucksense.com/3.0/f/839/3584ff25ddba48a.csv”,
“status”: “active” },
{ “id”: 1547,
“uid”: “n584ff4074c0cb2”,
“name”: “device id”,
“filename”: “device_id”,
“entity_count”: 2000,
“list_type”: “device_id_android”,
“list_type_desc”: “Device ID (Android)”,
“list_source”: “manual”,
“encription”: “Raw”,
“advertiser_id”: 839,
“advertiser_name”: “3003Test”,
“create_user_id”: 510,
“create_user_name”: “Info”,
“create_user_surname”: “Demo”,
“create_time”: “2016-12-13 08:13:40”,
“location”: “https://beta.api.bucksense.com/3.0/f/839/n584ff4074c0cb2.csv”,
“status”: “active” } ] }



With Filter:

https://api.bucksense.com/3.0/campaign/list-manager/?token=TOKEN&limit=2&filter=name,status

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 1544,
“name”: “Prova 2”,
“status”: “active” },
{ “id”: 1547,
“name”: “device id”,
“status”: “active” } ] }


https://api.bucksense.com/3.0/campaign/list-manager/?search=27&token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 2789,
“name”: “Prova 5”,
“status”: “active” },
{ “id”: 1827,
“name”: “device ifa”,
“status”: “active” } ] }


https://api.bucksense.com/3.0/campaign/list-manager/?&limit=2&search=23&token=TOKEN


https://api.bucksense.com/3.0/campaign/list-manager/?&limit=2&search=23&filter=name,status&token=TOKEN


NOTE:

The “&search = parameter” must have the values separated by comma (example → &search=4321,5463)

Add List

Response POST List:


{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 1223,
         "uid": "f590108659fd344",
         "name": "test ifa",
         "filename": "test_ifa",
         "entity_count": 111254,
         "list_type": "device_id_ifa",
         "list_type_desc": "Device ID (IFA)",
         "list_source": "csv",
         "advertiser_id": 945,
         "advertiser_name": "0806RG",
         "create_user_id": 510,
         "create_user_name": "Info",
         "create_user_surname": "Demo",
         "create_time": "2017-04-28 05:16:21",
         "location": "https://beta.api.bucksense.com/3.0/f/945/f590108659fd344.csv",
         "status": "active"
      }
   ],
   "_pagination": {
      "totalCount": 1,
      "offset": 0,
      "limit": 100
   },
   "_metadata": {
      "reads": 1,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 1,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.09884691,
      "start_microtime": 1.49337267E9,
      "version": "3.0.02"
   }
}

This API allows the addition of a new list.

HTTP Request

POSThttps://api.bucksense.com/3.0/campaign/list-manager/

Parameters

Parameter name Parameter_Type Data Type Description Required
Token Query String Token generated through the API /login YES
Name Body String Name of list Optional
Advertiser_id Body Integer It is the advertiser associated to the list YES
List_type Body Integer It is the type of the list YES
fileurl Body string It is the url associeted a list YES
filedata Body string It is the string associeted a list YES
Status Body String Value = 'active’ or 'paused Optional


So the fields “name”, “list_type”, “fileurl(or filedata)” and “advertiser_id” are mandatory fields.
Also remember that, when creating the list, the “status” field is for default equal to “active”.



TYPE LIST Options:

These are the possible type for the lists (→ see List Type):

Options Description
App Bundle App Bundle identifies uniquely an app
Device ID (Android) ID Android
Device ID (IFA) “Identify For Advertisers” is a temporary device identifier
Device ID (IMEI) “International Mobile Equipment Identity” uniquely identifies your mobile device
Device ID (Mac) MAC Address
IP IP range
Placement ID Unique identifier Placement ID
Site URL Valid Domain



QUERY STRING Examples:

https://api.bucksense.com/3.0/campaign/manager/?token=TOKEN

Raw:{

“name”: “test”,
“list_type”: device_id_ifa,
“advertiser_id”: 945,
“fileurl”: “https://api.bucksense.com/3.0/tmp/test ifa.csv”,
}

or

Raw:{

“name”: “test”,
“list_type”: device_id_ifa,
“advertiser_id”: 945,
“filedata”: “C17B3A46-F98B-4067-908F-617EB58FC1C7\n59FAE0A0-F7D3-4D5E-876B-B20F01A30E3A”
}


See the others examples in section Examples List - A new Creation

GET (id) List_Manager

Example GET(id) List:


{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 1223,
         "uid": "h590308659fd344",
         "name": "test api",
         "filename": "test_api",
         "entity_count": 4,
         "list_type": "device_id_ifa",
         "list_type_desc": "Device ID (IFA)",
         "list_source": "csv",
         "advertiser_id": 945,
         "advertiser_name": "0806RG",
         "create_user_id": 510,
         "create_user_name": "Info",
         "create_user_surname": "Demo",
         "create_time": "2017-04-28 05:16:21",
         "location": "https://beta.api.bucksense.com/3.0/f/945/h590308659fd344.csv",
         "status": "active",
         "campaign": [1234]
      }
   ],
   "_pagination": {
      "totalCount": 1,
      "offset": 0,
      "limit": 100
   },
   "_metadata": {
      "reads": 3,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 1,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 5,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.08220506,
      "start_microtime": 1.49337101E9,
      "version": "3.0.02"
   }
}


This API returns a list by IDs.

HTTP Request

GET (id)https://api.bucksense.com/3.0/campaign/list-manager/id/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Path Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Limit Query Integer It constrains the number of rows in a result set (the default is 10) Optional
Filter Query String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Optional
Search Query String It is used to search the data in a record set. Use a comma separated list of search terms to use. Ability to use the * operator. (default 'string’, without **) Optional



QUERY STRING Examples:

https://api.bucksense.com/3.0/campaign/list-manager/1234/?token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 1234,
“uid”: “3584ff25eeba48a”,
“name”: “Prova for Doc”,
“filename”: “Prova_doc”,
“entity_count”: 864,
“list_type”: “url”,
“list_type_desc”: “Site URL”,
“list_source”: “manual”,
“advertiser_id”: 839,
“advertiser_name”: “3003Test”,
“create_user_id”: 510,
“create_user_name”: “Info”,
“create_user_surname”: “Demo”,
“create_time”: “2016-12-13 08:03:51”,
“update_user_id”: 510,
“update_user_name”: “Info”,
“update_user_surname”: “Demo”,
“update_time”: “2016-12-13 08:06:35”,
“location”: “https://beta.api.bucksense.com/3.0/f/839/3584ff25eeba48a.csv”,
“status”: “active” } ] }


See the others examples in section Examples List - See a list created

Edit List_Manager

Response PUT List:


{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 1223,
         "uid": "d5903194b5ef1dw",
         "name": "test ifa edit",
         "filename": "test_ifa_edit",
         "entity_count": 5,
         "list_type": "device_id_ifa",
         "list_type_desc": "Device ID (IFA)",
         "list_source": "csv",
         "advertiser_id": 945,
         "advertiser_name": "0806RG",
         "create_user_id": 510,
         "create_user_name": "Info",
         "create_user_surname": "Demo",
         "create_time": "2017-04-28 05:16:21",
         "update_user_id": 510,
         "update_user_name": "Info",
         "update_user_surname": "Demo",
         "update_time": "2017-04-28 06:28:27",
         "location": "https://beta.api.bucksense.com/3.0/f/945/d5903194b5ef1dw.csv",
         "status": "paused"
      }
   ],
   "_metadata": {
      "reads": 0,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 2,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 2,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 1.6663928,
      "start_microtime": 1.49337536E9,
      "version": "3.0.02"
   }
}

This API allows the editing of a list by ID.

HTTP Request

PUThttps://api.bucksense.com/3.0/campaign/list-manager/id/

Parameters

Parameter name Parameter_Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Path Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Name Body String It is the list name Optional
fileurl Body string It is the url associeted a list Optional
filedata Body string It is the string associeted a list Optional
Status Body String Value = 'active’ or 'paused Optional


Each time a list is modified, the new list overwrites the previous one.
So when you need to modify a specific list, it is REQUIRED to create a new list with the desired elements.
Same is true in the case of a file upload (fileURL).



QUERY STRING Examples:

https://api.bucksense.com/3.0/campaign/list-manager/ID/?token=TOKEN

Raw :{
“status”:“paused”,
“name”:“test ifa edit”,
“filedata”:“0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789”

}


See the others examples in section Examples List - Edit

Microbidding

Model Schema:

{
   "id": "integer",
   "campaign_id": "integer",
   "campaign_name": "string",
   "exchange_id": "integer",
   "exchange_name": "string",
   "placement": "string",
   "os_id": "integer",
   "os_name": "string",
   "device_make_id": "integer",
   "device_make_name": "string",
   "device_model_id": "integer",
   "device_model_name": "string",
   "cpm": "integer"
}

This functionality allow to users to manage more precise bidding strategies when they want to handle the optimization on their own.

The microbidding will be allowed only if the campaign has a fix CPM setting . The microbidding allow the user to add a new rule , edit existing rules and remove them, with the setting of a different value to CPM already set for the campaign. You can fine tune your bid on individual segments such as:


For further information side console, please check out the user guide with the steps to follow:

Microbidding

HTTP Request

GEThttps://api.bucksense.com/3.0/campaign/micro_bidding/

POSThttps://api.bucksense.com/3.0/campaign/micro_bidding/

GET (id)https://api.bucksense.com/3.0/campaign/micro_bidding/{id}

PUThttps://api.bucksense.com/3.0/campaign/micro_bidding/{id}

GET Microbidding

Example GET:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 19,
         "campaign_id": 8360,
         "campaign_name": "creative 22-11",
         "exchange_id": 2,
         "exchange_name": "MoPub",
         "placement": "",
         "os_id": 0,
         "os_name": "",
         "device_make_id": 0,
         "device_make_name": "",
         "device_model_id": 0,
         "device_model_name": "",
         "cpm": 0.8
      },
      {
         "id": 22,
         "campaign_id": 8360,
         "campaign_name": "creative 22-11",
         "exchange_id": 1,
         "exchange_name": "Smaato",
         "placement": "",
         "os_id": 0,
         "os_name": "",
         "device_make_id": 0,
         "device_make_name": "",
         "device_model_id": 0,
         "device_model_name": "",
         "cpm": 0
      }
   ],
   "_pagination": {
      "totalCount": 12,
      "offset": 0,
      "limit": 2
   },
   "_metadata": {
      "reads": 5,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 36,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.071954966,
      "start_microtime": 1.48483968E9,
      "version": "3.0.02"
   }
}

This API returns a list of microbidding.

HTTP Request

GEThttps://api.bucksense.com/3.0/campaign/micro_bidding/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Path Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Limit Query Integer It constrains the number of rows in a result set (the default is 10) Optional
Offset Query Integer The offset specifies the offset of the first row to return.
The offset of the first row is 0, not 1 (the default is 0)
Optional
Orderby Query String It is used to sort the data in a record set
(the records are in order of ascending ID by default)
Optional
Sort Query String It is used to sort the records in a descending order, you can use the 'desc’ keyword
(the default is 'asc’)
Optional
Filter Query String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Optional
Search Query String It is used to search the data in a record set. Use a comma separated list of search terms to use. Ability to use the * operator. (default 'string’, without **) Optional
Search_field Query String It is used to define search field target. Use a comma separated list of fields to use Optional
Search_condition Query String It is used to specify the condition of the search 'and’ & 'or’ in the case of multiple search fields (the default is 'or’) Optional
Search_and Query String It is used to search the data in a record set. Use a comma separated list of search terms to use. Ability to use the * operator. (default 'string’, without **) Optional
Search_and_field Query String It is used to define search field target. Use a comma separated list of fields to use Optional
Search_and_condition Query String It is used to specify the condition of the search 'and’ & 'or’ in the case of multiple search fields (the default is 'or’) Optional



QUERY STRING Examples:

Without Filter:

https://api.bucksense.com/3.0/campaign/micro_bidding?token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 6032,
“campaign_id”: 11316,
“campaign_name”: “test”,
“exchange_id”: 22,
“exchange_name”: “ZeroPark”,
“placement”: “test”,
“os_id”: 32,
“os_name”: “Chrome OS”,
“device_make_id”: 0,
“device_make_name”: “”,
“device_model_id”: 0,
“device_model_name”: “”,
“cpm”: 0.04,
“bid_floor”: 0 },
{ “id”: 6035,
“campaign_id”: 11316,
“campaign_name”: “test”,
“exchange_id”: 76,
“exchange_name”: “PeakAdx”,
“placement”: “test 2”,
“os_id”: 23,
“os_name”: “Windows”,
“device_make_id”: 0,
“device_make_name”: “”,
“device_model_id”: 0,
“device_model_name”: “”,
“cpm”: 0.04,
“bid_floor”: 0 } } ] }


With Filter:

https://api.bucksense.com/3.0/campaign/micro_bidding?token=TOKEN&search=6032&search_field=id

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 6032,
“campaign_id”: 11316,
“campaign_name”: “test”,
“exchange_id”: 22,
“exchange_name”: “ZeroPark”,
“placement”: “test”,
“os_id”: 32,
“os_name”: “Chrome OS”,
“device_make_id”: 0,
“device_make_name”: “”,
“device_model_id”: 0,
“device_model_name”: “”,
“cpm”: 0.04,
“bid_floor”: 0 } ] }


https://api.bucksense.com/3.0/campaign/micro_bidding/?token=TOKEN&filter=campaign_id,exchange_id

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 6032,
“campaign_id”: 11316,
“exchange_id”: 22 },
{ “id”: 6035,
“campaign_id”: 11316,
“exchange_id”: 76 } ] }


Add Microbidding

Example POST:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 19,
         "campaign_id": 8360,
         "campaign_name": "creative 22-11",
         "exchange_id": 2,
         "exchange_name": "MoPub",
         "placement": "",
         "os_id": 0,
         "os_name": "",
         "device_make_id": 0,
         "device_make_name": "",
         "device_model_id": 0,
         "device_model_name": "",
         "cpm": 0.8
      },
      {
         "id": 6030,
         "campaign_id": 11316,
         "campaign_name": "test",
         "exchange_id": 1,
         "exchange_name": "Smaato",
         "placement": "mynicestring",
         "os_id": 2,
         "os_name": "iOS",
         "device_make_id": 40,
         "device_make_name": "QMobile",
         "device_model_id": 500,
         "device_model_name": "Asus P750",
         "cpm": 10.1,
         "bid_floor": 0
      }
   ],
   "_pagination": {
      "totalCount": 12,
      "offset": 0,
      "limit": 2
   },
   "_metadata": {
      "reads": 5,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 36,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.071954966,
      "start_microtime": 1.48483968E9,
      "version": "3.0.02"
   }
}

This API allows the addition of a new microbidding.

HTTP Request

POSThttps://api.bucksense.com/3.0/campaign/micro_bidding/

Parameters

Parameter name Parameter_Type Data Type Description Required
Token Query String Token generated through the API /login YES
Campaign_id Body Integer It is used to define a campaign id, associated with microbidding YES
Exchange_id Body Integer It is used to define a exchange id Optional
Placement Body String It is the source from which come the bid Optional
Os_id Body Integer It is used to define a operating system id Optional
Device_make_id Body Integer It is used to define a device make id Optional
Device_model_id Body Integer It is used to define a device model id Optional
CPM Body Float Cost per Mille Impressions Optional



QUERY STRING Examples:

https://api.bucksense.com/3.0/campaign/micro_bidding?token=TOKEN

Raw:{
“campaign_id”: 6960,
“exchange_id”: 1,
“placement”: “mynicestring”,
“os_id”: 2,
“device_make_id”: 40,
“device_model_id”: 500,
“cpm”: 10.1}

GET (id) Microbidding

Example GET (ID):

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 186,
         "campaign_id": 9130,
         "campaign_name": "doc test",
         "exchange_id": 1,
         "exchange_name": "Smaato",
         "placement": "mynicestring",
         "os_id": 1,
         "os_name": "Android",
         "device_make_id": 40,
         "device_make_name": "QMobile",
         "device_model_id": 500,
         "device_model_name": "Asus P750",
         "cpm": 0.15
      }
   ],
   "_pagination": {
      "totalCount": 1,
      "offset": 0,
      "limit": 100
   },
   "_metadata": {
      "reads": 12,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 61,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.07835603,
      "start_microtime": 1.48490842E9,
      "version": "3.0.02"
   }
}

This API returns a list of microbidding by IDs.

HTTP Request

GET (id)https://api.bucksense.com/3.0/campaign/micro_bidding/id/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Path Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Limit Query Integer It constrains the number of rows in a result set (the default is 10) Optional
Offset Query Integer The offset specifies the offset of the first row to return.
The offset of the first row is 0, not 1 (the default is 0)
Optional
Orderby Query String It is used to sort the data in a record set
(the records are in order of ascending ID by default)
Optional
Sort Query String It is used to sort the records in a descending order, you can use the 'desc’ keyword
(the default is 'asc’)
Optional
Filter Query String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Optional
Search Query String It is used to search the data in a record set. Use a comma separated list of search terms to use. Ability to use the * operator. (default 'string’, without **) Optional
Search_field Query String It is used to define search field target. Use a comma separated list of fields to use Optional
Search_condition Query String It is used to specify the condition of the search 'and’ & 'or’ in the case of multiple search fields (the default is 'or’) Optional
Search_and Query String It is used to search the data in a record set. Use a comma separated list of search terms to use. Ability to use the * operator. (default 'string’, without **) Optional
Search_and_field Query String It is used to define search field target. Use a comma separated list of fields to use Optional
Search_and_condition Query String It is used to specify the condition of the search 'and’ & 'or’ in the case of multiple search fields (the default is 'or’) Optional



QUERY STRING Examples:

Without Filter:

https://api.bucksense.com/3.0/campaign/micro_bidding/6032/?token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 6032,
“campaign_id”: 11316,
“campaign_name”: “test”,
“exchange_id”: 22,
“exchange_name”: “ZeroPark”,
“placement”: “test”,
“os_id”: 32,
“os_name”: “Chrome OS”,
“device_make_id”: 0,
“device_make_name”: “”,
“device_model_id”: 0,
“device_model_name”: “”,
“cpm”: 0.04,
“bid_floor”: 0 } ] }


With Filter:

https://api.bucksense.com/3.0/campaign/micro_bidding/6032/?token=TOKEN&filter=campaign_id,exchange_id

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 6032,
“campaign_id”: 11316,
“exchange_id”: 22 } ] }


Edit Microbidding

Example PUT:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 186,
         "campaign_id": 9130,
         "campaign_name": "doc test",
         "exchange_id": 1,
         "exchange_name": "Smaato",
         "placement": "mynicestring",
         "os_id": 1,
         "os_name": "Android",
         "device_make_id": 40,
         "device_make_name": "QMobile",
         "device_model_id": 500,
         "device_model_name": "Asus P750",
         "cpm": 0.15
      }
   ],
   "_metadata": {
      "reads": 1,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 2,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 40,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.09957981,
      "start_microtime": 1.48484352E9,
      "version": "3.0.02"
   }
}

This API allows the editing of a new microbidding.

HTTP Request

PUThttps://api.bucksense.com/3.0/campaign/micro_bidding/id/

Parameters

Parameter name Parameter_Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Path Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Exchange_id Body Integer It is used to define a exchange id Optional
Placement Body String It is the source from which come the bid Optional
Os_id Body Integer It is used to define a operating system id Optional
Device_make_id Body Integer It is used to define a device make id Optional
Device_model_id Body Integer It is used to define a device model id Optional
CPM Body Float Cost per Mille Impressions Optional



QUERY STRING Examples:

https://api.bucksense.com/3.0/campaign/micro_bidding/186/?token=TOKEN

Raw:{
“exchange_id”: 1,
“placement”: “mynicestring”,
“os_id”: 2,
“device_make_id”: 40,
“device_model_id”: 500,
“cpm”: 10.1}

Offer Manager

Model Schema:

{
  "id": "integer",
  "name": "string",
  "redirect_offer_id": "integer",
  "url": "string",
  "type": "string",
  "area": "string",
  "visibility": "string",
  "redirect_method": "string",
  "auto_approval": "integer",
  "protocol": "string",
  "advertiser_id": "integer",
  "advertiser_company": "string",
  "expire_time": "integer",
  "public": "integer",
  "event_id": "integer",
  "event_uid": "string",
  "event_name": "string",
  "conversion_type": "string",
  "currency": "string",
  "revenue": "integer",
  "total_cap": "integer",
  "monthly_cap": "integer",
  "daily_cap": "integer",
  "targeting_offer_id": "integer",
  "start_date": "timestamp",
  "end_date": "timestamp",
  "tracking_click_domain_id": "integer",
  "tracking_click_domain_name": "string",
  "conversion_click_domain_id": "integer",
  "conversion_click_domain_name": "string",
  "targeting_offer_id": "integer",
  "status_smartlink": "string",
  "status": "string",
  "category": {
        "id": "integer",
        "name": "string",
        "value": "string"
        },
  "mobile": {
        "id": "integer",
        "name": "string",
        "appid_store": "string",
        "mobile_offer_id": "integer"
        }
}

This API return the information about the offer.

The offers refer in general to products, services or specific brands.
The offers contain the basic information that it is needed to set up the campaigns attached to them and track their performance.

An offer can be of 4 different types:
- web
- mobile web
- mobile app
- web responsive

Defining the type of offer not only is important to classify your offers, but it’s also useful to determine the specific campaign settings that are directly tied to the offer type you have chosen. This API returns the list of events related with an offer.

For further information side console, please check out the user guide with the steps to follow.

For “Web Offer”: Create Web Offer

For “App Offer”:Create App Offer



HTTP Request

GEThttps://api.bucksense.com/3.0/offer/manager/

POSThttps://api.bucksense.com/3.0/offer/manager/

GET (id)https://api.bucksense.com/3.0/offer/manager/{id}

PUThttps://api.bucksense.com/3.0/offer/manager/{id}

GET Offer

Example GET OFFER:

{
  "httpstatus": "OK",
  "httpcode": 200,
  "error": 0,
  "data": [
    {
        "id": 2890,
        "name": "3003OFFerTest",
        "redirect_offer_id": 0,
        "url": "offer.com",
        "type": "mobile_app",
        "area": "rtb",
        "visibility": "approval",
        "redirect_method": "http_302",
        "auto_approval": 0,
        "protocol": "server",
        "advertiser_id": 839,
        "advertiser_company": "3003Test",
        "expire_time": 60,
        "public": 1,
        "event_id": 0,
        "event_uid": "",
        "event_name": "",
        "conversion_type": "CPA",
        "currency": "USD",
        "revenue": 0,
        "total_cap": 0,
        "monthly_cap": 0,
        "daily_cap": 0,
        "targeting_offer_id": 1442,
        "start_date": "",
        "end_date": "",
        "tracking_click_domain_id": 0,
        "tracking_click_domain_name": "",
        "conversion_click_domain_id": 0,
        "conversion_click_domain_name": "",
        "timezone_id": 17,
        "status_smartlink": "enable",
        "status": "active",
        "status_tracking": "active",
        "status_tracking_reasons": "",
        "active": 0,
        "activable": false,
        "category": [
            {
                "id": 140,
                "name": "Comunication"
            }
        ],
        "mobile": [
            {
                "id": 234,
                "name": "3003OFFer",
                "appid_store": "off.it",
                "os_id": 2,
                "os_name": "iOS",
                "mobile_offer_id": 67,
                "sdk_type": "sdk_others"
            }
        ]
    },
  "_pagination": {
      "totalCount": 1,
      "offset": 0,
      "limit": 100
  },
  "_metadata": {
      "reads": 2,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 2,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.40130519866943,
      "start_microtime": 1498652647.011,
      "version": "3.0.00"
  }
}

This API returns the list of all events related with an offer.

In the call we can insert filters and/or parameters to display for example:
- only some fields of each offers
- sort the offers by our id or name
- a defined number of offers
- only the offers with specific features (for example, only active offers)

HTTP Request

GEThttps://api.bucksense.com/3.0/offer/manager/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
Limit Query Integer It constrains the number of rows in a result set.
The default value is 10
Optional
Offset Query Integer The offset specifies the offset of the first row to return.
The offset of the first row is 0, not 1.
The default value is 0
Optional
Orderby Query String It is used to sort the data in a record set
The records are in order of ascending ID by default
Optional
Sort Query String It is used to sort the records in a descending order,
you can use the 'desc’ keyword
The default value is 'asc’
Optional
Filter Query String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Optional
Search Query String It is used to search the data in a record set.
Use a comma separated list of search terms to use.
Ability to use the * operator.
The default 'string’, without **
Optional
Search_field Query String It is used to define search field target.
Use a comma separated list of fields to use
Optional
Search_condition Query String It is used to specify the condition of the search 'and’ & 'or’
in the case of multiple search fields.
The default value is 'or’
Optional
Search_and Query String It is used to search the data in a record set.
Use a comma separated list of search terms to use.
Ability to use the * operator.
The default 'string’, without **
Optional
Search_and_field Query String It is used to define search field target.
Use a comma separated list of fields to use
Optional
Search_and_condition Query String It is used to specify the condition of the search 'and’ & 'or’
in the case of multiple search fields.
The default value is 'or’
Optional
Status Query String It is used to filter by status the data in a record set.
The possible values are 'draft,active,paused’.
The default value is 'draft’
Optional
Category Query Integer It is used to return the categories associated with the offer.
The default value is '0’ - false
Optional
Statistic Query Integer It is used to return the statistic of the offer.
The default value is '0’ - false
Optional
Mobile Query Integer It is used to return the mobile associated with the offer.
The default value is '0’ - false
Optional



QUERY STRING Examples:

Without Filter:


With Filter:

https://api.bucksense.com/3.0/offer/manager/?limit=2&orderby=name&token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 2890,
“name”: “3003OFFerTest”,
“redirect_offer_id”: 0, “url”: “offer.com”,
“type”: “mobile_app”,
“area”: “rtb”, “visibility”: “approval”, “redirect_method”: “http_302”, “auto_approval”: 0, “protocol”: “server”,
“advertiser_id”: 839,
“advertiser_company”: “3003Test”,
“redirect_method”: “http_302”,
“expire_time”: 60,
“public”: 1,
“event_id”: 0,
“event_uid”: “”,
“event_name”: “”,
“conversion_type”: “CPA”,
“currency”: “USD”,
“revenue”: 0,
“targeting_offer_id”: 1442,
“total_cap”: 2.0, “monthly_cap”: 0, “daily_cap”: 0, “targeting_offer_id”: 1442, “start_date”: “”, “end_date”: “”, “tracking_click_domain_id”: 0, “tracking_click_domain_name”: “”, “conversion_click_domain_id”: 0, “conversion_click_domain_name”: “”, “timezone_id”: 17,
“status_smartlink”: “enable”,
“status”: “active”
“status_tracking”: “active”, “status_tracking_reasons”: “”, “active”: 0, “activable”: false,
“category”: [{“id”: 140,“name”: “Comunication”}] },
{ “id”: 14448,
“name”: “MOBILE WEB_POP”,
“url”: “https://outlook.live.com/owa/#mkt=it-it&wa=wsignin1.0”,
“type”: “mobile_web”,
“protocol”: “https”,
“advertiser_id”: 839,
“advertiser_company”: “3003Test”,
“redirect_method”: “http_302”,
“expire_time”: 60,
“public”: 1,
“event_id”: 0,
“event_uid”: “”,
“event_name”: “”,
“conversion_type”: “CPA”,
“currency”: “USD”,
“revenue”: 0,
“targeting_offer_id”: 13027,
“status_smartlink”: “enable”,
“status”: “active” ……… } ]…. }


https://api.bucksense.com/3.0/offer/manager/?orderby=name&filter=name,status,type&token=TOKEN

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 2890, “name”: “1 Test Mobile App”, “type”: “mobile_app”, status": “active” },
{ “id”: 14448, “name”: “2 Test Mobile Web”, “type”: “mobile_web”, “status”: “active” },
{ “id”: 14442, “name”: “3 Test Web”, “type”: “web”, “status”: “active” },
{ “id”: 14445, “name”: “4 Test Responsive”, “type”: “responsive”, “status”: “active” },…. ],…}


https://api.bucksense.com/3.0/offer/manager/?orderby=name&search=2890,14448&search_condition=OR&search_field=id,id&sort=asc&targeting=1&token=TOKEN

Response (as example above for search of two offers):

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 2890,
“name”: “1 Test Mobile App”,…..
“targeting_offer”: [{“id”: 1234}] },
{ “id”: 14448,
“name”: “2 Test Mobile Web”,…..
“targeting_offer”: [{“id”: 56789}] },… ] }


https://api.bucksense.com/3.0/offer/manager/?search=2890,14448&search_condition=OR&search_field=id,id&targeting=1&&mobile=1&token=TOKEN

Response (as example above for search of two offers):

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 2890,
“name”: “1 Test Mobile App”,…..
“targeting_offer”: [{“id”: 1234}]
“mobile”: [ { “id”: 358, “name”: “0806AppTest”, “appid_store”: “0806.com”, “os_id”: 1, “os_name”: “Android”, “mobile_offer_id”: 725,
“sdk_type”: “sdk_others” }] },
{ “id”: 14448,
“name”: “2 Test Mobile Web”,…..
“targeting_offer”: [{“id”: 56789}] },… ] }



See the others examples in section Offer-See a offer created



NOTE:

→ For Statistic info, statistic=1 should be entered in the string
Example: https://api.bucksense.com/3.0/campaign/manager/12451/?statistic=1&token=TOKEN

→ For Mobile info, mobile=1 should be entered in the string
Example: https://api.bucksense.com/3.0/campaign/manager/12451/?mobile=1&token=TOKEN

Add Offer

Example Response POST OFFER:


{
  "httpstatus": "OK",
  "httpcode": 200,
  "error": 0,
  "data": [
    {
        "id": 16649,
        "name": "test OFFER doc",
        "redirect_offer_id": 0,
        "url": "http://demo.com/",
        "type": "web_mobile_web",
        "area": "rtb",
        "visibility": "approval",
        "redirect_method": "http_200_html",
        "auto_approval": 0,
        "protocol": "http_img",
        "advertiser_id": 986,
        "advertiser_company": "test_fabio_adv",
        "expire_time": 60,
        "public": 1,
        "event_id": 0,
        "event_uid": "",
        "event_name": "",
        "conversion_type": "CPA",
        "currency": "USD",
        "revenue": 1.2,
        "total_cap": 0,
        "monthly_cap": 0,
        "daily_cap": 0,
        "targeting_offer_id": 12345,
        "start_date": "2017-07-01T00:59:59+02:00",
        "end_date": "2017-07-02T00:59:59+02:00",
        "tracking_click_domain_id": 0,
        "tracking_click_domain_name": "",
        "conversion_click_domain_id": 0,
        "conversion_click_domain_name": "",
        "timezone_id": 17,
        "status_smartlink": "enable",
        "status": "paused",
        "status_tracking": "active",
        "status_tracking_reasons": "",
        "active": 0,
        "activable": false,
        "conversion_tracking": [
            {
                "event_name": "Close",
                "event_id": 4,
                "level": 1
            }
        ],
        "category": [
            {
                "id": 2,
                "name": "Flycell - AT"
            }
        ]
    }
  ],
  "_pagination": {
    "totalCount": 1,
    "offset": 0,
    "limit": 100
  },
  "_metadata": {
    "reads": 2,
    "read_limit": 1000,
    "read_limit_seconds": 60,
    "writes": 0,
    "write_limit": 100,
    "write_limit_seconds": 60,
    "requests": 12,
    "request_limit": 5000,
    "request_limit_seconds": 60,
    "time": 0.15229392051697,
    "start_microtime": 1499172073.45,
    "version": "3.0.00"
  }
}

This API allows the addition of a new offer.

HTTP Request

POSThttps://api.bucksense.com/3.0/offer/manager/

Parameters

Parameter name Parameter_Type Data Type Description Required
Token Query String Token generated through the API /login YES
Name Body String It is the offer name YES
Area Body String Value = 'rtb’ or 'affiliate’ YES
Url Body String It is the url YES
Protocol Body String Value = 'http’ or 'https’ or 'http_img’ or 'https_img’ or 'server’ or 'server_affiliate’ or 'mobile_app’ or 'mobile_device’ YES
Type Body String 'web’ or 'mobile_web’ or 'mobile_app’ or “web_mobile_web” YES
Advertiser_id Body String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Optional
Status Body String Value = 'active’ or 'paused’ or 'pending’ Optional
Redirect_Method Body String Redirect Type. Value = 'http_302’ or
'http_200_header’ or 'http_200_html’
Optional
Offer_conversion_type Body String Value = 'CPA: cost per acquisition’ or
'CPI: cost per install’ or 'CPC: cost per click’
Optional
Offer_currency Body String Currency Code. Value = USD Optional
Category Body Array It is category of offer Optional
Status_Smartlink Body String Value = 'enable’ or 'disable’ Optional
Conversion_tracking Body String Tracking of Conversions Optional


Define the type of offer based on the product/service you want to drive traffic to.

TYPE OFFER Options:

Options Value on Query
Web web
Mobile Web mobile_web
Mobile App mobile_app
Web Responsive web_mobile_web

REDIRECT METHOD Options:

Options Value on Query
HTTP 302 http_302
HTTP 200 Header Refresh http_200_header
HTTP 200 HTML Refresh http_200_html



QUERY STRING Examples:

https://api.bucksense.com/3.0/offer/manager/?token=TOKEN

Raw:{
“name”: “test OFFER doc”,
“area”: “rtb”,
“url”: “http://demo.com/”,
“protocol”: “http_img”,
“type”: “web_mobile_web”,
“conversion_type”: “CPA”,
“currency”: “USD”,
“revenue”: 1.2,
“redirect_method”: “http_200_html”,
“category”: [2]}

GET (id) Offer

Example GET (id) OFFER:

{
  "httpstatus": "OK",
  "httpcode": 200,
  "error": 0,
  "data": [
    {
        "id": 16649,
        "name": "test OFFER doc",
        "redirect_offer_id": 0,
        "url": "http://demo.com/",
        "type": "web_mobile_web",
        "area": "rtb",
        "visibility": "approval",
        "redirect_method": "http_200_html",
        "auto_approval": 0,
        "protocol": "http_img",
        "advertiser_id": 986,
        "advertiser_company": "test_fabio_adv",
        "expire_time": 60,
        "public": 1,
        "event_id": 0,
        "event_uid": "",
        "event_name": "",
        "conversion_type": "CPA",
        "currency": "USD",
        "revenue": 1.2,
        "total_cap": 4,
        "monthly_cap": 2,
        "daily_cap": 1,
        "targeting_offer_id": 15242,
        "start_date": "2017-07-01T00:59:59+02:00",
        "end_date": "2017-07-02T00:59:59+02:00",
        "tracking_click_domain_id": 0,
        "tracking_click_domain_name": "",
        "conversion_click_domain_id": 0,
        "conversion_click_domain_name": "",
        "timezone_id": 17,
        "status_smartlink": "enable",
        "status": "paused",
        "status_tracking": "active",
        "status_tracking_reasons": "",
        "active": 0,
        "activable": false,
        "conversion_tracking": [
            {
                "event_name": "Close",
                "event_id": 4,
                "level": 1
            }
        ],
        "targeting_offer": [
            {
                "id": 15242
            }
        ],
        "category": [
            {
                "id": 2,
                "name": "Flycell - AT"
            }
        ]
    }
  ],
  "_pagination": {
  "totalCount": 1,
  "offset": 0,
  "limit": 100
  },
  "_metadata": {
    "reads": 1,
    "read_limit": 1000,
    "read_limit_seconds": 60,
    "writes": 0,
    "write_limit": 100,
    "write_limit_seconds": 60,
    "requests": 1,
    "request_limit": 5000,
    "request_limit_seconds": 60,
    "time": 0.19960403442383,
    "start_microtime": 1499173772.299,
     "version": "3.0.00"
 }

This API returns the events related with the single offer.

HTTP Request

GET (id)https://api.bucksense.com/3.0/offer/manager/{id}/

Parameters

Parameter name Data Type Description Required
Token Query String Token generated through the API /login
Id Path Integer It returns the object of one or more specific ID (example, 1,2,3)
Limit Query Integer It constrains the number of rows in a result set.
The default value is 10
Offset Query Integer The offset specifies the offset of the first row to return.
The offset of the first row is 0, not 1.
The default value is 0
Orderby Query String It is used to sort the data in a record set
The records are in order of ascending ID by default
Sort Query String It is used to sort the records in a descending order,
you can use the 'desc’ keyword
The default value is 'asc’
Filter Query String It is used to limiting which fields are returned by the API.
Use a comma separated list of fields to use
Search Query String It is used to search the data in a record set.
Use a comma separated list of search terms to use.
Ability to use the * operator.
The default 'string’, without **
Search_field Query String It is used to define search field target.
Use a comma separated list of fields to use
Search_condition Query String It is used to specify the condition of the search 'and’ & 'or’
in the case of multiple search fields.
The default value is 'or’
Status Query String It is used to filter by status the data in a record set.
The possible values are 'draft,active,paused’.
The default value is 'draft’
Category Query Integer It is used to return the categories associated with the offer
Statistic Query Integer It is used to return the statistic of the offer.
The default value is '0’ - false
Targeting_offer Query Integer It is used to return the offer’s targeting.
The default value is '0’ - false
Mobile Query Integer It is used to return the mobile associated with the offer.
The default value is '0’ - false



QUERY STRING Examples:

https://api.bucksense.com/3.0/offer/manager/16644/?token=TOKEN

Response:
{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 16644,
“name”: “3003OFFerTest”,
“redirect_offer_id”: 0, “url”: “offer.com”,
“type”: “mobile_app”,
“area”: “rtb”,
“visibility”: “approval”,
“redirect_method”: “http_302”,
“auto_approval”: 0,
“protocol”: “server”,
“advertiser_id”: 839,
“advertiser_company”: “3003Test”,
“redirect_method”: “http_302”,
“expire_time”: 60,
“public”: 1,
“event_id”: 0,
“event_uid”: “”,
“event_name”: “”,
“conversion_type”: “CPA”,
“currency”: “USD”,
“revenue”: 0,
“targeting_offer_id”: 1442,
“total_cap”: 0,
“monthly_cap”: 0,
“daily_cap”: 0,
“targeting_offer_id”: 1442,
“start_date”: “”,
“end_date”: “”,
“tracking_click_domain_id”: 0,
“tracking_click_domain_name”: “”,
“conversion_click_domain_id”: 0,
“conversion_click_domain_name”: “”,
“timezone_id”: 17,
“status_smartlink”: “enable”,
“status”: “active”
“status_tracking”: “active”,
“status_tracking_reasons”: “”,
“active”: 0,
“activable”: false,
“conversion_tracking”: [ { “event_name”: “Close”, “event_id”: 4, “level”: 1 } ],
“category”: [ { “id”: 2, “name”: “Flycell - AT” } ] } }



- Below, an example of a search for offer with ID=16644 with your mobile (mobile=1):

https://api.bucksense.com/3.0/offer/manager/16644/?token=TOKEN&mobile=1

Response:
{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 16644,….
“mobile”: [ { “id”: 234,
“name”: “3003OFFerTest”,
“appid_store”: “off.it”,
“os_id”: 2,
“os_name”: “iOS”,
“mobile_offer_id”: 11,
“sdk_type”: “sdk_others” } ] } ]…}


- Below, an example of a search for offer when do you want to see only some fields(filter=name,url,type,status):

https://api.bucksense.com/3.0/offer/manager/16644/?token=TOKEN&filter=name,url,type,status

Response:
{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 16644,
“name”: “doc test2706”,
“url”: “http://bucksense.com/{device_model_id}”,
“type”: “web_mobile_web”,
“status”: “active” } ]…}



NOTE:

→ For Statistic info, statistic=1 should be entered in the string
Example: https://api.bucksense.com/3.0/campaign/manager/16644/?statistic=1&token=TOKEN

→ For Mobile info, mobile=1 should be entered in the string
Example: https://api.bucksense.com/3.0/campaign/manager/16644/?mobile=1&token=TOKEN

→ For Targeting_offer info, targeting=1 should be entered in the string
Example: https://api.bucksense.com/3.0/campaign/manager/16644/?targeting=1&token=TOKEN

Edit Offer

Example Response PUT (id) OFFER:

{
  "httpstatus": "OK",
  "httpcode": 200,
  "error": 0,
  "data": [
    {
        "id": 16649,
        "name": "test OFFER doc",
        "redirect_offer_id": 0,
        "url": "http://demo.com/",
        "type": "web_mobile_web",
        "area": "rtb",
        "visibility": "approval",
        "redirect_method": "http_200_html",
        "auto_approval": 0,
        "protocol": "http_img",
        "advertiser_id": 986,
        "advertiser_company": "test_fabio_adv",
        "expire_time": 60,
        "public": 1,
        "event_id": 0,
        "event_uid": "",
        "event_name": "",
        "conversion_type": "CPA",
        "currency": "USD",
        "revenue": 1.2,
        "total_cap": 0,
        "monthly_cap": 0,
        "daily_cap": 0,
        "targeting_offer_id": 12345,
        "start_date": "2017-07-01T00:59:59+02:00",
        "end_date": "2017-07-02T00:59:59+02:00",
        "tracking_click_domain_id": 0,
        "tracking_click_domain_name": "",
        "conversion_click_domain_id": 0,
        "conversion_click_domain_name": "",
        "timezone_id": 17,
        "status_smartlink": "enable",
        "status": "paused",
        "status_tracking": "active",
        "status_tracking_reasons": "",
        "active": 0,
        "activable": false,
        "conversion_tracking": [
            {
                "event_name": "Close",
                "event_id": 4,
                "level": 1
            }
        ],
        "category": [
            {
                "id": 2,
                "name": "Flycell - AT"
            }
        ]
    }
  ],
  "_pagination": {
    "totalCount": 1,
    "offset": 0,
    "limit": 100
  },
  "_metadata": {
    "reads": 2,
    "read_limit": 1000,
    "read_limit_seconds": 60,
    "writes": 0,
    "write_limit": 100,
    "write_limit_seconds": 60,
    "requests": 12,
    "request_limit": 5000,
    "request_limit_seconds": 60,
    "time": 0.15229392051697,
    "start_microtime": 1499172073.45,
    "version": "3.0.00"
  }
}

This API editing a single offer (by Id).

HTTP Request

PUThttps://api.bucksense.com/3.0/offer/manager/id/

Parameters

Parameter name Parameter_Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Path String It returns the object of one or more specific ID (example, 1,2,3) YES
Name Body String It is the offer name Optional
Url Body String It is the url Optional
Protocol Body String Value = 'http’ or 'https’ or 'http_img’ or 'https_img’ or 'server’ or 'server_affiliate’ or 'mobile_app’ or 'mobile_device’ Optional
Offer_conversion_type Body String Value = 'CPA: cost per acquisition’ or
'CPI: cost per install’ or 'CPC: cost per click’
Optional
Offer_currency Body String Currency Code. Value = USD Optional
Category Body Array It is category of offer Optional
Status Body String Value = 'active’ or 'paused’ or 'pending’ Optional
Status_Smartlink Body String Value = 'enable’ or 'disable’ Optional
Redirect_Method Body String Redirect Type.
Value = 'http_302’ or 'http_200_header’ or 'http_200_html’
Optional



QUERY STRING Examples:



NOTE:

Offer Targeting

Model Schema:

{
         "id": "integer",
         "smartlink_category": "integer",
         "country": "string",
         "connection_type": "integer",
         "carrier": "string",
         "os": "string"
}

This API return the information for targeting of single offer.

HTTP Request

GET (id)https://api.bucksense.com/3.0/offer/targeting/{id}/

PUThttps://api.bucksense.com/3.0/offer/targeting/{id}/

GET Offer Targeting

Example GET OFFER TARGETING:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 6072,
         "country": [
            {
               "id": 24,
               "name": "ANGOLA",
               "action": "include"
            }
         ],
         "connection_type": [
            {
               "id": 1,
               "name": "Wifi",
               "action": "exclude"
            }
         ],
         "carrier": [
            {
               "id": 1398,
               "name": "MOVICEL",
               "country_id": "24",
               "action": "include"
            }
         ],
         "os": [
            {
               "id": 23,
               "name": "Windows",
               "action": "include"
            }
         ],
         "smartlink_category": [
            {
               "id": 2,
               "name": "fashion",
               "action": "include"
            }
         ]
      }
   ],
   "_pagination": {
      "totalCount": 0,
      "offset": 0,
      "limit": 100
   },
   "_metadata": {
      "reads": 1,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 2,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 5,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.10658383,
      "start_microtime": 1.4846624E9,
      "version": "3.0.02"
   }
}

This API returns the targeting of single offer (by Id).

HTTP Request

GEThttps://api.bucksense.com/3.0/offer/targeting/{id}/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Query Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Country Query Array of String This is country for offer Optional
Smartlink_category Query Integer Category of api requied (from 1 to 5) → See Smartlink Category Options Optional
Connection_type Query Integer Type of connection requied (from 1 to 2):
'1’ = 'Wifi’, '2’ = 'Cellular data’
Optional
Carrier Query String This is carrier name of country selected Optional
Os Query String This is operating system name Optional



QUERY STRING Examples:

https://api.bucksense.com/3.0/offer/targeting/15236/?token=TOKEN

Response:
{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [ {
“id”: 15236,
“country”: [ { “id”: 24, “name”: “ANGOLA”, “action”: “include” } ],
“connection_type”: [ { “id”: 1, “name”: “Wifi”, “action”: “exclude” } ],
“carrier”: [ { “id”: 1398, “name”: “MOVICEL”, “country_id”: “24”, “action”: “include” } ],
“os”: [ { “id”: 23, “name”: “Windows”, “action”: “include” } ],
“smartlink_category”: [ { “id”: 1, “name”: “sport”, “action”: “include” } ] } ]… }



The table below shows the possible smartlink categories.

Smartlink Category Description
1 Sport
2 Fashion
3 Fitness
4 Colour
5 Games

Edit Offer Targeting

Example PUT OFFER TARGETING:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 6072,
         "country": [
            {
               "id": 24,
               "name": "ANGOLA",
               "action": "include"
            }
         ],
         "connection_type": [
            {
               "id": 1,
               "name": "Wifi",
               "action": "exclude"
            }
         ],
         "carrier": [
            {
               "id": 1398,
               "name": "MOVICEL",
               "country_id": "24",
               "action": "include"
            }
         ],
         "os": [
            {
               "id": 23,
               "name": "Windows",
               "action": "include"
            }
         ]
      }
   ],
   "_pagination": {
      "totalCount": 0,
      "offset": 0,
      "limit": 100
   },
   "_metadata": {
      "reads": 1,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 2,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 5,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.10658383,
      "start_microtime": 1.4846624E9,
      "version": "3.0.02"
   }
}

This API editing a targeting of single offer (by Id).

HTTP Request

PUThttps://api.bucksense.com/3.0/offer/targeting/{id}/

Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
ID Query Integer It returns the object of one or more specific ID (example, 1,2,3) YES
Country Query Array of String This is country for offer Optional
Connection_type Query Integer Type of connection requied (from 1 to 2):
'1’ = 'Wifi’, '2’ = 'Cellular data’
Optional
Carrier Query String This is carrier name of country selected Optional
Os Query String This is operating system name Optional



QUERY STRING Examples:

https://api.bucksense.com/3.0/offer/targeting/15236/?token=TOKEN

Raw:{
“country”: [ {“id”: 24,“action”: “include”}],
“connection_type”: [ { “id”: 1, “action”: “exclude” }],
“carrier”: [ { “id”: 1398, “country_id”: “24”, “action”: “include” }],
“os”: [ {“id”: 23,“action”: “include”}]
}

Report Thirdpart

Model Schema:

{
  "dimension_1": "string",
  "dimension_N": "string",
  "metric_1": "string",
  "metric_N": "string",
  "timestamp": "string"
}

This API return the information about the data required.
Bucksense reports give you real-time data on your offer or campaign parameters and can be customized to give you meaningful insights into their performance. From report analysis, you’ll get useful data and this will help you to optimize your campaigns.
With reports you can use filters, dimensions (see “Dimensions Option”) and metrics (see “Metrics Option”) to analyze data in a more specific way.

For further information side console, please check out the user guide:

Reports Information

HTTP Request

GEThttps://api.bucksense.com/3.0/report/thirdpart/

GET Report Thirdpart

Example 1. Report:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": {
      "result": {
         "data": [
            {
               "event": {
                  "place_name": "Test Android",
                  "exchange_id": "1",
                  "admin_revenue": 0,
                  "company_spent": 0.012560001,
                  "conversion_count": 0,
                  "place_id": "01agltb3B1Yi1pbmNyDAsSA0FwcBj3n7AAAA",
                  "timestamp": "2016-04-04T00:00:00",
                  "spent": 0.012560001
               }
            }
         ],
         "error": false,
         "message": ""
      }....
   },
   "_pagination": {
      "totalCount": 0,
      "offset": 0,
      "limit": 0
   },
   "_metadata": {
      "reads": 11,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 23,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.13810802,
      "start_microtime": 1.48188506E9,
      "version": "3.0.02"
   }
}

Example 2. Report:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": {
      "result": {
         "data": [
            {
               "name_dimension": "advertiser_name",
               "name": "Advertiser",
               "name_filter": "advertiser_id",
               "type": "advertiser/manager",
               "label": "Advertisers",
               "redis": true
            },
            {
               "name_dimension": "browser_name",
               "name": "Browser",
               "name_filter": "browser_id",
               "type": "service/browser",
               "label": "browser",
               "redis": true
            },
            {
               "name_dimension": "campaign_type_name",
               "name": "campaign_type",
               "name_filter": "campaign_type",
               "type": "campaign_type",
               "label": "campaign_type",
               "redis": true
            },
            {
               "name_dimension": "carrier",
               "name": "Carrier",
               "name_filter": "carrier_id",
               "type": "service/carrier",
               "label": "Carrier Id",
               "redis": true
            },
            {
               "name_dimension": "city_name",
               "name": "City",
               "name_filter": "city_id",
               "type": "service/city",
               "label": "city",
               "redis": true
            }....
      ],
         "error": false,
         "message": ""
      }
   },
   "_pagination": {
      "totalCount": 0,
      "offset": 0,
      "limit": 0
   },
   "_metadata": {
      "reads": 11,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 30,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.0665791,
      "start_microtime": 1.48214746E9,
      "version": "3.0.02"
   }
}

Example 3. Report:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": {
      "result": {
         "data": [
           {
               "event": {
                  "place_name": "memes.com",
                  "exchange_id": "21",
                  "clicks_global": 3,
                  "place_id": "2199757",
                  "timestamp": "2016-12-17T00:00:00"
               }
            },
            {
               "event": {
                  "place_name": "worldlifestyle.com",
                  "exchange_id": "21",
                  "clicks_global": 2,
                  "place_id": "21124303",
                  "timestamp": "2016-12-17T00:00:00"
               }
            }

         ],
         "error": false,
         "message": ""
      }
   },
   "_pagination": {
      "totalCount": 0,
      "offset": 0,
      "limit": 0
   },
   "_metadata": {
      "reads": 11,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 30,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.0665791,
      "start_microtime": 1.48214746E9,
      "version": "3.0.02"
   }
}

This endpoint is only available to Bucksense Console.

Return the information about the data required. Is possible to load reports on which to do data analysis.

Can be grouped the data according to the required periods.

HTTP Request

GEThttps://api.bucksense.com/3.0/report/thirdpart/

Query Request Parameters

Parameter name Parameter Type Data Type Description Required
Token Query String Token generated through the API /login YES
Method Query String Method to call → see Methods Option Optional
Type Query Integer Type of api requied (from 1 to 5) → (see Type Option) Optional
Dimensions Query String List of dimensions separated by a comma (at least one dimensions or metrics should be specified) Optional
Metrics Query String List of metrics separated by a comma (at least one dimensions or metrics should be specified) → (see Metrics Option) YES
Timezone Query String Timezone i.e. America/New_York YES
Groupby Query String Granularity :P1D,PT1H,P1W,P1M Optional
Start_date Query String Start date of intervals 2016-04-04T00:00:00 YES
End_date Query String End date of intervals 2016-04-04T23:59:59 YES

Response Parameters

Parameter name Paramete Type Data Type
Place_name Query String
Exchange_id Query Integer
Admin_revenue Query String
Company_spent Query Float
Convertion_count Query Integer
Place_id Query String
Timestamp Query Date-Type
Spent Query Float



GRANULARY Options:

Group by define the granularity for the request, allowed values are:

Options Description
P1D period 1 day (if interval between the dates is > 7 days the api force P1M)
PT1H period 1 hour (if interval between the dates is > of 1 days and <= 7 days the api force P1D)
P1W period 1 Week (if interval between the dates is > 7 days the api force P1M)
P1M period 1 Month (if interval between the dates is > 31 days the api go in exception)



TYPE Options:

These are the possible values, according to different reports to display:

API Console
1 = bidding On Bucksense Console: session Reports → Acquisition Campaigns
2 = appevents On Bucksense Console: session Reports → App Performance
3 = tracking On Bucksense Console: session Reports → Offer Performance
4 = retargeting On Bucksense Console: session Reports → Engagement Campaigns
5 = statsbidder On Bucksense Console: session Reports → Media Planner



METHODS Options:

These are the possible values:

Options Description
getdata This method returns the data in real time
getdimensions The dimensions allow you to break down your report by multiple different data points in a multi-dimensional format for interpretation (par example, could be selecting both city and browser)



METRICS Options:

These are the possible values for Acquisition Campaigns.
The second column shows the corresponding values to be put into the query:

Metrics on Console Value on Query Description
Bids bid_response Number of response (number of partecipated auctions)
Impressions wins Number of a banner (or video) views
Win Rate win_rate % Impressions/Bids
CPM cpm Cost per Mille Impressions
Clicks Global clicks_global Global banner clicks (for example)
CPC cpc cost per click
CTR ctr click-through rate
Conversions conversion Conversion events within the Bucksense platform
cvr cvr Conversion Ratio
Advertiser Cost advertiser_spent Advertiser’s spending
Advertiser CPA advertiser_cpa CPA for Advertiser
Cost company_spent Company’s spending
CPA company_cpa Cost per Acquisition
Company Revenue company_revenue Revenue of Company
Company Margin company_margin Margin of revenue


These are the possible values for Offer Performance.
The second column shows the corresponding values to be put into the query:

Metrics on Console Value on Query Description
Clicks clicks Number of clicks
Clicks Global clicks_global Global banner clicks (for example)
Conversions conversion Conversion events within the Bucksense platform
CVR cvr Conversion Ratio
Click Fraud Count clickfraud_count Fraud and Invalid Clicks
Conversion Fraud Count conversionfraud_count Fraud Conversions: ad Fraud invalid traffic generated through fraudulent means such as malware
Track Revenue track_revenue track of revenue


These are the possible values for App Performance.
The second column shows the corresponding values to be put into the query:

Metrics on Console Value on Query Description
Count count
Unique Actions hyperunique



DIMENSIONS Options:

These are the possible values for the dimensions.
The second column shows the corresponding values to be put into the query:

Dimensions on Console Value on Query Description
Advertiser advertiser_name Name of Advertiser
App Bundle app_bundle App Bundle identifies uniquely an app
Banner Size banner_size Size of Banner
Browser browser_name Name of Browser
Browser Version browser_version_name Version of Browser
Campaign Name campaign_name Name of Campaign
Campaign Type campaign_type_name Type of Campaign
Carrier carrier see list of Carrier
City city_name see list of Cities
Creative creative_name Name of Creative
Country country_name see list of Countries
Device Make device_make see list Device Make
Device Model device_model see list Device Model
Device Os device_os see list of Operating System
Device Version device_osv see list of Operating System Version
Device Type device_type see list Device Type
Exchange Name exchange_name Name of Exchange
Native Ad Type native_type_name Type of Native
Offer offer_name Name of Offer
Placement Name place_name Name of Placement
Publisher pub_name Name of Publisher
Region region_name see list of Regions
Rotator Name rotator_name Name of Rotator
Site Domain domain Name of Domain
Supply Type supply_type Type of Supply



QUERY STRING Examples:

1.This example show the data (method=getdata) for campaigns (type=1) according to the dimensions and metrics indicated (dimensions=place_name, metrics=wins), grouped by day (groupby=P1D):

https://api.bucksense.com/3.0/report/thirdpart/?token=TOKEN&type=1&method=getdata&dimensions=place_name&metrics=wins&start_date=2016-04-04T00:00:00.000&end_date=2016-04-04T23:59:59.000&timezone=America/New_York&groupby=P1D

2.This example returns the list of the dimension (method=getdimensions) for Media Planner type (type=5) :

https://api.bucksense.com/3.0/report/thirdpart/?token=5777ab325cbca7f851af166cd1cdeac8&type=5&method=getdimensions

3.This example show the data (method=getdata) for campaigns (type=1) according to the dimensions and metrics indicated (dimensions=place_name, metrics=click_global), grouped by hour (groupby=PT1H):

https://api.bucksense.com/3.0/report/thirdpart/?token=TOKEN&type=1&method=getdata&dimensions=place_name&metrics=clicks_global&start_date=2016-12-17T00:00:00.000&end_date=2016-12-19T23:59:59.000&timezone=America/New_York&groupby=PT1H

4.This example show the data (method=getdata) for campaigns (type=1) according to the dimensions and metrics indicated (dimensions=campaign_name, metrics=spent,wins for Impression and Spent), grouped by day (groupby=P1D):

https://api.bucksense.com/3.0/report/thirdpart/?token=TOKEN&type=1&method=getdata&dimensions=campaign_id,campaign_name&metrics=spent,wins&start_date=2017-04-27T00:00:00.000&end_date=2017-04-27T23:59:59.000&timezone=America/Araguaina&groupby=P1D

Errors

The status_code is 200 for a successful request.

You can consider any non-200 HTTP response code an error - the returned data will contain more detailed information.
The status_code and message values indicate whether a request is well formed and valid.

In this table the status_code list not-200:

HTTP Status Code Error Code Message
400 10003 Invalid_Token Token has expired, please login
400 10005 Json_Error Json cannot be decoded: {error}
400 10051 Duplicate_Entry Duplicate Entry
401 -3 Token_Expired Token has expired, please login
401 10014 Unauthorized_Field Unauthorized to enter or modify this field
404 10001 Error_API Throttling, maximum sending rate exceeded
405 10008 Error_Method Method not allowed
500 10002 Throttling_Exceeded Token is missing or invalid
500 10007 Unknown_Method Unknown method
500 10009 General_Error An unexpected error occurred processing the request
550 10007 Unknown_Method Unknown method
500 Internal Server Error We had a problem with our server. Try again later
503 10006 Down_Maintenance We are currently down for maintenance
503 Service Unavailable We’re temporarially offline for maintanance. Please try again later.

Questions?

Have you run into difficulties or a method just doesn’t seem to work right? Check out our API Support options and we’ll be happy to assist you:

apisupport@bucksense.com