Support Home > Analytics, Reports & API > Premium Publisher API Campaign Management

Premium Publisher API Campaign Management

The following document defines and provides samples for Premium Publisher API calls for the management of campaigns, segments and trackers within Kochava.


Get All Campaigns

This API provides the ability to retrieve the entire list of campaigns for the numerical App ID provided in the URL (1234 in this case).

 

Sample Request:

 

Sample Response:


Get Single Campaign

This API provides the ability to retrieve a single campaign for the numerical Campaign ID provided in the URL (46548963 in this case).

 

Sample Request:

 

Sample Response:


Verify Campaign Exists

This API is used to check if a campaign exists by providing the API the numerical Campaign ID (46548963 in this case) to look up.

 

Sample Request:

 

Sample Response:


Create a Campaign

This API is used to create a new campaign by providing it a JSON definition of the campaign.

 

NOTE: This API will NOT auto-detect if the campaign already exists. We currently do not surface the ability to change the source of the campaign or when it was created.

 

NOTE: The APP ID that the campaign is associated to is determined by the app_id JSON property.

 

Sample Request:

 

Sample Response:


Updating Existing Campaign

This API is used to update an existing campaign by providing it a JSON definition of the campaign with the modifications. If the campaign was updated HTTP 200 will be returned otherwise another HTTP code and message indicating what went wrong.

 

NOTE: We currently do not surface the ability to change the app_id, source or date_created of the campaign.

 

Sample Request:

 

Sample Response:


Delete Campaign

This API is used to delete an existing campaign by providing it the numerical campaign id. If the campaign was deleted a HTTP 200 will be returned otherwise another HTTP code and message indicating what went wrong.

 

NOTE: We currently do not surface the ability to delete a campaign if isn’t empty (has segments assigned to it).

 

Sample Request:

 

Sample Response:


Get All Segments

NOTE: During the Kochava UI update, the term “tier” was updated to “segment”. For the purposes of this document the term “segment” will be used, however within the API code the term “tier” should be used.

 

This API provides the ability to retrieve the entire list of segments for the numerical Campaign ID provided in the URL (55931 in this case).

 

Sample Request:

 

Sample Response:


Get Single Segment

NOTE: During the Kochava UI update, the term “tier” was updated to “segment”. For the purposes of this document the term “segment” will be used, however within the API code the term “tier” should be used.

 

This API provides the ability to retrieve a single segment for the numerical Segment ID provided in the URL (55935 in this case).

 

Sample Request:

 

Sample Response:


Verify Segment Exists

NOTE: During the Kochava UI update, the term “tier” was updated to “segment”. For the purposes of this document the term “segment” will be used, however within the API code the term “tier” should be used.

 

This API is used to check if a segment exists by providing the API the numerical Segment ID (55935 in this case) to look up.

 

Sample Request:

 

Sample Response:


Create Segment

NOTE: During the Kochava UI update, the term “tier” was updated to “segment”. For the purposes of this document the term “segment” will be used, however within the API code the term “tier” should be used.

 

This API is used to create a new segment by providing it a JSON definition of the segment. Please note

 

NOTE: This API will NOT auto-detect if the segment already exists.

 

NOTE: Kochava currently do not surface the ability to change the source of the segment.

 

Sample Request:

 

Sample Response:


Update Existing Segment

NOTE: During the Kochava UI update, the term “tier” was updated to “segment”. For the purposes of this document the term “segment” will be used, however within the API code the term “tier” should be used.

 

This API is used to update an existing segment by providing it a JSON definition of the segment with the modifications. If the segment was updated HTTP 200 will be returned otherwise another HTTP code and message indicating what went wrong.

 

NOTE: Kochava currently do not surface the ability to change the source of the segment.

 

Sample Request:

 

Sample Response:


Delete Segment

NOTE: During the Kochava UI update, the term “tier” was updated to “segment”. For the purposes of this document the term “segment” will be used, however within the API code the term “tier” should be used.

 

This API is used to delete an existing segment by providing it the numerical segment id. If the segment was deleted a HTTP 200 will be returned otherwise another HTTP code and message indicating what went wrong.

 

NOTE: Kochava currently do not surface the ability to delete a segment if it is not empty (has trackers assigned to it).

 

Sample Request:

 

Sample Response:


Get All Trackers

This API provides the ability to retrieve the entire list of trackers for the numerical Segment ID provided in the URL (55935 in this case).

 

Sample Request:

 

Sample Response:


Get Single Tracker

This API provides the ability to retrieve a single tracker for the numerical Tracker ID provided in the URL (158520 in this case).

 

Sample Request:

 

Sample Response:


Verify Tracker Exists

This API is used to check if a tracker exists by providing the API the numerical Tracker ID (158520 in this case) to look up.

 

Sample Request:

 

Sample Response:


Get Available Networks

Before you can create a tracker you need to get the numerical ID of the network you would like to use and more importantly you need to find out which networks your app supports. This API solves this issue by returning all available networks that can be used by the numerical App ID provided in the URL (1234 in this case).

 

Sample Request:

 

Sample Response:


Create Tracker

NOTE: During the Kochava UI update, the term “tier” was updated to “segment”. For the purposes of this document the term “segment” will be used, however within the API code the term “tier” should be used.

 

NOTE: If you don’t specify a Campaign ID then the API will use a default campaign for your app (determined by the first campaign ever created for your app). If you don’t have a default campaign a default one will be provisioned for your app. If you don’t specify a Segment ID then we get the default segment inside of your default campaign (first segment created) otherwise we create one. The tracker is then associated to the default campaign and segment .

 

At this time Kochava does not support the ability to move the tracker between segments and campaigns. This means the first time the tracker is created it is stuck in the segment and campaign that was assigned to it.

 

Tracker Object Example Value Description
tier_id 55935 ID of the segment.
campaign_id 46548963 ID of the campaign.
name Web API – Test 1 Name of the tracker.
app_id 1234 The numerical app ID that owns this tracker.
type type_url_forward “type_url_forward” or “type_pixel_tracking”. The Administration API only supports “type_url_forward” at this time.
destination_url http://facebook.com The destination that the user is redirected to.
network_id 450 Numerical ID of the network that was selected.
network_price cpc CPC (cost per click) or CPI(cost per install).
click_url_custom_params Key: custom_url_param

Value: v1

An array of custom URL parameters in objects. Each object contains a “key” property that will be used as the URL parameter name and a “value” property that will be used as the value for that URL property.
perm_publisher_all_view true
false
Indicates whether the selected network for this tracker can see your app and this tracker if they are a publisher and have an account with Kochava.

 

Sample Request:

 

Sample Response:

 
 

Last Modified: Jun 9, 2017 at 1:48 pm