Keyur Padalia
Keyur Padalia

Reputation: 2097

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.

But unfortunately it says "report status cancelled". Using Scratchpad to request this report it works fine.

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.

Upvotes: 0

Views: 1794

Answers (1)

Hazzit
Hazzit

Reputation: 6882

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 (e.g. You submit an XML file that validates against the XSD but contains prices for items that are not part of your inventory)

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). So please try and remove

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

from your code and see what happens.

Upvotes: 2

Related Questions