获取产品/服务的状态
注意
ProductStatuses 资源仅对封闭 Beta 版参与者可用。 有关参与封闭 beta 或开放 beta 计划的信息,请联系你的客户经理。
在 beta 版期间,所有 Store 编程元素和文档都可能会更改。
若要获取商店中状态设置为“已批准”或“警告”的产品/服务列表,请使用 获取产品状态模板。
curl -H "AuthenticationToken: <access token goes here>" -H "DeveloperToken: <developer token goes here>" https://content.api.ads.microsoft.com/v9.1/bmc/stores/12345/productstatuses
响应正文是 ProductStatuses 对象。 如果应用商店不包含处于“已批准”或“警告”状态的产品,则 resources
字段包含一个空数组。
{
"resources": []
}
下面是当产品的状态设置为“警告”和“已批准”时响应的外观。 字段 itemLevelIssues
包含应解决的问题列表。
{
"resources": [
{
"productId": "online:en:CA:9",
"title": "Slip Resistant - Shoes For Crews...",
"status": "Warning",
"creationDate": "2018-10-08T07:38:00Z",
"lastUpdateDate": "2020-09-29T14:35:54Z",
"expirationDate": "2020-10-29T14:35:54Z",
"itemLevelIssues": [
{
"code": "GtinPlusBrandRequiredWarn",
"description": "Missing one or more identifiers - The Brand and GTIN or Brand and MPN are required.",
"servability": "Unaffected"
}
]
},
. . .
{
"productId": "online:en:CA:7",
"title": "No Slip - Shoes For Crews...",
"status": "Disapproved",
"creationDate": "2018-10-08T07:38:00Z",
"lastUpdateDate": "2020-09-29T14:35:54Z",
"expirationDate": "2020-10-29T14:35:54Z",
"itemLevelIssues": [
{
"code": "EVRejectedErr",
"description": "The offer was rejected by the external validation component: EV.",
"servability": "Disapproved"
},
{
"code": "EV_39",
"description": "Trademark content",
"servability": "Disapproved"
}
]
}
]
}
默认情况下,请求最多返回 25 个产品/服务。 若要返回不同数量的产品/服务,请包含 max-results 查询参数。
curl -H "AuthenticationToken: <access token goes here>" -H "DeveloperToken: <developer token goes here>" "https://content.api.ads.microsoft.com/v9.1/bmc/stores/12345/productstatuses?max-results=5"
如果产品/服务状态设置为“已批准”或“警告”的数量大于 最大结果数,则响应将包含 nextPageToken
字段。
{
"nextPageToken": "W3sidG9rZW4iOm51bGwsInJhbmdlIjp7Im1pbiI6IjA1QzFFNTNEMUYwRjg2IiwibWF4IjoiMDVDMUU1NUIyRDk3NEEifX1d",
"resources": [...]
}
若要获取下一页产品/服务,请在下一次调用中包含 继续标记 查询参数,并将其设置为令牌。
curl -H "AuthenticationToken: <access token goes here>" -H "DeveloperToken: <developer token goes here>" "https://content.api.ads.microsoft.com/v9.1/bmc/stores/12345/productstatuses?max-results=5&continuation-token=W3sidG9rZW4iOm..."
通常的调用模式是在循环中调用此模板,直到响应不包含 nextPageToken
字段。
获取产品/服务摘要状态计数
ProductStatuses 资源提供商店中产品/服务状态的摘要视图。 该视图报告已批准和未批准的产品/服务以及等待评审或即将过期的产品/服务。
若要请求摘要视图,请使用 摘要视图模板。 设置为 {merchantId}
要从中查看的存储的 ID。
curl -H "AuthenticationToken: <access token goes here>" -H "DeveloperToken: <developer token goes here" https://content.api.ads.microsoft.com/v9.1/bmc/stores/12345/productstatusessummary
响应是 ProductStatusesSummary 对象。
{
"merchantId":12345,
"approved":189,
"expiring":14,
"disapproved":3,
"pending":10
}
当产品/服务的状态发生更改时,摘要视图可能需要长达两个小时才能反映更改。