0

i'm making function about FBA Fee.

reference this link. How to get FBA Fee and commission using Amazon MWS

i'm using node.js i have to input 2 parameters on getReportList function but i can't.

this is my code :

function mws_RequestReportForFee (req, res, i, data, io) {  
var report1 = '_GET_FLAT_FILE_PAYMENT_SETTLEMENT_DATA_';    
var report2 = '_GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_';  

//var paramsdata2 = {'ReportTypeList.Type.1' : report1, 'ReportTypeList.Type.2' : report2};
//var paramsdata2 = {'ReportTypes' : {'ReportTypeList.Type.1': report1, 'ReportTypeList.Type.2' : report2}};    

console.log("2222222222222222222222222222222222"+paramsdata2);
}
console.log('----------------------config==================\n',config); 
mws.reports.GetReportList(config, paramsdata2, true, function (err, result1) {
console.log("333333333333333333333333333"+result1);
to_json(result1,function(err,data1){
if (!err) {...........  

and then current result :

333333333333333333333333333<?xml version="1.0"?>
<GetReportListResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/">
<GetReportListResult>
<HasNext>true</HasNext>
<NextToken>blah blah</NextToken>
<ReportInfo>
<ReportType>_GET_MERCHANT_LISTINGS_DATA_</ReportType> 
<Acknowledged>false</Acknowledged>
<ReportId>1234123412341234</ReportId>
<ReportRequestId>123412341234</ReportRequestId>
<AvailableDate>2016-04-06T00:38:32+00:00</AvailableDate>
</ReportInfo>
<ReportInfo>
<ReportType>_GET_MERCHANT_LISTINGS_DATA_</ReportType>
<Acknowledged>false</Acknowledged>
<ReportId>1234123412341234</ReportId>
<ReportRequestId>1234123412341234</ReportRequestId>
<AvailableDate>2016-04-06T00:31:57+00:00</AvailableDate>
</ReportInfo>    
.........

when i try scratchpad using 2parameters :

<?xml version="1.0"?>
<GetReportListResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/">
<GetReportListResult>
<HasNext>false</HasNext>
<ReportInfo>
<ReportType>_GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_</ReportType>
<Acknowledged>false</Acknowledged>
<ReportId>123412341234</ReportId>
<ReportRequestId>12341234</ReportRequestId>
<AvailableDate>2016-03-30T01:48:38+00:00</AvailableDate>
</ReportInfo>
<ReportInfo>
<ReportType>_GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_</ReportType>
<Acknowledged>false</Acknowledged>
<ReportId>123412341234</ReportId>
<ReportRequestId>12341234</ReportRequestId>
<AvailableDate>2016-03-16T01:40:03+00:00</AvailableDate>
</ReportInfo>

i want to make a result looks like scratchpad. how to get that report type. how to input "paramsdata2".

thank you.

PaulG
  • 13,871
  • 9
  • 56
  • 78
Brandon
  • 1
  • 1

1 Answers1

2

I am not sure about using Reports but I used ListFinancialEvents api call to get the info. You can simply pass the order id and pull all the info on the oder from the amount collected and all the fees amazon took out.

mcdonagg
  • 94
  • 6