我正在制作有关 FBA 费用的功能。
参考这个链接。 如何使用亚马逊 MWS 获取 FBA 费用和佣金
我正在使用 node.js 我必须在 getReportList 函数上输入 2 个参数,但我不能。
这是我的代码:
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) {...........
然后是当前结果:
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>
.........
当我使用 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>
我想让结果看起来像暂存器。如何获取该报告类型。如何输入“paramsdata2”。
谢谢你。