Update to SDK 10 now for iOS 10 support and other critical technical updates. x

1、Integration Instructions

1.1 Requirements

Account approved

Developer id and key, please contact our BD manager to get them

1.2 Interface Style

restfull api

Use http status code to indicate the status of request resources

1.3 Interface limit

Signature is used to verify permission

After verification, the same resource is limited to request 100 times a day

1.4 Interface Verification

After verification is approved, developers need to pass 3 parameters in their requests

Parameter

Description

signature

Encrypted signature, combining developer's key parameters with timestamp and nonce in requests

timestamp

Timestamp

nonce

Random number

Encryption/examination process:

1.Sort token, timestamp and nonce in alphabetical order

2.Put the three parameter strings in one string to encrypt with sha1

3.Compare the encrypted string with signature, identify the request as legitimate

Check the PHP sample code in signature:

private function checkSignature()
{
  $signature = $_GET["signature"];
  $timestamp = $_GET["timestamp"];
  $nonce = $_GET["nonce"];  

  $token = TOKEN;
  $tmpArr = array($token, $timestamp, $nonce);
  sort($tmpArr, SORT_STRING);
  $tmpStr = implode( $tmpArr );
  $tmpStr = sha1( $tmpStr );

  if ($tmpStr == $signature) {
    return true;
  } else {
    return false;
  }
}

1.5 Data Format of Response

json

Field instruction

error error message, prompt when quest is incorrect

data data related information

1.6 http status code and explanations

http status code

explanation

200

Success

400

Request parameter error, please check parameters

401

User verification error, please check verification information

403

Access denied, possibly because of request limit

2、Applist Interface

2.1 Description

Get developer's applist

2.2 Interface Information

url

method

Description

developer/{devId}/app/index

GET

devId 为开发者id

2.3 Request information

Field

Data type

Description

{devId}

string

developer id located in url

2.4 Response

Sample:

{
  error: "",
  data: [
    {
      cornid: "testtest10241024",
      appname: "hello",
      os: "ios",
      currency: "CNY"
    },
    ...
  ]
}

Data field instruction:

Name

Data type

Instruction

cornid

string

App id

appname

string

App name

os

string

Operating system, android or ios

currency

结算货币类型

e.g. CNY

3、Application Statistics Interface

3.1 Description

Collect statistics of an application

3.2 Interface Information

url

method

Instruction

developer/{devId}/app/{cornId}/stat

GET

devId is developer id, cornId is app id

3.3 Request Information

Field

Data type

Instruction

{devId}

string

Developer id located in url

{cornId}

string

App id loacated in url

start_date

date

Required parameter indicating start date, format as 2010-01-01

end_date

date

Required parameter indicating end date, format as 2010-01-01

About date:

1.Daily data is available after 16:30 on the next day

2.Time period is limited to 30 days

3.Start date must be within the latest 6 months

3.4 Response

Sample:

{
  error: "",
  data: [
    {
      date: "2016-08-02",
      ad_type: "interstitial",
      request: 21896,
      exposure: 19784,
      click: 5522,
      fill_rate: "90.35%",
      click_rate: "27.91%",
      ecpm: "16.45",
      income: "162.71"
    }
  ]
}

Data field instructio:

Name

Data type

Instruction

date

date

date

ad_type

enum

Ad type banner,interstitial,video,splash,native
request

int

Number of requests

exposure

int

Number of impressions

click

int

Number of clicks

fill_rate

string

Fill rate, rounded to the nearest hundredth, theoretical maximum value is 100.

click_rate

string

Click rate, rounded to the nearest hundredth, theoretical maximum value is 100.

ecpm

string

ecpm, if it shows '-': processing incomplete because of internet delay etc. String in float type in all other cases.

income

string

Income if it shows '-': processing incomplete because of internet delay etc. String in float type in all other cases. Type of currency is consistent with user's set up.