Miaozhen API Introduction

Miaozhen's Admonitor has been upgraded from Version 4.7 to Version 5.0 .It's able to process campaigns in PC and Mobile end in one single system which achieved cross platform data processing. Along with the upgrade of AdMonitor, its API has also upgraded. The details are as following: Note: The new API is compatible with the API Request using the old API.

Upgraded API Upgrade Content Description
campaigns/create added a new parameter platform The default value of platform is pc. When assigned pc, the campaign would be created in AdMonitor 4.7 and support the calculation of campaigns in PC end only;When assigned pm, that is PC and Mobile, the campaign would be created in AdMonitor 5.0, and support the calculation of campaigns in both pc and mobile platform.
added a new parameter frequency_limit The value of frequency_limit determines the maximum reach frequency of a certain campaign. The default value is 20, meaning calculate the Reach UV 1+ ~ 20+
added a new parameter agency_id When creating campaigns, use this parameter to indicate which agency it is.
campaigns/update added a new parameter agency_id help to update campaign's agency
campaigns/create_spot_with_plan it's a new api supports the creation of spot and spotplan at the same time
panels/list added a new parameter platform use this parameter to get the panel for pc or pm platform
agencies/show Available use this api to query a single agency
agencies/list Available use this api to query the list of all agencies
reports/basic/show added a new parameter platform Campaigns in the Admonitor 5.0 has three platform's data:PM(PC+Mobile)、PC、Mobile, set platform to one of this would show the corresponding platform's data.
reports/realtime/show
reports/reach/show

API Protocols

API Request

You access a Miaozhen API by sending a HTTP request to the API’s endpoint. Unless otherwise stated, the URL is HTTPS protocol starting with Miaozhen API domain: https://api.cn.miaozhen.com

APIs to retrieve data from require a GET request with parameters in the query string of the URL. APIs that create, update, or delete data require a POST with parameters in the HTTP body. The parameters should be application/x-www-form-urlencoded, charset UTF-8.

To access non-public data, you MUST use the parameter access_token granted from Miaozhen OAuth2 Service. See Miaozhen API Authentication.

There are some frequently-used parameters listed here.

API Response

The successful HTTP response should be an HTTP 200 (OK) status code with a plain text body presenting a JSON object, character set UTF-8.

In case of client-side error or server-side error, the response will be an HTTP 400 (Bad Request) or 500 (Internal Server Error) status code respectively (200 if suppress_response_codes used). The response body will be a JSON error object, including the parameter error briefing the error, optionally error_description and error_code in some APIs.


Miaozhen APIs

CMS APIs

CMS is the product to manage Miaozhen’s meta ad data such as campaigns, panels and regions. For example, providing campaign id, you can query campaign name and campaign spot list from CMS APIs.

AdMonitor APIs

AdMonitor is the product to track ad campaigns. For example, providing campaign id, you can query campaign tracking tags and reports from AdMonitor APIs.