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 2.0. We are working on writing a complete documentation.

So this is constantly updated. The current API version is 2.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/2.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/2.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/2.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:

qa@bucksense.com

Bucksense API Info Service

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
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/2.0/adtag/vendor/?token=TOKEN

Service Adtag_size

This API returns a list of size for Adtag.

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

Service_Carrier

This API returns a list of carrier.

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

Service_City

This API returns a list of cities.

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

http://api.bucksense.com/2.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/2.0/service/city/?search=689&search_field=region_id&token=TOKEN

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

Service_Country

This API returns a list of countries.

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

Service_Connection-type

This API returns a list of connection type.

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

Service_Device-make

This API returns a list of device make.

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

Service_Device-model

This API returns a list of device model.

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

Service_Device-type

This API returns a list of device type.

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

Service_Exchange

Attention: You must enter advertiser_id in the query (http://apidoc.bucksense.com/#get-id-advertiser_manager).

This API returns a list of exchanges.

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

Service_Iabcategory

This API returns a list of iabcategory.

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

Service_List Type

This API returns a list of list’s type.

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

Service_Operating-system

This API returns a list of operating system.

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

Service_Operating-system-version

This API returns a list of operating system version.

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

Service_Region

This API returns a list of Regions.

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

http://api.bucksense.com/2.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/2.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/2.0/service/timezone?filter=id,location,gmt,keyword&limit=100&offset=0&orderby=gmt&token=TOKEN

Bucksense API Examples

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.

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

Authenticates a User

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

https://api.bucksense.com/2.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 - A new Creation

With the following example we can create an advertiser.
Once your Bucksense account is set up, our system automatically creates an Advertiser associated to your account.

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

In the following example, we create an advertiser with name “Advertiser testApiDoc” and associated with the user account 668(account).

POST Method → https://api.bucksense.com/2.0/advertiser/manager/?token=TOKEN

RAW:{
“name”: “Advertiser testApiDoc”,
“account”: “[668]”}

At the creation time the advertiser’s status is “paused” for default.
At the creation time or with a next change, we can add other specific information and enable the advertiser (status=active), as in the following example:

PUT Method → http://beta.api.bucksense.com/2.0/advertiser/manager/1769/?token=TOKEN

RAW:{
“address_1”:“Via Test”,
“city”: “Rome”,
“zipcode”: “00100”,
“phone”: “123456789”,
“country_code”: “”,
“status”: “active”}



See the others examples in section Add Advertiser or in section Edit Advertiser.

Advertiser - See its info

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

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

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

GET (id) Method → https://api.bucksense.com/2.0/advertiser/manager/945/?token=TOKEN

Response: { “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 945,
“name”: “ADV test”,
“address_1”: “”,
“address_2”: “”,
“city”: “”,
“zipcode”: “”,
“phone”: “”,
“country_code”: “”,
“country_name”: “”,
“state_code”: “”,
“state_name”: “”,
“status”: “active”,
“auto_topup”: 0 ]}]



In the query to display the accounts, the campaigns and the advertiser bag, we need enter:

- &accounts=1 to see the accounts associated with the advertiser
- &bag=1 to see the bag associated with the advertiser
- &campaigns=1 to see the campaigns associated with the advertiser

So the complete call of all fields for advertisert “945” will be:

GET (id) Method → https://api.bucksense.com/2.0/advertiser/manager/945/?token=TOKEN&campaigns=1&accounts=1&bag=1

and the Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0,
“data”: [ { “id”: 945,
“name”: “ADV Test”,
“address_1”: “”,
“address_2”: “”,
“city”: “”,
“zipcode”: “”,
“phone”: “”,
“country_code”: “”,
“country_name”: “”,
“state_code”: “”,
“state_name”: “”,
“status”: “active”,
“auto_topup”: 0,
“bag_amount_live”: 5,
“account”: [ { “id”: 1112, “name”: “RGUser”, “surname”: “User”, “status”: “active” } ],
“campaign”: [ { “id”: “1234”, “name”: “Campaign1”, “status”: “paused”, “status_bidder”: “paused” },
{ “id”: “5678”, “name”: “Campaign2”, “status”: “active”, “status_bidder”: “active” } ]}]



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

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/2.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”: 7, “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/2.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”: 4, “name”: “accounting”, “type”: “RW” },
{ “id”: 5, “name”: “developer_management”, “type”: “RW” },
{ “id”: 6, “name”: “engagement_admin_management”, “type”: “RW” },
{ “id”: 7, “name”: “offer_management”, “type”: “RW” },
{ “id”: 8, “name”: “campaign_management”, “type”: “RW” },
{ “id”: 9, “name”: “report”, “type”: “R” } ],
“permission_unsigned”: [] }]



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

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/2.0/offer/manager/123?token=TOKEN

RAW:{
“name”: “Creation Test”,
“url”: “test_url”,
“protocol”: “http_img”,
“advertiser_id”: 500,
“type”: “web”,
“conversion_type”: “cpr”,
“currency”: “USD”,
“revenue”: 1.123456,
“category”: [2],
“total_cap”: 100,
“monthly_cap”: 50,
“daily_cap”: 5,
“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/2.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/2.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/2.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/2.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/2.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/2.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/2.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/2.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/2.0/campaign/manager/97/?token=TOKEN

RAW :{“status”:“paused”}



See the others examples in section Edit Campaign.

Campaign - See a campaign created

GET Method → https://api.bucksense.com/2.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/2.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/2.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/2.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).

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/2.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/2.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/2.0/campaign/list-manager/?token=TOKEN

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


Each Placement has its unique identifier.

POST Method → https://api.bucksense.com/2.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/2.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/2.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/2.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/2.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/2.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/2.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/2.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/2.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/2.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/2.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”
}

Bucksense API List

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 under review
Alerts 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 under review
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 uOK

Authentication

Model Schema:

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

Example:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": "510",
         "type": "member",
         "company_uid": "k594t5ece58f6dd",
         "status": "active",
         "token": "c426874628a74b3e98677ac1ce7b1c44"
      }
   ],
   "_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": "2.0.15"
   }
}

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/2.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/2.0/login/?username=test@bucksense.com&password=a915bdg1a86aacc36d5ab4ef71c64gg5

Response:
{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: “1234”,
“type”: “publisher”,
“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.
See also in the example:

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/2.0/adtag/manager/

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

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

PUThttps://api.bucksense.com/2.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": false,
            "*RAW*": "<!--\r\nTag generated: 07-10-16 15:03:12\r\nCampaign: Live Certification_2\r\nAd Name: BuckSense_Mobile_320x50_InApp_07th Oct\r\nDevice: Mobile\r\nFormat: Banner\r\nEnvironment: Applications\r\nNetwork: Bonzai\r\n-->\r\n<div class='bonzai-wrap'> \r\n<script src=\"mraid.js\"></script> \r\n<script type='text/javascript'>\r\n(function() {\r\nvar bonzai_adid = '242414412434298659';\r\nvar bonzai_sn = 'bonzai'; \r\nvar bonzai_data = '{\"network\":{\"settings\":{\"env\":\"app\",\"tagType\":\"iFrame\",\"iFrmBust\":\"Y\",\"zIndex\":\"\",\"iFrameBustFile\":\"Y\"},\"keyId\":\"GEN\",\"name\":\"Bonzai\",\"publisherId\":\"\",\"exchangeId\":\"\",\"bidId\":\"\",\"macros\":{\"clkTr\":{\"img\":[\"%%CLICK_TRACKER%%\"],\"scr\":[]},\"addiTr\":{\"cachbust\":\"%%CACHE_BUSTER%%\"}}}}'; \r\nvar scripts = document.getElementsByTagName('script'); \r\nfor(var i = scripts.length-1; i >= 0; i--) { \r\nvar s = scripts[i]; \r\nif(s.innerHTML.indexOf(bonzai_adid) >= 0) { \r\nvar script = document.createElement('script'); \r\nvar index = window.bonzaiScriptIndex  = (typeof window.bonzaiScriptIndex == 'undefined') ? 0 : ++window.bonzaiScriptIndex; \r\nscript.id = 'bonzai_script_' + index; \r\nif(!window.bonzaiObj || (typeof window.bonzaiObj == 'undefined')) {window.bonzaiObj = {};} \r\nwindow.bonzaiObj[script.id] = bonzai_data;\r\nvar protocol = window.location && window.location.protocol;\r\nscript.src = (protocol == 'https:' ? 'https://' : 'http://') + 'invoke.bonzai.ad/mizu/invoke.do?adid='+bonzai_adid+'&scriptid=' + script.id + '&rnd=%%CACHE_BUSTER%%' +'&sn='+bonzai_sn  ; \r\ns.parentNode.insertBefore(script, s.nextSibling); \r\nbreak; \r\n}}})(this); \r\n</script> \r\n<noscript> \r\n<img src=\"https://invoke.bonzai.ad/mizu/invoke.do?adid=242414412434298659&sn=bonzai&type=imp\" style=\"display:none;\" /> \r\n</noscript> \r\n</div>",
            "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": 945,
            "advertiser_name": "0806RG"
        }
    ],
    "_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": "2.0.15"
    }
}

This API returns a list of adtag.

HTTP Request

GEThttps://api.bucksense.com/2.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/2.0/adtag/manager?token=TOKEN

With Filter:

https://api.bucksense.com/2.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/2.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": "2.0.15"
    }
}

This API allows the addition of a new adtag.

HTTP Request

POSThttps://api.bucksense.com/2.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/2.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": "2.0.15"
   }
}

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": "2.0.15"
   }
}

This API allows the editing of a new adtag.

HTTP Request

GET (id)https://api.bucksense.com/2.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/api/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/api/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": "2.0.15"
    }
}

This API allows the editing of a new adtag.

HTTP Request

PUThttps://api.bucksense.com/2.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/2.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)[http://apidoc.bucksense.com/#errors]

Advertiser Manager

Model Schema:

{
  "id": "integer",
  "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",
  "status": "string",
  "bag_amount": "integer",
  "account": {
    "id": "integer",
    "name": "string",
    "surname": "string",
    "status": "string"
  },
  "campaign": {
    "id": "integer",
    "name": "string",
    "status": "string",
    "status_bidder": "string"
  }
}

An advertiser is a user who has access only to the Advertiser Account selected.
The creation of a new advertiser happens in two steps.

1) First you must create the advertiser object through the Advertiser_Manager API.

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

Each advertiser can have N accounts.

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

Create a new Advertiser

This API return the information about the advertiser. It is used for the enter and edit a advertiser.

HTTP Request

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

POSThttps://api.bucksense.com/2.0/advertiser/manager/

GET (id)https://api.bucksense.com/2.0/advertiser/manager/{id}

PUThttps://api.bucksense.com/2.0/advertiser/manager/{id}

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,
        "bag_amount_live": 5
      },
      {
         "id": 1267,
         "name": "advtest2",
         "address_1": "",
         "address_2": "",
         "city": "",
         "zipcode": "",
         "phone": "",
         "country_code": "",
         "country_name": "",
         "state_code": "",
         "state_name": "",
         "status": "active",
         "auto_topup": 0,
         "bag_amount_live": 2
      }
   ],
   "_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": "2.0.15"
   }
}

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

HTTP Request

GEThttps://api.bucksense.com/2.0/advertiser/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
Bag Query Integer It is used to return the bag associated with the advertiser,
(the default value is '0’ - false
Optional
Margin Query Integer It is used to return the bag associated with the margin,
(the default value is '0’ - false)
Optional



QUERY STRING Examples:

Without Filter:

https://api.bucksense.com/2.0/advertiser/manager?token=TOKEN


With Filter:

https://api.bucksense.com/2.0/advertiser/manager?bag=1&limit=3&margin=1&offset=10&orderby=name&sort=asc&token=TOKEN


https://betaconsole.bucksense.com/api/advertiser/manager?bag=1&limit=10&status=paused&orderby=id&sort=asc&token=TOKEN

Add Advertiser_Manager

Example POST Advertiser_Manager:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 1299,
         "name": "API test adv",
         "address_1": "Via Roma",
         "address_2": "",
         "city": "Rome",
         "zipcode": "00100",
         "phone": "3331314156",
         "country_code": "IT",
         "country_name": "Italy",
         "state_code": "",
         "state_name": "",
         "status": "active",
         "auto_topup": 1,
         "account": [
            {
               "id": 510,
               "name": "Info",
               "surname": "Demo",
               "status": "active"
            }
         ]
      }
   ],
   "_pagination": {
      "totalCount": 1,
      "offset": 0,
      "limit": 100
   },
   "_metadata": {
      "reads": 3,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 4,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 16,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.59527016,
      "start_microtime": 1.48654451E9,
      "version": "2.0.15"
   }
}

This API allows the addition of a new advertiser.

HTTP Request

POSThttps://api.bucksense.com/2.0/advertiser/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 advertiser name YES
Account Body Array It is used to set up the accounts related to the advertiser YES
Address_1 Body String It is the advertiser address Optional
Address_2 Body String It is the advertiser a another address Optional
City Body String It is the advertiser city Optional
Zipcode Body Integer Zip Code Optional
Phone Body String It is the advertiser phone Optional
Country_code Body String Code of the Country Optional
Country_name Body String Name of the Country Not Allowed
State_code Body String Code of the State Optional
State_name Body String Name of the State Not Allowed
Status Body String value - 'active’ or 'paused’ Optional
Auto_pop Body Integer It is used to enable the auto-recharge service from the bag company
(the default value is '0’ - false)
Optional
Bag_amount_live Body Integer It is used to set up the bag associated with the advertiser,
(the default value is '0’ - false)
Optional



QUERY STRING Examples:

https://api.bucksense.com/2.0/advertiser/manager/?token=TOKEN

RAW:{
“name”: “test”,
“address_1”: “address”,
“address_2”: “”,
“city”: “city”,
“zipcode”: “00100”,
“phone”: “111111111”,
“country_code”: “IT”,
“state_code”: “”,
“account”: “[21]”}

GET (id) Advertiser_Manager

Example GET (id) 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,
        "bag_amount_live": 0,
        "account": [
                {
                    "id": 510,
                    "name": "Info",
                    "surname": "Demo",
                    "status": "active"
                }
            ],
        "campaign": [
                {
                    "id": "10778",
                    "name": "CampMyTest1",
                    "status": "paused",
                    "status_bidder": "paused"
                },
                {
                    "id": "4895",
                    "name": "CampMyTest2",
                    "status": "active",
                    "status_bidder": "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": "2.0.15"
   }
}

This API returns a list of advertisers by IDs.

HTTP Request

GET (id)https://api.bucksense.com/2.0/advertiser/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
Bag* Query Integer It is used to return the bag associated with the advertiser,
(the default value is '0’ - false
Optional
Accounts* Query Integer It is used to return the accounts associated with the advertiser,
(the default value is '0’ - false)
Optional
Campaigns* Query Integer It is used to return the campaigns associated with the advertiser,
(the default value is '0’ - false)
Optional

NOTE:

In the query to display some fields (those with the asterisk * in the table above) you can enter:

- &accounts=1 to see the accounts associated with the advertiser (see example 1)

- &bag=1 to see the bag associated with the advertiser (see example 2)

- &campaigns=1 to see the campaigns associated with the advertiser (see example 3)



QUERY STRING Examples:

Without Filterhttps://api.bucksense.com/2.0/advertiser/manager/1300?token=TOKEN

With Filter

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

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

  3. Below, an example of a search for advertiser when do you want to see the campaigns associated:
    https://api.bucksense.com/2.0/advertiser/manager/1300?campaigns=1&token=TOKEN

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

Edit (id) Advertiser_Manager

Example PUT (id) 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,
        "bag_amount_live": 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": "2.0.15"
   }
}

This API editing an advertisers by IDs.

HTTP Request

PUThttps://api.bucksense.com/2.0/advertiser/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 advertiser name Optional
Address_1 Body String It is the advertiser address Optional
Address_2 Body String It is the advertiser a another address Optional
City Body String It is the advertiser city Optional
Zipcode Body Integer Zip Code Optional
Phone Body String It is the advertiser phone Optional
Country_code Body String Code of the Country Optional
Country_name Body String Name of the Country Not Allowed
State_code Body String Code of the State Optional
State_name Body String Name of the State Not Allowed
Status Body String value - 'active’ or 'paused’ Optional
Auto_pop Body Integer It is used to enable the auto-recharge service from the bag company
(the default value is '0’ - false)
Optional
Bag_amount_live Body Integer It is used to set up the bag associated with the advertiser,
(the default value is '0’ - false)
Optional
Account Body Array It is used to set up the accounts related to the advertiser Not Allowed



QUERY STRING Examples:

In this example, we change all the advertiser info fields, and in particular the status:

https://console.bucksense.com/api/advertiser/manager/715?token=TOKEN

RAW:{
“name”: “edit test”,
“address_1”: “edit address”,
“address_2”: “”,
“city”: “edit city”,
“zipcode”: “00100”,
“phone”: “111111111”,
“country_code”: “IT”,
“status”: “active”,
“auto_topup”: 1}



ATTENTION:

The fields “Country_name” and “Status_name” aren’t editable → see the error 401/10014 on http://apidoc.bucksense.com/#errors

Advertiser Account

Model Schema:

{
  "id": "integer",
  "name": "string",
  "surname": "string",
  "status": "string"
}

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/2.0/advertiser/account/

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

GET (id)https://api.bucksense.com/2.0/advertiser/account/{id}

GET Advertiser_Account

Example GET Advertiser_Account:



{
    "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": "2.0.15"
   }
}

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

HTTP Request

GEThttps://api.bucksense.com/2.0/advertiser/account/

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:

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

Add Advertiser_Account

Example POST 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": 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": "2.0.15"
    }
}

This API enter a new account related an advertiser.

HTTP Request

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

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/2.0/advertiser/account/?token=TOKEN

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

GET (id) Advertiser_Account

Example GET Advertiser_Account:

{
    "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": "2.0.15"
   }
}

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

HTTP Request

GET (id)https://api.bucksense.com/2.0/advertiser/account/{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/advertiser/account/510?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": "2.0.15"
    }
}

This API enter a new account related an advertiser.

HTTP Request

POSThttps://api.bucksense.com/2.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/2.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 type of 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/2.0/campaign/manager/

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

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

PUThttps://api.bucksense.com/2.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/2.0/campaign/manager/ID/?token=TOKEN

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

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

See the examples in section Campaign - Start&Stop

GET Campaign_Manager

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,
         "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": "2.0.15"
   }
}

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/2.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



QUERY STRING Examples:

Without Filter → Below, the call which returns all campaigns (default: sorted by ID) related to a company:
https://api.bucksense.com/2.0/campaign/manager/?token=TOKEN

With Filter:

https://api.bucksense.com/2.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 },
{ “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/2.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/2.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


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

Add 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": "2.0.15"
   }
}

This API allows the addition of a new campaign.

HTTP Request

POSThttps://api.bucksense.com/2.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



QUERY STRING Examples:

https://api.bucksense.com/2.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 } }


NOTE:

GET (id) Campaign_Manager

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": "2.0.15"
   }
}

This API returns a list of campaigns by IDs.

HTTP Request

GET (id)https://api.bucksense.com/2.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
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



QUERY STRING Examples:

https://api.bucksense.com/2.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 } ] }


https://api.bucksense.com/2.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/2.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.



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 Creative (or Native) info, creative=1 or native=1 should be entered in the string
Example: https://api.bucksense.com/2.0/campaign/manager/12451/?creative=1&token=TOKEN


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

See also the Campaign Targeting Section.

Edit Campaign_Manager

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": "2.0.15"
   }
}

This API allows the editing of a campaign by ID.

HTTP Request

PUThttps://api.bucksense.com/2.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



QUERY STRING Examples:

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

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


https://api.bucksense.com/2.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.

HTTP Request

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

PUThttps://api.bucksense.com/2.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": "2.0.15"
   }
}

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

HTTP Request

GEThttps://api.bucksense.com/2.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
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/2.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,
“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": "2.0.15"
   }
}

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

HTTP Request

PUThttps://api.bucksense.com/2.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
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/2.0/campaign/targeting/ID/?token=TOKEN

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


https://api.bucksense.com/2.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/2.0/campaign/list-manager/

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

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

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



GET List_Manager

Example GET Lists:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 66,
         "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/2.0/f/111/62703ac38e7912w.csv",
         "status": "active"
      },
      {
         "id": 67,
         "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/2.0/f/222/s5703ca1286bb0m.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": "2.0.15"
   }
}

This API returns all the lists related to an advertiser.

HTTP Request

GEThttps://api.bucksense.com/2.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/2.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/2.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/2.0/f/839/n584ff4074c0cb2.csv”,
“status”: “active” } ] }



With Filter:

https://api.bucksense.com/2.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/2.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/2.0/campaign/list-manager/?&limit=2&search=23&token=TOKEN


https://api.bucksense.com/2.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/2.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": "2.0.15"
   }
}

This API allows the addition of a new list.

HTTP Request

POSThttps://api.bucksense.com/2.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/2.0/campaign/manager/?token=TOKEN

RAW:{

“name”: “test”,
“list_type”: device_id_ifa,
“advertiser_id”: 945,
“fileurl”: “https://api.bucksense.com/2.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/2.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": "2.0.15"
   }
}


This API returns a list by IDs.

HTTP Request

GET (id)https://api.bucksense.com/2.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/2.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/2.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/2.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": "2.0.15"
   }
}

This API allows the editing of a list by ID.

HTTP Request

PUThttps://api.bucksense.com/2.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/2.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: json { "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: Exchange, Placement ID, OS, Device Maker and Device Model.

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

Microbidding

HTTP Request

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

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

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

PUThttps://api.bucksense.com/2.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": "2.0.15"
   }
}

This API returns a list of microbidding.

HTTP Request

GEThttps://api.bucksense.com/2.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/2.0/campaign/micro_bidding?token=TOKEN

With Filter:

https://api.bucksense.com/2.0/campaign/micro_bidding?token=TOKEN&search=9130&search_field=campaign_id

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 2782,
“campaign_id”: 9130,
“campaign_name”: “TestApi for MBidding”,
“exchange_id”: 24,
“exchange_name”: “Adbuddiz”,
“placement”: “test”,
“os_id”: 2,
“os_name”: “iOS”,
“device_make_id”: 3,
“device_make_name”: “Apple”,
“device_model_id”: 289,
“device_model_name”: “Apple iPad”,
“cpm”: 0.4 } ] }

https://api.bucksense.com/2.0/campaign/micro_bidding?token=TOKEN&search=24&search_field=exchange_id

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 2782,
“campaign_id”: 9130,
“campaign_name”: “TestApi for MBidding”,
“exchange_id”: 24,
“exchange_name”: “Adbuddiz”,
“placement”: “test”,
“os_id”: 2,
“os_name”: “iOS”,
“device_make_id”: 3,
“device_make_name”: “Apple”,
“device_model_id”: 289,
“device_model_name”: “Apple iPad”,
“cpm”: 0.4 }, { “id”: 2589,
“campaign_id”: 9130,
“campaign_name”: “TestApi for MBidding 2”,
“exchange_id”: 24,
“exchange_name”: “Adbuddiz”,
“placement”: “test 2”,
“os_id”: 2,
“os_name”: “iOS”,
“device_make_id”: 3,
“device_make_name”: “Apple”,
“device_model_id”: 53126,
“device_model_name”: “Apple iPhone 7”,
“cpm”: 0.67 }
] }

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": 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": "2.0.15"
   }
}

This API allows the addition of a new microbidding.

HTTP Request

POSThttps://api.bucksense.com/2.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/2.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": "2.0.15"
   }
}

This API returns a list of microbidding by IDs.

HTTP Request

GET (id)https://api.bucksense.com/2.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:

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

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 186,
“campaign_id”: 9130,
“campaign_name”: “doc test”,
“exchange_id”: 1,
“exchange_name”: “Smatoo”,
“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.4 } ] }

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": "2.0.15"
   }
}

This API allows the editing of a new microbidding.

HTTP Request

PUThttps://api.bucksense.com/2.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/2.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",
         "url": "string",
         "type": "string",
         "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",
         "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: “web”, “mobile web”, “mobile app” and “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/2.0/offer/manager/

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

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

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

GET Offer

Example GET OFFER:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 1111,
         "name": "test offer",
         "url": "http://bucksense.com",
         "type": "mobile_web",
         "protocol": "http",
         "advertiser_id": 777,
         "advertiser_company": "Test Adv",
         "expire_time": 60,
         "public": 1,
         "event_id": 221,
         "event_uid": "YEAortAA",
         "event_name": "test_123",
         "conversion_type": "CPA",
         "currency": "USD",
         "revenue": 0,
         "targeting_offer_id": 1010,
         "status_smartlink": "enable",
         "status": "active"
      }
   ],
   "_pagination": {
      "totalCount": 62,
      "offset": 0,
      "limit": 25
   },
   "_metadata": {
      "reads": 3,
      "read_limit": 1000,
      "read_limit_seconds": 60,
      "writes": 0,
      "write_limit": 100,
      "write_limit_seconds": 60,
      "requests": 38,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.19297409,
      "start_microtime": 1.48429773E9,
      "version": "2.0.15"
   }
}

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/2.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
Statistic Query Integer It is used to return the statistic of the offer.
The default value is '0’ - false
Optional
Category Query Integer It is used to return the categories associated with 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 → Below, the call which returns all offers (default: sorted by ID) related to a company:
https://api.bucksense.com/2.0/offer/manager/?token=TOKEN

With Filter:

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

Response:

{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 2890,
“name”: “3003OFFerTest”,
“url”: “offer.com”,
“type”: “mobile_app”,
“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,
“status_smartlink”: “enable”,
“status”: “active” },
{ “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/2.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/2.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 campaigns):

{ “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}] },… ] }



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



NOTE:

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

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

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

Add Offer

Example POST OFFER:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 3333,
         "name": "Test Offer",
         "url": "https://play.google.com/store/apps/details?id=test",
         "type": "mobile_app",
         "protocol": "server",
         "advertiser_id": 111,
         "advertiser_company": "test QA",
         "expire_time": 60,
         "public": 1,
         "event_id": 0,
         "event_uid": "",
         "event_name": "",
         "conversion_type": "CPA",
         "currency": "USD",
         "revenue": 0,
         "targeting_offer_id": 1111,
         "status_smartlink": "enable",
         "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": 18,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.07121396,
      "start_microtime": 1.48249869E9,
      "version": "2.0.15"
   }
}

This API allows the addition of a new offer.

HTTP Request

POSThttps://api.bucksense.com/2.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 campaign name 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 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’ Optional
Type Body String 'web’ or 'mobile_web’ or 'mobile_app’ or “web_mobile_web” Optional
Status Body String Value = 'active’ or 'paused’ or 'pending’ 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 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



QUERY STRING Examples:

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

RAW:{ “name”: “test doc”,
“url”: “http://bucksense.com/{device_model_id}”,
“protocol”: “http_img”,
“advertiser_id”: 888,
“type”: “web_mobile_web”,
“conversion_type”: “CPA”,
“currency”: “USD”,
“revenue”: 1.123456,
“category”: [2]}

GET (id) Offer

Example GET (id) OFFER:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 3333,
         "name": "Test Offer",
         "url": "https://play.google.com/store/apps/details?id=test",
         "type": "mobile_app",
         "protocol": "server",
         "advertiser_id": 111,
         "advertiser_company": "test QA",
         "expire_time": 60,
         "public": 1,
         "event_id": 0,
         "event_uid": "",
         "event_name": "",
         "conversion_type": "CPA",
         "currency": "USD",
         "revenue": 0,
         "targeting_offer_id": 1111,
         "status_smartlink": "enable",
         "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": 18,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.07121396,
      "start_microtime": 1.48249869E9,
      "version": "2.0.15"
   }
}

This API returns the events related with the single offer.

HTTP Request

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

Parameters

Parameter name Data Type Description Required
Token Query String Token generated through the API /login
Id Path Integer It constrains the number of rows in a result set (the default is 10)
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/2.0/offer/manager/16644/?token=TOKEN

Response:
{ “httpstatus”: “OK”, “httpcode”: 200, “error”: 0, “data”: [
{ “id”: 16644,
“name”: “doc test2706”,
“url”: “http://bucksense.com/{device_model_id}”,
“type”: “web_mobile_web”,
“protocol”: “http_img”,
“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”: 1.123456,
“targeting_offer_id”: 15236,
“status_smartlink”: “enable”,
“status”: “active”,
“category”: [ { “id”: 2, “name”: “Flycell - AT”, “category_offer_id”: 1195 }
]
} ]…}



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

https://api.bucksense.com/2.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 adtag when do you want to see only some fields(filter=name,url,type,status):

https://api.bucksense.com/2.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/2.0/campaign/manager/16644/?statistic=1&token=TOKEN

→ For Mobile info, mobile=1 should be entered in the string
Example: https://api.bucksense.com/2.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/2.0/campaign/manager/16644/?targeting=1&token=TOKEN

Edit Offer

Example PUT (id) OFFER:

{
   "httpstatus": "OK",
   "httpcode": 200,
   "error": 0,
   "data": [
      {
         "id": 3333,
         "name": "Test Offer",
         "url": "https://play.google.com/store/apps/details?id=test",
         "type": "mobile_app",
         "protocol": "server",
         "advertiser_id": 111,
         "advertiser_company": "test QA",
         "expire_time": 60,
         "public": 1,
         "event_id": 0,
         "event_uid": "",
         "event_name": "",
         "conversion_type": "CPA",
         "currency": "USD",
         "revenue": 0,
         "targeting_offer_id": 1111,
         "status_smartlink": "enable",
         "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": 18,
      "request_limit": 5000,
      "request_limit_seconds": 60,
      "time": 0.07121396,
      "start_microtime": 1.48249869E9,
      "version": "2.0.15"
   }
}

This API editing a single offer (by Id).

HTTP Request

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

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
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 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’ Optional
Type Body String 'web’ or 'mobile_web’ or 'mobile_app’ or “web_mobile_web” Not Editable
Status Body String Value = 'active’ or 'paused’ or 'pending’ 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 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/2.0/offer/targeting/{id}/

PUThttps://api.bucksense.com/2.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": "2.0.15"
   }
}

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

HTTP Request

GEThttps://api.bucksense.com/2.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/2.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” } ] } ]… }

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"
            }
         ],
         "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": "2.0.15"
   }
}

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

HTTP Request

PUThttps://api.bucksense.com/2.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



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



QUERY STRING Examples:

https://api.bucksense.com/2.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”}],
“smartlink_category”: [ {“id”: 1,“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/2.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": "2.0.15"
   }
}

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": "2.0.15"
   }
}

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": "2.0.15"
   }
}

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/2.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/2.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/2.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/2.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/2.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:

qa@bucksense.com