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.
Verb | Definition |
---|---|
GET | This is used to retrieve a single entity or list of entities. If retrieving a single entity, specify the entity ID in the URL. |
HEAD | This 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. |
POST | To create a brand new entity, use this along with a JSON entity definition. |
PUT | Unlike 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) |
PATCH | Unlike 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.
Code | Definition |
---|---|
HTTP 200 | Indicates that the request was successful and there might be a response in the HTTP body. |
HTTP 201 | This indicates the successful creation of a new entity. |
HTTP 400 | Use this with a JSON entity definition to create a new entity. |
HTTP 401 | This is the result of a malformed request (like JSON). |
HTTP 404 | Indicates that the requested entity doesn’t exist. |
HTTP 501 | Indicates 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 Response | Definition |
---|---|
success | True or false to indicate if the request was successful or if an issue occurred. |
meta | Contains 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) |
errors | A 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) |
warnings | A 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) |
messages | A list of messages that occurred while processing the request. These are for informational purposes only and don’t indicate that processing failed. (Not implemented) |
data | This 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": [
]
}