-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from bhushankumarl/development
correct example for GetMyFeesEstimate API call
- Loading branch information
Showing
10 changed files
with
169 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -559,7 +559,7 @@ Originally by [Bhushankumar L](mailto:[email protected]). | |
|
||
#### Get My Fees Estimate | ||
``` | ||
amazonMws.products.searchFor({ | ||
amazonMws.products.search({ | ||
'Version': '2011-10-01', | ||
'Action': 'GetMyFeesEstimate', | ||
'SellerId': 'SELLER_ID', | ||
|
@@ -790,6 +790,44 @@ Originally by [Bhushankumar L](mailto:[email protected]). | |
}); | ||
``` | ||
|
||
#### Request Report Content Type | ||
``` | ||
amazonMws.setContentType('application/json'); | ||
amazonMws.reports.submit({ | ||
'Version': '2009-01-01', | ||
'Action': 'RequestReport', | ||
'SellerId': 'SELLER_ID', | ||
'MWSAuthToken': 'MWS_AUTH_TOKEN', | ||
'ReportType': '_GET_MERCHANT_LISTINGS_ALL_DATA_' | ||
}, function (error, response) { | ||
if (error) { | ||
console.log('error ', error); | ||
return; | ||
} | ||
console.log('response', response); | ||
}); | ||
``` | ||
|
||
#### Request Report XML Response | ||
``` | ||
amazonMws.setResponseFormat('XML'); | ||
amazonMws.reports.submit({ | ||
'Version': '2009-01-01', | ||
'Action': 'RequestReport', | ||
'SellerId': 'SELLER_ID', | ||
'MWSAuthToken': 'MWS_AUTH_TOKEN', | ||
'ReportType': '_GET_MERCHANT_LISTINGS_ALL_DATA_' | ||
}, function (error, response) { | ||
if (error) { | ||
console.log('error ', error); | ||
return; | ||
} | ||
console.log('response', response); | ||
}); | ||
``` | ||
|
||
### Sellers | ||
#### List Marketplace Participations | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use strict'; | ||
|
||
var accessKey = process.env.AWS_ACCESS_KEY_ID || 'YOUR_KEY'; | ||
var accessSecret = process.env.AWS_SECRET_ACCESS_KEY || 'YOUR_SECRET'; | ||
|
||
var amazonMws = require('../../../lib/amazon-mws')(accessKey, accessSecret); | ||
|
||
/** | ||
* This example has been written to override/set the contentType of the request. | ||
*/ | ||
|
||
var reportRequest = function () { | ||
amazonMws.setContentType('application/json'); | ||
|
||
amazonMws.reports.submit({ | ||
'Version': '2009-01-01', | ||
'Action': 'RequestReport', | ||
'SellerId': 'SELLER_ID', | ||
'MWSAuthToken': 'MWS_AUTH_TOKEN', | ||
'ReportType': '_GET_MERCHANT_LISTINGS_ALL_DATA_' | ||
}, function (error, response) { | ||
if (error) { | ||
console.log('error ', error); | ||
return; | ||
} | ||
console.log('response', response); | ||
}); | ||
}; | ||
|
||
reportRequest(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use strict'; | ||
|
||
var accessKey = process.env.AWS_ACCESS_KEY_ID || 'YOUR_KEY'; | ||
var accessSecret = process.env.AWS_SECRET_ACCESS_KEY || 'YOUR_SECRET'; | ||
|
||
var amazonMws = require('../../../lib/amazon-mws')(accessKey, accessSecret); | ||
|
||
/** | ||
* This example has been written to override/set the default RESPONSE type to XML. | ||
*/ | ||
|
||
var reportRequest = function () { | ||
amazonMws.setResponseFormat('XML'); | ||
|
||
amazonMws.reports.submit({ | ||
'Version': '2009-01-01', | ||
'Action': 'RequestReport', | ||
'SellerId': 'SELLER_ID', | ||
'MWSAuthToken': 'MWS_AUTH_TOKEN', | ||
'ReportType': '_GET_MERCHANT_LISTINGS_ALL_DATA_' | ||
}, function (error, response) { | ||
if (error) { | ||
console.log('error ', error); | ||
return; | ||
} | ||
console.log('response', response); | ||
}); | ||
}; | ||
|
||
reportRequest(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters