简体   繁体   English

无法从Amazon MWS Reports API请求_GET_SELLER_FEEDBACK_DATA_报告?

[英]Unable to request _GET_SELLER_FEEDBACK_DATA_ report from Amazon MWS Reports API?

I am using Amazon MWS Reports API to get customer's feedback using "_GET_SELLER_FEEDBACK_DATA_" report type. 我正在使用Amazon MWS Reports API使用“ _GET_SELLER_FEEDBACK_DATA_”报告类型获取客户的反馈。

But unfortunately it says "report status cancelled". 但不幸的是,它说“报告状态已取消”。 Using Scratchpad to request this report it works fine. 使用Scratchpad请求此报告可以正常工作。

The following is my code: 以下是我的代码:

$report_type = "_GET_SELLER_FEEDBACK_DATA_";

$config = array(
    'ServiceURL' => "https://mws.amazonservices.co.uk",
    'ProxyHost' => null,
    'ProxyPort' => -1,
    'MaxErrorRetry' => 3,
    );

    $service = new MarketplaceWebService_Client($AWS_ACCESS_KEY_ID, $AWS_SECRET_ACCESS_KEY, $config, $APPLICATION_NAME, $APPLICATION_VERSION);

    $marketplaceIdArray = array("Id" => array($MARKETPLACE_ID));

    //Sends Report Request      
    $request = new MarketplaceWebService_Model_RequestReportRequest();
    $request->setMarketplaceIdList($marketplaceIdArray);
    $request->setMerchant($MERCHANT_ID);
    $request->setReportType($report_type);
    $request->setReportOptions('ShowSalesChannel=true');
    $request->setStartDate(new DateTime('-90 Days', new DateTimeZone('UTC')));

    $report_request_id = invokeRequestReport($service, $request);

The Reports API class methods invokeReportRequest() , invokeGetReportRequestList() , invokeGetReportList() and invokeGetReport() are unchanged by me. invokeReportRequest() Reports API类方法invokeReportRequest()invokeGetReportRequestList()invokeGetReportList()invokeGetReport()

Amazon accepts your report request, but then refuses to actually produce one. 亚马逊接受您的举报请求,但随后拒绝实际提出。 I'm not sure if there is a way to get any meaningful error message out of MWS, but from past experience, this kind of thing happens when your request is technically valid but has a logical error of some sorts (eg You submit an XML file that validates against the XSD but contains prices for items that are not part of your inventory) 我不确定是否有办法从MWS中获取任何有意义的错误消息,但是根据过去的经验,当您的请求在技术上有效但存在某种逻辑错误时(例如,您提交XML,该文件可针对XSD进行验证,但包含不属于您的库存的商品的价格)

I haven't tested this, but looking at the API docs ( MWS Reports API Reference pg. 46), it seems that ShowSalesChannel is not a valid ReportOption for _GET_SELLER_FEEDBACK_DATA_ reports (it seems to be allowed only in order reports, and getting seller feedback does not support any ReportOption). 我尚未对此进行测试,但在查看API文档( MWS Reports API参考第46页)时, ShowSalesChannel似乎不是针对_GET_SELLER_FEEDBACK_DATA_报告的有效ReportOption (似乎仅允许在订单报告中使用,并获得卖方反馈)不支持任何 ReportOption)。 So please try and remove 所以请尝试删除

$request->setReportOptions('ShowSalesChannel=true');

from your code and see what happens. 从您的代码,看看会发生什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM