Support Home > Analytics, Reports & API > Introduction to the Premium Publisher API

Introduction to the Premium Publisher API

The Kochava Administration API is a restful based web service that provides a globally accepted format used to access data on the web from any type of application. All server responses from the Kochava Premium Publisher API use HTTP status codes and messages to indicate the state of the request. In some circumstances, a JSON response will be returned in the HTTP body.

 

BEST PRACTICES: Kochava recommends using a browser extension called Postman. This is a free Chrome extension that allows you to specify the host/URL, URL Params, headers and the method of the request (GET, POST, PUT, PATCH, DELETE, etc.). Postman makes testing extremely simple and fast. All examples in this documentation are displayed as if Postman were being used.

NOTE: If you are looking for the JSON reporting API, refer to our API Support Documentation.


HTTP Verbs

The following HTTP verbs are used in the Kochava Administration APIs or at the least on the roadmap to be implemented.

 

VerbDefinition
GETThis is used to retrieve a single entity or list of entities. If retrieving a single entity, specify the entity ID in the URL.
HEADThis is used to check if an entity exists without receiving a body in the response. Use this along with the entity ID for which to check.
POSTTo create a brand new entity, use this along with a JSON entity definition.
PUTUnlike POST, this accepts a JSON entity definition, and it will override the existing entity. The entity is identified by the entity ID in the URL. (Not implemented yet)
PATCHUnlike PUT, this will update only the given fields for the given entity. Similar to PUT, the entity ID is required to update in the URL.

HTTP Status Codes

Below are the HTTP status codes that the Kochava Administration API will return as a result of a request.

 

CodeDefinition
HTTP 200Indicates that the request was successful and there might be a response in the HTTP body.
HTTP 201This indicates the successful creation of a new entity.
HTTP 400Use this with a JSON entity definition to create a new entity.
HTTP 401This is the result of a malformed request (like JSON).
HTTP 404Indicates that the requested entity doesn’t exist.
HTTP 501Indicates that the requested entity doesn’t exist.

Authentication

Authentication requires you to send an HTTP header named “Authentication-Key” with your API access key that can be retrieved from your account management console within Kochava. At the time, the Authentication Key is associated with your entire Kochava account, and it’s not possible to associate it to a single user or multiple users. This is still under heavy development.


HTTP Body

Below are the different data types that the API will return upon your request. The format below is standard across all Kochava Administration APIs.

NOTE: Any items tagged with “Not implemented” below means that Kochava is not currently using the properties, but they do appear in the API response.

 

API ResponseDefinition
successTrue or false to indicate if the request was successful or if an issue occurred.
metaContains extra information about the request or page of entities. Some types of data that are on the roadmap to be stored in here include the total amount of entities available, current page, items per page, total pages, etc. (Not implemented)
errorsA list of errors that occurred while processing the request. These mean that one or more errors occurred and that the system failed to successfully fulfill the request. (Not implemented)
warningsA list of warnings that occurred while processing the request. These generally mean that something wrong occurred, but processing was still successful improvements should be made to avoid reoccurring warnings. (Not implemented)
messagesA list of messages that occurred while processing the request. These are for informational purposes only and don’t indicate that processing failed. (Not implemented)
dataThis will always be a list of entities. If the request is a single entity, expect data to be a list with a single entity.

 

JSON:

{
	"success": true,
	"meta": null,
	"errors": [

	],
	"warnings": [

	],
	"messages": [

	],
	"data": [

	]
}

 
 

Last Modified: Oct 18, 2024 at 9:52 am