POST https://xmp-open.mobvista.com/v2/media/material_report/list
Common request parameters: please refer to Open API Protocol
Parameter | Type | Required | Instruction |
---|---|---|---|
start_date | string | Y | YYYY-MM-DD |
end_date | string | Y | YYYY-MM-DD, the longest span does not exceed 30 days |
dimension | []string | N | Fixed: material_name(creative name) md5_file_id(creative md5) Can be multiple selected additionally: date(date) module(media channel) account_id(ad account id) account_name(ad account name) campaign_id(campaign id) campaign_name(campaign name) adset_id(ad set id) adset_name(ad set name) ad_id(ad id) ad_name(ad name) product_id(product id) Can be multiple selected additionally: geo(location) |
metrics | []string | Y | The metrics you need to pull from the Query Available Metrics API. |
md5_file_id | []string | N | material md5, up to 1000 files |
module | string | N | view Media Enumeration Value |
account_id | []string | N | ad account id |
geo | []string | N | location, only valid when queried by location dimension eg. CN |
product_id | []int | N | product id |
third_party_timezone | string | N | The time zone of the third-party data metrics, see Time Zone Enumeration Values. Note: This field must be passed when pulling third-party data metrics via the API when third-party data metrics time zone switching has been enabled in the XMP backend. |
cost_currency | string | Y | currency, options: cny、usd、eur |
page | int | N | current page number, default is 1. If the returned data.list is not empty, please add the page number + 1 to get the next page content until data.list is empty. |
page_size | int | N | page size, the default is 200, 1~1000 is available |
let dimension=["md5_file_id","material_name"]
request = {
url:uri,
method:'POST',
header:{'Content-Type':'application/json'},
body:{
mode:'raw',
raw:JSON.stringify({
client_id:clientId,
timestamp:timestamp,
sign:sign,
start_date:startDate,
end_date:endDate,
dimension:dimension,
product_id:[],
module:"facebook",
geo:["US","KR"],
metrics:["impression","ecpm","currency_cost","active_register_rate","video_play_p100_rate"],
page:page,
page_size:page_size,
cost_currency:currency,
third_party_timezone:"+8"
}),
options: {
raw: {
language: 'json'
}
}
}
}
Parameter | Type | Instruction |
---|---|---|
list | []object | list of returned data |
page | object | page |
page.page | int | current page |
page.page_size | int | page size |
(1)dimensions / attributes in the list
Parameter | Type | Instruction |
---|---|---|
material_name | string | material name, if the md5 of a clip corresponds to more than one clip name, the clip with the latest creation time will be returned |
md5_file_id | string | material md5 |
date | string | date |
module | string | channel |
geo | string | geo |
account_id | string | account id |
account_name | string | account name |
campaign_id | string | campaign id |
campaign_name | string | campaign name |
adset_id | string | adset id |
adset_name | string | adset name |
ad_id | string | ad id |
ad_name | string | ad name |
product_id | string | product id |
{
"code": 0,
"msg": "success",
"data": {
"list": [
{
"active_register_rate": 0,
"currency_cost": 2568.17,
"ecpm": 8.91,
"impression": 288202,
"video_play_p100_rate": 0,
"xmp_material_id": "14723131"
}
],
"page": {
"page": 1,
"page_size": 1,
"next_page": 1
}
}
}