UNPKG

mws-zodane-advanced

Version:

fixed throtal resend

1,243 lines (848 loc) 90.1 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <base data-ice="baseUrl" href="../"> <title data-ice="title">Function | mws-advanced</title> <link type="text/css" rel="stylesheet" href="css/style.css"> <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css"> <script src="script/prettify/prettify.js"></script> <script src="script/manual.js"></script> </head> <body class="layout-container" data-ice="rootContainer"> <header> <a href="./">Home</a> <a href="identifiers.html">Reference</a> <a href="source.html">Source</a> <div class="search-box"> <span> <img src="./image/search.png"> <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span> </span> <ul class="search-result"></ul> </div> </header> <nav class="navigation" data-ice="nav"><div> <ul> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/errors.js~InvalidUsage.html">InvalidUsage</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/errors.js~RequestCancelled.html">RequestCancelled</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/errors.js~ServiceError.html">ServiceError</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/errors.js~ValidationError.html">ValidationError</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-callEndpoint">callEndpoint</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-init">init</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getLowestPricedOffersForASIN">getLowestPricedOffersForASIN</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getMarketplaces">getMarketplaces</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getMatchingProductForId">getMatchingProductForId</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-listFinancialEvents">listFinancialEvents</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-listInventorySupply">listInventorySupply</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-listOrderItems">listOrderItems</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-listOrders">listOrders</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getReport">getReport</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getReportList">getReportList</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getReportListAll">getReportListAll</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getReportListByNextToken">getReportListByNextToken</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getReportRequestList">getReportRequestList</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-requestAndDownloadReport">requestAndDownloadReport</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-requestReport">requestReport</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-MWS_ENDPOINTS">MWS_ENDPOINTS</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-MWS_MARKETPLACES">MWS_MARKETPLACES</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-BuyBoxPrice">BuyBoxPrice</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-DetailedShippingTime">DetailedShippingTime</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-LowestPrice">LowestPrice</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-LowestPricedOffers">LowestPricedOffers</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-Money">Money</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-Offer">Offer</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-OfferCount">OfferCount</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-OfferSummary">OfferSummary</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-SellerFeedbackRating">SellerFeedbackRating</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-ShipsFrom">ShipsFrom</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-MarketDetail">MarketDetail</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-OrderItemList">OrderItemList</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-GetReportRequestListResult">GetReportRequestListResult</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-GetReportRequestListResult">GetReportRequestListResult</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-ReportRequestInfo">ReportRequestInfo</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#endpoints">endpoints</a><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-REPORT_PROCESSING_STATUS_TYPES">REPORT_PROCESSING_STATUS_TYPES</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-REQUEST_REPORT_TYPES">REQUEST_REPORT_TYPES</a></span></span></li> </ul> </div> </nav> <div class="content" data-ice="content"><h1 data-ice="title">Function</h1> <div data-ice="summaries"><table class="summary" data-ice="summary"> <thead><tr><td data-ice="title" colspan="3">Static Public Summary</td></tr></thead> <tbody> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-callEndpoint">callEndpoint</a></span></span><span class="code" data-ice="signature">(name: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, callOptions: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>, opt: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>): <span>any</span></span> </p> </div> <div> <div data-ice="description"><p>Call a known endpoint at MWS, returning the raw data from the function.</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-getLowestPricedOffersForASIN">getLowestPricedOffersForASIN</a></span></span><span class="code" data-ice="signature">(options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>): <span><a href="typedef/index.html#static-typedef-LowestPricedOffers">LowestPricedOffers</a></span></span> </p> </div> <div> <div data-ice="description"><p>getLowestPricedOffersForASIN</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-getMarketplaces">getMarketplaces</a></span></span><span class="code" data-ice="signature">(): <span><a href="typedef/index.html#static-typedef-MarketDetail">MarketDetail</a></span></span> </p> </div> <div> <div data-ice="description"><p>Call MWS ListMarketplaceParticipations, return parsed results</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-getMatchingProductForId">getMatchingProductForId</a></span></span><span class="code" data-ice="signature">(options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span><span>Product</span><span>[]</span></span></span> </p> </div> <div> <div data-ice="description"><p>Returns a list of products and their attributes, based on a list of ASIN, GCID, SellerSKU, UPC, EAN, ISBN, or JAN values</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-getReport">getReport</a></span></span><span class="code" data-ice="signature">(options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>): <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span> | <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span></span> </p> </div> <div> <div data-ice="description"><p>Returns the contents of a report</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-getReportList">getReportList</a></span></span><span class="code" data-ice="signature">(options: {}): <span>*</span></span> </p> </div> <div> <div data-ice="description"><p>TODO: write documentation for getReportList</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-getReportListAll">getReportListAll</a></span></span><span class="code" data-ice="signature">(options: {}): <span>*</span></span> </p> </div> <div> <div data-ice="description"><p>TODO: write documentation for getReportListAll (or see comment on getReportListByNextToken)</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-getReportListByNextToken">getReportListByNextToken</a></span></span><span class="code" data-ice="signature">(options: <span>*</span>): <span>*</span></span> </p> </div> <div> <div data-ice="description"><p>TODO: write documentation for getReportListByNextToken (or just roll getReportList and getReportListByNextToken into the same wrapper) (that wrapper might be getReportListAll, and just rename it)</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-getReportRequestList">getReportRequestList</a></span></span><span class="code" data-ice="signature">(options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>, ReportRequestIdList: <span><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span><span>[]</span></span>, ReportTypeList: <span><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span><span>[]</span></span>, ReportProcessingStatusList: <span><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span><span>[]</span></span>, MaxCount: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>, RequestedFromDate: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date">Date</a></span>, RequestedToDate: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date">Date</a></span>): <span><span><a href="typedef/index.html#static-typedef-GetReportRequestListResult">GetReportRequestListResult</a></span><span>[]</span></span></span> </p> </div> <div> <div data-ice="description"><p>Returns a list of report requests that you can use to get the ReportRequestId for a report After calling requestReport, you should call this function occasionally to see if/when the report has been processed.</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-init">init</a></span></span><span class="code" data-ice="signature">(config: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>): <span>mws-simple</span></span> </p> </div> <div> <div data-ice="description"><p>Initialize mws-advanced with your MWS access keys, merchantId, optionally authtoken, host, port If accessKeyId, secretAccessKey, and/or merchantId are not provided, they will be read from the environment variables MWS_ACESS_KEY, MWS_SECRET_ACCESS_KEY, and MWS_MERCHANT_ID respectively</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-listFinancialEvents">listFinancialEvents</a></span></span><span class="code" data-ice="signature">(options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>): <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span></span> </p> </div> <div> <div data-ice="description"><p><a href="https://docs.developer.amazonservices.com/en_UK/finances/Finances_ListFinancialEvents.html">https://docs.developer.amazonservices.com/en_UK/finances/Finances_ListFinancialEvents.html</a></p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-listInventorySupply">listInventorySupply</a></span></span><span class="code" data-ice="signature">(options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>): {nextToken: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, supplyList: <span><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span><span>[]</span></span>}</span> </p> </div> <div> <div data-ice="description"><p>Return information about the availability of a seller&apos;s FBA inventory</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-listOrderItems">listOrderItems</a></span></span><span class="code" data-ice="signature">(AmazonOrderId: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>): <span><a href="typedef/index.html#static-typedef-OrderItemList">OrderItemList</a></span></span> </p> </div> <div> <div data-ice="description"><p>Returns order items based on the AmazonOrderId that you specify.</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-listOrders">listOrders</a></span></span><span class="code" data-ice="signature">(options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>): <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span></span> </p> </div> <div> <div data-ice="description"><p>Return orders created or updated during a specific time frame see <a href="https://docs.developer.amazonservices.com/en_UK/orders-2013-09-01/Orders_ListOrders.html">https://docs.developer.amazonservices.com/en_UK/orders-2013-09-01/Orders_ListOrders.html</a> At least ONE of the search options (and maybe more depending on which ones you select) must be specified.</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-requestAndDownloadReport">requestAndDownloadReport</a></span></span><span class="code" data-ice="signature">(ReportType: <span>*</span>, file: <span>*</span>, reportParams: {}): <span>*</span></span> </p> </div> <div> <div data-ice="description"><p>TODO: Document requestAndDownloadReport</p> </div> </div> </td> <td> </td> </tr> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="async">async</span> <span class="code" data-ice="name"><span><a href="function/index.html#static-function-requestReport">requestReport</a></span></span><span class="code" data-ice="signature">(options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>, MarketplaceId: <span><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span><span>[]</span></span>): <span><a href="typedef/index.html#static-typedef-ReportRequestInfo">ReportRequestInfo</a></span></span> </p> </div> <div> <div data-ice="description"><p>Request a report from MWS Many optional parameters may be required by MWS! Read <a href="https://docs.developer.amazonservices.com/en_US/reports/Reports_ReportType.html">ReportType</a> for specifics!</p> </div> </div> </td> <td> </td> </tr> </tbody> </table> </div> <div data-ice="details"><h2 data-ice="title">Static Public </h2> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="static-function-callEndpoint"> <span class="access" data-ice="access">public</span> <span data-ice="async">async</span> <span class="code" data-ice="name">callEndpoint</span><span class="code" data-ice="signature">(name: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, callOptions: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>, opt: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>): <span>any</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/lib/callEndpoint.js.html#lineNumber128">source</a></span></span> </span> </h3> <div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import {callEndpoint} from &apos;<span><a href="file/lib/callEndpoint.js.html#lineNumber128">mws-advanced/lib/callEndpoint.js</a></span>&apos;</code></pre></div> <div data-ice="description"><p>Call a known endpoint at MWS, returning the raw data from the function. Parameters are transformed and validated according to the rules defined in lib/endpoints</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</h4> <table class="params"> <thead> <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr> </thead> <tbody> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">name</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>name of MWS API function to call</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">callOptions</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span></td> <td data-ice="appendix"><ul><li>optional</li></ul></td> <td data-ice="description"><p>named hash object of the parameters to pass to the API</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">opt</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span></td> <td data-ice="appendix"><ul><li>optional</li></ul></td> <td data-ice="description"><p>options for callEndpoint</p> </td> </tr> <tr data-ice="property" data-depth="1"> <td data-ice="name" class="code" data-depth="1">opt.noFlatten</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span></td> <td data-ice="appendix"><ul><li>optional</li></ul></td> <td data-ice="description"><p>do not flatten results</p> </td> </tr> <tr data-ice="property" data-depth="1"> <td data-ice="name" class="code" data-depth="1">opt.returnRaw</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span></td> <td data-ice="appendix"><ul><li>optional</li></ul></td> <td data-ice="description"><p>return only the raw data (may or may not be flattened)</p> </td> </tr> <tr data-ice="property" data-depth="1"> <td data-ice="name" class="code" data-depth="1">opt.saveRaw</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td> <td data-ice="appendix"><ul><li>optional</li></ul></td> <td data-ice="description"><p>filename to save raw data to (may or may not be flattened)</p> </td> </tr> <tr data-ice="property" data-depth="1"> <td data-ice="name" class="code" data-depth="1">opt.saveParsed</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td> <td data-ice="appendix"><ul><li>optional</li></ul></td> <td data-ice="description"><p>filename to save final parsed data to (not compatible with returnRaw, since parsing won&apos;t happen)</p> </td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>any</span></td> <td class="return-desc" data-ice="returnDescription"><p>Results of the call to MWS</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="static-function-getLowestPricedOffersForASIN"> <span class="access" data-ice="access">public</span> <span data-ice="async">async</span> <span class="code" data-ice="name">getLowestPricedOffersForASIN</span><span class="code" data-ice="signature">(options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>): <span><a href="typedef/index.html#static-typedef-LowestPricedOffers">LowestPricedOffers</a></span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/lib/get-lowest-priced-offers.js.html#lineNumber176">source</a></span></span> </span> </h3> <div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import {getLowestPricedOffersForASIN} from &apos;<span><a href="file/lib/get-lowest-priced-offers.js.html#lineNumber176">mws-advanced/lib/get-lowest-priced-offers.js</a></span>&apos;</code></pre></div> <div data-ice="description"><p>getLowestPricedOffersForASIN</p> <p>Calls GetLowestPricedOffersForASIN, reformats results, and returns the data</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</h4> <table class="params"> <thead> <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr> </thead> <tbody> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">options</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>see <a href="https://docs.developer.amazonservices.com/en_UK/products/Products_GetLowestPricedOffersForASIN.html">https://docs.developer.amazonservices.com/en_UK/products/Products_GetLowestPricedOffersForASIN.html</a></p> </td> </tr> <tr data-ice="property" data-depth="1"> <td data-ice="name" class="code" data-depth="1">options.MarketplaceId</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>Marketplace ID to search</p> </td> </tr> <tr data-ice="property" data-depth="1"> <td data-ice="name" class="code" data-depth="1">options.ASIN</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>ASIN to search for</p> </td> </tr> <tr data-ice="property" data-depth="1"> <td data-ice="name" class="code" data-depth="1">options.ItemCondition</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>Listing Condition: New, Used, Collectible, Refurbished, Club</p> </td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span><a href="typedef/index.html#static-typedef-LowestPricedOffers">LowestPricedOffers</a></span></td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="static-function-getMarketplaces"> <span class="access" data-ice="access">public</span> <span data-ice="async">async</span> <span class="code" data-ice="name">getMarketplaces</span><span class="code" data-ice="signature">(): <span><a href="typedef/index.html#static-typedef-MarketDetail">MarketDetail</a></span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/lib/get-marketplaces.js.html#lineNumber33">source</a></span></span> </span> </h3> <div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import {getMarketplaces} from &apos;<span><a href="file/lib/get-marketplaces.js.html#lineNumber33">mws-advanced/lib/get-marketplaces.js</a></span>&apos;</code></pre></div> <div data-ice="description"><p>Call MWS ListMarketplaceParticipations, return parsed results</p> </div> <div data-ice="properties"> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span><a href="typedef/index.html#static-typedef-MarketDetail">MarketDetail</a></span></td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> <div data-ice="example"> <h4>Example:</h4> <div class="example-doc" data-ice="exampleDoc"> <pre class="prettyprint source-code"><code data-ice="exampleCode">const marketplaces = (async () =&gt; await mws.getMarketplaces())(); (async function() { const result = await mws.getMarketplaces(); console.log(result); })();</code></pre> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="static-function-getMatchingProductForId"> <span class="access" data-ice="access">public</span> <span data-ice="async">async</span> <span class="code" data-ice="name">getMatchingProductForId</span><span class="code" data-ice="signature">(options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span><span>Product</span><span>[]</span></span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/lib/get-matching-product.js.html#lineNumber33">source</a></span></span> </span> </h3> <div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import {getMatchingProductForId} from &apos;<span><a href="file/lib/get-matching-product.js.html#lineNumber33">mws-advanced/lib/get-matching-product.js</a></span>&apos;</code></pre></div> <div data-ice="description"><p>Returns a list of products and their attributes, based on a list of ASIN, GCID, SellerSKU, UPC, EAN, ISBN, or JAN values</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</h4> <table class="params"> <thead> <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr> </thead> <tbody> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">options</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>see <a href="https://docs.developer.amazonservices.com/en_UK/products/Products_GetMatchingProductForId.html">https://docs.developer.amazonservices.com/en_UK/products/Products_GetMatchingProductForId.html</a></p> </td> </tr> <tr data-ice="property" data-depth="1"> <td data-ice="name" class="code" data-depth="1">options.MarketplaceId</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>Identifier for marketplace (see getMarketplaces)</p> </td> </tr> <tr data-ice="property" data-depth="1"> <td data-ice="name" class="code" data-depth="1">options.IdType</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>Type of lookup to perform: ASIN, GCID, SellerSKU, UPC, EAN, ISBN, JAN</p> </td> </tr> <tr data-ice="property" data-depth="1"> <td data-ice="name" class="code" data-depth="1">options.IdList</td> <td data-ice="type" class="code"><span><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span><span>[]</span></span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>List of codes to perform lookup on</p> </td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span><span>Product</span><span>[]</span></span></td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="static-function-getReport"> <span class="access" data-ice="access">public</span> <span data-ice="async">async</span> <span class="code" data-ice="name">getReport</span><span class="code" data-ice="signature">(options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>): <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span> | <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/lib/reports.js.html#lineNumber101">source</a></span></span> </span> </h3> <div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import {getReport} from &apos;<span><a href="file/lib/reports.js.html#lineNumber101">mws-advanced/lib/reports.js</a></span>&apos;</code></pre></div> <div data-ice="description"><p>Returns the contents of a report</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</h4> <table class="params"> <thead> <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr> </thead> <tbody> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">options</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>Options to pass to GetReport</p> </td> </tr> <tr data-ice="property" data-depth="1"> <td data-ice="name" class="code" data-depth="1">options.ReportId</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>Report number from @see <span>GetReportList</span> or GeneratedReportId from @see <span><a href="typedef/index.html#static-typedef-GetReportRequestListResult">GetReportRequestListResult</a></span></p> </td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span> | <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span></td> <td class="return-desc" data-ice="returnDescription"><p>Contents of the report to return (format may vary WIDELY between different reports generated, see <a href="https://docs.developer.amazonservices.com/en_US/reports/Reports_ReportType.html">ReportType</a>)</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="static-function-getReportList"> <span class="access" data-ice="access">public</span> <span data-ice="async">async</span> <span class="code" data-ice="name">getReportList</span><span class="code" data-ice="signature">(options: {}): <span>*</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/lib/reports.js.html#lineNumber109">source</a></span></span> </span> </h3> <div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import {getReportList} from &apos;<span><a href="file/lib/reports.js.html#lineNumber109">mws-advanced/lib/reports.js</a></span>&apos;</code></pre></div> <div data-ice="description"><p>TODO: write documentation for getReportList</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</h4> <table class="params"> <thead> <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr> </thead> <tbody> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">options</td> <td data-ice="type" class="code">{}</td> <td data-ice="appendix"><ul><li>optional</li> <li>default: {}</li></ul></td> <td data-ice="description"></td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>*</span></td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="static-function-getReportListAll"> <span class="access" data-ice="access">public</span> <span data-ice="async">async</span> <span class="code" data-ice="name">getReportListAll</span><span class="code" data-ice="signature">(options: {}): <span>*</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/lib/reports.js.html#lineNumber144">source</a></span></span> </span> </h3> <div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import {getReportListAll} from &apos;<span><a href="file/lib/reports.js.html#lineNumber144">mws-advanced/lib/reports.js</a></span>&apos;</code></pre></div> <div data-ice="description"><p>TODO: write documentation for getReportListAll (or see comment on getReportListByNextToken)</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</h4> <table class="params"> <thead> <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr> </thead> <tbody> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">options</td> <td data-ice="type" class="code">{}</td> <td data-ice="appendix"><ul><li>optional</li> <li>default: {}</li></ul></td> <td data-ice="description"></td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>*</span></td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="static-function-getReportListByNextToken"> <span class="access" data-ice="access">public</span> <span data-ice="async">async</span> <span class="code" data-ice="name">getReportListByNextToken</span><span class="code" data-ice="signature">(options: <span>*</span>): <span>*</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/lib/reports.js.html#lineNumber128">source</a></span></span> </span> </h3> <div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import {getReportListByNextToken} from &apos;<span><a href="file/lib/reports.js.html#lineNumber128">mws-advanced/lib/reports.js</a></span>&apos;</code></pre></div> <div data-ice="description"><p>TODO: write documentation for getReportListByNextToken (or just roll getReportList and getReportListByNextToken into the same wrapper) (that wrapper might be getReportListAll, and just rename it)</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</h4> <table class="params"> <thead> <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr> </thead> <tbody> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">options</td> <td data-ice="type" class="code"><span>*</span></td> <td data-ice="appendix"></td> <td data-ice="description"></td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>*</span></td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="static-function-getReportRequestList"> <span class="access" data-ice="access">public</span> <span data-ice="async">async</span> <span class="code" data-ice="name">getReportRequestList</span><span class="code" data-ice="signature">(options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>, ReportRequestIdList: <span><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span><span>[]</span></span>, ReportTypeList: <span><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String