Partner Reporting API

Introduction πŸ”—

This API is for programmatic partners to retrieve daily aggregate impressions & revenue (publishers) or cost (advertisers) numbers for discrepancy monitoring. Please note the API Rules.

Authentication πŸ”—

Each request must contain the following headers:

Header Value
Content-Type application/json
Authorization {{PARTNER AUTH TOKEN}}

Please reach out to our Integrations team for your auth token.

Requests πŸ”—

URL: https://chili.chartboost.com/partner

Method: POST Each request body supports the following JSON fields:

Name Required Type Description
timezone true string Timezone of the returned data. Supported values are β€˜utc’ or β€˜pst’.
date_min false string Format: YYYY-MM-DD; default: previous calendar date.
date_max false string Format: YYYY-MM-DD; default: previous calendar date.
metrics true array of strings Data fields to return aggregate data for. Supported values include impressions, revenue (publishers only), cost (advertisers only), and ecpm.
group_by true array of strings Dimensions to aggregate data by. Supported values include dt, country, creative_type_name, and bundle (publishers only).

Dimensions πŸ”—

The following dimensions are available for use in the group_by parameter:

  • dt
  • country
  • creative_type_name
  • bundle (publishers only)

Metrics πŸ”—

The following metrics are available:

  • impressions
  • revenue (publishers only; earnings)
  • cost (advertisers only; spend)
  • ecpm (revenue / impressions * 1000) or (cost / impressions * 1000)

API Rules πŸ”—

  • Data is only updated once per hour.
  • Rate limited to 100 requests per rolling 60-minute window.
  • Data is available for 90 days.

Questions? Email us at integrations-team@chartboost.com.

Examples πŸ”—

  • <?php
    
    $CB_PARTNER_API_ENDPOINT = "https://chili.chartboost.com/partner";
    $CB_PARTNER_API_AUTH_TOKEN = "{{PARTNER AUTH TOKEN}}";
    
    $date_min = "2019-08-01"
    $date_max = "2019-08-07"
    $group_by = ["dt", "country", "creative_type_name"]
    $metrics = ["impressions", "ecpm"]
    $timezone = "utc"
    
    $request = new HttpRequest();
    $request->setUrl($CB_PARTNER_API_ENDPOINT);
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Cache-Control' => 'no-cache',
      'Content-Type' => 'application/json',
      'Authorization' => $CB_PARTNER_API_AUTH_TOKEN
    ));
    
    $request->setBody('{
      "timezone": $timezone,
      "group_by": $group_by,
      "metrics": $metrics,
      "date_min": $date_min,
      "date_max": $date_max
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $err) {
      echo $err;
    }
    
    ?>
    
  • import requests
    import json
    
    CB_PARTNER_API_URL = "https://chili.chartboost.com/partner"
    CB_PARTNER_API_AUTH_TOKEN = "{{PARTNER AUTH TOKEN}}"
    
    timezone = "utc"
    date_min = "2019-09-16"
    date_max = "2019-09-16"
    group_by = ["dt", "country", "creative_type_name"]
    metrics = ["impressions", "ecpm"]
    body = {
        "timezone": timezone, 
        "group_by": group_by, 
        "metrics": metrics, 
        "date_min": date_min, 
        "date_max": date_max
        }
    
    headers = {
        'Authorization': CB_PARTNER_API_AUTH_TOKEN,
        'Content-Type': "application/json",
        'Cache-Control': "no-cache",
        }
    
    response = requests.request("POST", CB_PARTNER_API_URL, data=json.dumps(body), headers=headers)
    
    print(response.text)
    
  • // NodeJS
    var request = require("request");
    
    const CB_PARTNER_API_URL = "https://chili.chartboost.com/partner";
    const CB_PARTNER_API_AUTH_TOKEN = "{{PARTNER AUTH TOKEN}}";
    var timezone = "utc";
    var group_by = ["dt", "country", "creative_type_name"];
    var metrics = ["impressions", "ecpm"];
    var date_min = "2019-08-01";
    var date_max = "2019-08-07";
    var body = { 
         timezone: timezone,
         group_by: group_by,
         metrics: metrics,
         date_min: date_min,
         date_max: date_max
        };
    
    var options = { 
      method: 'POST',
      url: CB_PARTNER_API_URL,
      headers: 
       { 'Cache-Control': 'no-cache',
         'Content-Type': 'application/json',
         'Authorization': CB_PARTNER_API_AUTH_TOKEN },
      body: body,
      json: true
    };
    
    request(options, function (error, response, body) {
      if (error) throw new Error(error);
    
      console.log(body);
    });