|
@@ -270,6 +270,16 @@ class SPClient(BaseClient):
|
|
|
sortDimension:Literal["CLICKS","CONVERSIONS","DEFAULT"]="DEFAULT",
|
|
|
locale:Literal["ar_EG" ,"de_DE", "en_AE", "en_AU", "en_CA", "en_GB", "en_IN", "en_SA", "en_SG", "en_US",
|
|
|
"es_ES", "es_MX", "fr_FR", "it_IT", "ja_JP", "nl_NL", "pl_PL", "pt_BR", "sv_SE", "tr_TR", "zh_CN"]="en_US"):
|
|
|
+ """
|
|
|
+ adGroupId与asins只能选择一个参数填写。
|
|
|
+ @param campaignId: pass
|
|
|
+ @param adGroupId: 如果recommendationType为KEYWORDS_FOR_ADGROUP时,为必填项
|
|
|
+ @param asins:如果recommendationType为KEYWORDS_FOR_ASINS时,为必填项
|
|
|
+ @param userSelectedKeyword:是否参考选择的keyword
|
|
|
+ @param recommendationType:类型选择,必填
|
|
|
+ """
|
|
|
+ headers = {"Accept":"application/vnd.spkeywordsrecommendation.v3+json",
|
|
|
+ "Content-Type":"application/vnd.spkeywordsrecommendation.v3+json"}
|
|
|
url_path = "/sp/targets/keywords/recommendations"
|
|
|
body = {
|
|
|
"recommendationType": recommendationType,
|
|
@@ -290,7 +300,7 @@ class SPClient(BaseClient):
|
|
|
body["adGroupId"]= adGroupId
|
|
|
else:
|
|
|
body['asins'] = asins
|
|
|
- return self._request(url_path, method="POST", body=body)
|
|
|
+ return self._request(url_path, method="POST", body=body,headers=headers)
|
|
|
|
|
|
def get_v3_report(self,
|
|
|
groupby:list,
|