Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Latest commit

 

History

History
1519 lines (1008 loc) · 52 KB

API.md

File metadata and controls

1519 lines (1008 loc) · 52 KB

Table of Contents

endpoints

simple flat list of all the endpoints required from individual modules above

constructor

Create a new instance of MWSAdvanced, calling init(), and binding this instance of callEndpoint to this instance of MWSAdvanced.

Parameters

Returns MWSAdvanced new instance of MWSAdvanced

init

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

Parameters

Examples

const mws = MWS.init({ region: 'NA', accessKeyId: '1234', secretAccessKey: '2345', merchantId: '1234567890' });
const mws = MWS.init({ region: 'EU', accessKeyId, ... });
const mws = MWS.init({ authToken: 'qwerty', accessKeyId, ...});
const mws = MWS.init({ host: 'alternate-mws-server.com', accessKeyId, ... });

Returns mws-simple The mws-simple instance used to communicate with the API

callEndpoint

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

Parameters

  • name string name of MWS API function to call
  • callOptions object? named hash object of the parameters to pass to the API (optional, default {})
    • callOptions.feedContent string? if calling a function that submits a feed, supply the feed data here
  • opt object? options for callEndpoint (optional, default {maxThrottleRetries:2})
    • opt.noFlatten boolean? do not flatten results
    • opt.returnRaw boolean? return only the raw data (may or may not be flattened)
    • opt.saveRaw string? filename to save raw data to (may or may not be flattened)
    • opt.saveParsed string? filename to save final parsed data to (not compatible with returnRaw, since parsing won't happen)
    • opt.maxThrottleRetries int maximum number of retries for throttling (optional, default 2)

Returns any Results of the call to MWS

getInboundGuidanceForASIN

Call MWS GetInboundGuidanceForASIN, return parsed results

Parameters

  • params ...any

getMarketplaces

Call MWS ListMarketplaceParticipations, return parsed results

Parameters

  • params ...any

Examples

const marketplaces = (async () => await mws.getMarketplaces())();
(async function() {
   const result = await mws.getMarketplaces();
   console.log(result);
})();

Returns MarketDetail

listOrders

Return orders created or updated during a specific time frame see https://docs.developer.amazonservices.com/en_UK/orders-2013-09-01/Orders_ListOrders.html At least ONE of the search options (and maybe more depending on which ones you select) must be specified. Error messages may or may not return information on what parameters you are missing. If you are having trouble, see the official parameter documentation above.

Parameters

  • params ...any
  • options object
    • options.MarketplaceId Array<string> Array of Marketplace IDs to search @see MWS_MARKETPLACES
    • options.CreatedAfter Date? Select orders created at or after the given Date
    • options.CreatedBefore Date? Select orders created at or before the given Date
    • options.LastUpdatedAfter Date? Select orders updated at or after the given Date
    • options.LastUpdatedBefore Date? Select orders updated at or before the given Date
    • options.OrderStatus string? OrderStatus, see MWS doc page
    • options.FulfillmentChannel string? AFN for Amazon fulfillment, MFN for merchant
    • options.PaymentMethod string? All, COD, CVS, Other
    • options.BuyerEmail string? Search for orders with given Email address
    • options.SellerOrderId string? Specified seller order ID
    • options.MaxResultsPerPage string Max number of results to return, 1 <=> 100 (optional, default 100)
    • options.TFMShipmentStatus string? See MWS doc page

Returns object

listOrderItems

Returns order items based on the AmazonOrderId that you specify.

If you've pulled a list of orders using @see ListOrders, or have order identifiers stored in some other fashion, then to find out what items are actually on the orders, you will need to call ListOrderItems to obtain details about the items that were ordered. The ListOrders call does not give you any information about the items, except how many of them have shipped or not shipped.

If an Order is in the Pending state, ListOrderItems will not return any pricing or promotion information. Once an order has left the Pending state, the following items will be returned:

ItemTax, GiftWrapPrice, ItemPrice, PromotionDiscount, GiftWrapTax, ShippingTax, ShippingPrice, ShippingDiscount

Parameters

  • params ...any
  • AmazonOrderId string 3-7-7 Amazon Order ID formatted string

Returns OrderItemList

getOrder

Return orders by ID, i.e. Amazon Order ID. see https://docs.developer.amazonservices.com/en_UK/orders-2013-09-01/Orders_GetOrder.html

Parameters

  • params ...any
  • options object
  • options Array<string> A list of AmazonOrderId values. An AmazonOrderId is an Amazon-defined order identifier, in 3-7-7 format.

Returns object A list of orders

listFinancialEvents

https://docs.developer.amazonservices.com/en_UK/finances/Finances_ListFinancialEvents.html

Parameters

  • params ...any
  • options object
    • options.maxResultsPerPage number Maximum number of results to return (1 <=> 100)
    • options.amazonOrderId string An order number to search for
    • options.financialEventGroupId string Type of Financial Event to search for
    • options.postedAfter Date When to search for events after
    • options.postedBefore Date When to search for events prior to

Returns object

listInventorySupply

Return information about the availability of a seller's FBA inventory

Parameters

  • params ...any
  • options object
    • options.sellerSkus Array<String> A list of SKUs for items to get inventory info for
    • options.queryStartDateTime Date Date to begin searching at
    • options.responseGroup string 'Basic' = Do not include SupplyDetail, 'Detailed' = Do
    • options.marketplaceId string Marketplace ID to search

Returns {nextToken: string, supplyList: Array<object>}

listMatchingProducts

Return a list of products and their attributes, based on a text query and contextId.

Parameters

Returns Array<Product> Array of product information

getMatchingProductForId

Returns a list of products and their attributes, based on a list of ASIN, GCID, SellerSKU, UPC, EAN, ISBN, or JAN values

Parameters

Returns Array<Product>

getLowestPricedOffersForAsin

getLowestPricedOffersForASIN

Calls GetLowestPricedOffersForASIN, reformats results, and returns the data

Parameters

Returns LowestPricedOffers

getLowestPricedOffersForSku

getLowestPricedOffersForSKU

Calls GetLowestPricedOffersForSKU, reformats results, and returns the data

Parameters

Returns LowestPricedOffers

getProductCategoriesForAsins

return product categories for multiple asins

Parameters

  • params ...any
  • parameters object
    • parameters.marketplaceId string marketplace identifier to run query on
    • parameters.asins Array<string> Array of string ASINs to query for

Returns Array<productCategoryByAsin> Array of product category information

getProductCategoriesForSkus

return product categories for multiple SKUs

Parameters

  • params ...any
  • parameters object
    • parameters.marketplaceId string marketplace identifier to run query on
    • parameters.skus Array<string> Array of string SKUs to query for

Returns Array<productCategoryBySku> Array of product category information

getMyFeesEstimate

Get an estimate of fees for an item, based on listing and shipping prices.

Parameters

  • params ...any
  • null-null Array<EstimateRequest> Array of EstimateRequest items to get fees for

Returns Object Object of Estimate items, indexed by EstimateRequest Identifier

requestReport

Request a report from MWS Many optional parameters may be required by MWS! Read ReportType for specifics!

Parameters

  • params ...any
  • options object
    • options.ReportType string Type of Report to Request @see REQUEST_REPORT_TYPES
    • options.StartDate Date? Date to start report
    • options.EndDate Date? Date to end report at
    • options.ReportOptions object? Reports may have additional options available. Please see the ReportType official docs
  • MarketplaceId Array<string>? Array of marketplace IDs to generate reports covering

Returns ReportRequestInfo

getReportRequestList

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.

Parameters

  • params ...any
  • options object? Options to pass to GetReportRequestList
  • ReportRequestIdList Array<string>? List of report request IDs @see requestReport
  • ReportTypeList Array<string>? List of Report Types @see REQUEST_REPORT_TYPES
  • ReportProcessingStatusList Array<string>? List of Report Processing Status @see REPORT_PROCESSING_STATUS_TYPES
  • MaxCount number Maximum number of report requests to return, max is 100 (optional, default 10)
  • RequestedFromDate Date Oldest date to search for (optional, default 90-days-past)
  • RequestedToDate Date Newest date to search for (optional, default Now)

Returns Array<GetReportRequestListResult> Returns Array<GetReportRequestListResult>

getReportList

TODO: write documentation for getReportList

Parameters

  • params ...any

getReportListByNextToken

TODO: write documentation for getReportListByNextToken (or just roll getReportList and getReportListByNextToken into the same wrapper) (that wrapper might be getReportListAll, and just rename it)

Parameters

  • params ...any

getReportListAll

TODO: write documentation for getReportListAll (or see comment on getReportListByNextToken)

Parameters

  • params ...any

requestAndDownloadReport

TODO: Document requestAndDownloadReport

Parameters

  • params ...any

manageReportSchedule

TO DO: WRITE DOCUMENTATION

Parameters

  • params ...any

updateReportAcknowledgements

TO DO: WRITE DOCUMENTATION

Parameters

  • params ...any

getReportScheduleList

TO DO: WRITE DOCUMENTATION

Parameters

  • params ...any

getReport

Download a specific report identified by the ReportId and return it

Parameters

  • options object GetReport options, should contain a [ReportId]
    • options.ReportId string Report number from [GetReportList] or [GeneratedReportId] from [GetReportRequestListResult]
  • options object GetReport options, should contain a [ReportId]
    • options.ReportId string Report number from [GetReportList] or [GeneratedReportId] from [GetReportRequestListResult]

Examples

mws.getReport({ ReportId: '12660293969017879' });

Returns (Array | object) Contents of the report to return (format may vary WIDELY between different reports generated, see ReportType) Returns (Array | object) Contents of the report to return (format may vary WIDELY between different reports generated, see ReportType)

InvalidUsage

Extends Error

Thrown when completely Invalid Parameters are given and we have no way of making sense of them

ServiceError

Extends Error

Thrown when an Error response comes from the Service (not a mws-simple.ServerError though)

InvalidIdentifier

Extends ServiceError

Thrown when receiving an "Invalid" identifier message, which is also the same as "identifier does not exist" -- when calling something like getMatchingProductForId, MWS will return "Invalid Identifier" for any situation in which an identifier is not found. It may or may not be technically valid, but it definitely doesn't exist on their side.

RequestCancelled

Extends Error

Thrown when a request is cancelled by MWS -- we have no way of knowing automatically if we should retry or not

ValidationError

Extends Error

Thrown when parameters fail validation locally, before being sent to MWS

MWS_MARKETPLACES

A list of Marketplace IDs hashed by their country code.

MARKET_CURRENCY

A list of the default currency codes for markets, indexed by country code. Calling, for example, getMyFeesEstimate in Canada, using USD will fail with "status":"ClientError", "error":{ "code":"InvalidParameterValue", "message":"There is an client-side error. Please verify your inputs." } so you need to use CAD when calling getMyFeesEstimate for Canada.

MWS_ENDPOINTS

A list of hosts you can use with the mws-advanced "host" option, hashed by MWS Region Name.

recursionCount

flattenResult does some recursion. We need to act differently on the initial iteration.

rootWasArray

determine if flattenResult was called with an Array as the root

validateInteger

Parameters

  • type string type of integer to validate (xs:int, xs:positiveInteger, etc)
  • test any value to test
  • minmax object minimum and maximum values to test for (optional, default {})
    • minmax.minValue integer minimum value to test for
    • minmax.maxValue integer maximum value to test for

feeds

pull in all the separate endpoint modules and export them together

REQUEST_REPORT_TYPES

List of all valid request report types. This should probably be a hash map from sane values into values that Amazon understands, but we don't really have reporting done very well yet.

REPORT_PROCESSING_STATUS_TYPES

status indicators for report processing status updates

MWSInvalidASIN

http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_Datatypes.html#InvalidASIN

Type: object

Properties

MWSInvalidASINList

Type: Array<MWSInvalidASIN>

invalidAsin

Type: object

Properties

parseInvalidAsin

converts MWSInvalidASIN to invalidAsin

Parameters

Returns any invalidAsin

parseInvalidAsinList

convers MWSInvalidASINList to invalidAsin[]

Parameters

parseInvalidSku

http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_Datatypes.html#InvalidSKU

Parameters

  • mwsInvalidSku

Properties

  • SellerSKU string SellerSKU for item
  • ErrorReason string Reason for error

parseInvalidSku

Parameters

  • mwsInvalidSku

Properties

  • sku string seller's sku for item
  • error string reason for error

parseInvalidSku

convert MWSInvalidSKU to invalidSku

Parameters

  • mwsInvalidSku MWSInvalidSKU

Returns invalidSku

MWSInvalidSKUList

Type: Array<MWSInvaludSku>

parseInvalidSkuList

Convert MWSInvalidSKUList to invalidSku[]

Parameters

Returns Array<invalidSku>

parseGuidanceReasonList

https://docs.developer.amazonservices.com/en_UK/fba_inbound/FBAInbound_Datatypes.html#GuidanceReason Amazon says this is a list, but I can only get it to return as a single item. This might be a bug in Amazon or docs or us, not sure.

Parameters

  • mwsGuidanceReasonList

Properties

  • GuidanceReason string reason for amazon guidance

parseGuidanceReasonList

convert MWSGuidanceReasonList to guidanceReason

Parameters

  • mwsGuidanceReasonList MWSGuidanceReasonList

Returns guidanceReason

guidanceReason

Type: string

MWSInboundGuidance

https://docs.developer.amazonservices.com/en_UK/fba_inbound/FBAInbound_Datatypes.html#InboundGuidance

Type: string

parseAsinInboundGuidance

Parameters

  • mwsAsinInboundGuidance

Properties

parseAsinInboundGuidance

https://docs.developer.amazonservices.com/en_UK/fba_inbound/FBAInbound_Datatypes.html#ASINInboundGuidance

Parameters

  • mwsAsinInboundGuidance

Properties

MWSASINInboundGuidanceList

Type: Array<MWSInboundGuidance>

parseAsinInboundGuidanceList

convert MWSASINInboundGuidanceList to inboundGuidance[]

Parameters

Returns Array<inboundGuidance>

parseSkuInboundGuidance

https://docs.developer.amazonservices.com/en_UK/fba_inbound/FBAInbound_Datatypes.html#SKUInboundGuidance

Parameters

  • mwsSkuInboundGuidance

Properties

parseSkuInboundGuidance

convert MWSSKUInboundGuidance to inboundGuidance

Parameters

  • mwsSkuInboundGuidance MWSSKUInboundGuidance

Returns inboundGuidance

MWSSKUInboundGuidanceList

Type: Array<MWSSKUInboundGuidance>

parseSkuInboundGuidanceList

convert MWSSKUInboundGuidanceList to inboundGuidance[]

Parameters

  • guidanceList MWSSkuInboundGuidanceList

Returns Array<inboundGuidance>

getMarketplaces

Parameters

  • api
  • marketplaceId string id of marketplace. should be same as hash index.
  • defaultCountryCode string country code for marketplace (US, CA, etc)
  • domainName string domain name used by customers to access this market (amazon.com, .ca, .mx)
  • defaultCurrencyCode string currency code (USD, CAD, etc)
  • defaultLanguageCode string Language setting (en_US, en_CA, etc)
  • sellerId string your seller ID in this marketplace
  • hasSellerSuspendedListings boolean true if there are seller suspended listings in this account on this market

parseMarketplaceData

Turn a mess of XML from ListMarketplaceParticipations into a @see MarketDetail

Parameters

  • marketplaceData any

mws-advanced

mws-advanced

reporting functions

listOrderItems

Parameters

  • api
  • orderId string Amazon Order ID
  • nextToken string Token to provide to ListOrderItemsByNextToken if needed (no token = no need)
  • orderItems Array Array of all the items in the order

transformIntsAndBools

Parameters

  • item
  • null-null orderItems array of OrderItem
  • null-null nextToken string for next token to provide to calls to ListOrderItemsByNextToken
  • null-null orderId string with the Amazon Order ID

transformIntsAndBools

Parameters

  • item

transformIntsAndBools

Parameters

  • item
  • null-null orderItems array of OrderItem
  • null-null nextToken string for next token to provide to calls to ListOrderItemsByNextToken
  • null-null orderId string with the Amazon Order ID

forceArray

Parameters

  • arr

removeFromString

remove a string pattern from a string

Parameters

  • str string string to remove pattern from
  • pattern (string | regex) pattern to remove

Returns string string with the pattern removed

transformAttributeSetKey

Special key transformer for transformObjectKeys to strip "ns2:" from the beginning of keys, such as 'ns2:ItemAttributes'

Parameters

  • k any

transformObjectKeys

Transforms an object, and it's keys. Use keyTransformer as a special key transformer function.

This is a rather complex function, which takes unintuitive JSON from XML conversion, and attempts to organize it in a more understandable fashion. It will convert internal objects such as: { "_": "4.20", "$": { "Units": "inches" } } to { "inches": "4.20" }

With the application of keyTransformer, you can also convert something like { "ns2:ManufacturerMinimumAge": { "_": "36", "$": { "Units": "months" } } } to a much more readable: { "manufacturerMinimumAge: { "months": "36" } },

Parameters

  • obj any
  • keyTransformer any (optional, default transformKey)

Returns any transformed object

objIndexedBy

Returns an object indexed by the given property name, with that property removed, otherwise identical to the original

Parameters

  • obj
  • name

reduceArrayIntoObjBy

Reduce an Array into a single Object, with each 'name' key of the array objects becoming the index in the array. ie, [ {asin: '12345', data: { ... }}, { asin: 'abcde', data: { ... } } ] becomes { 12345: { data }, abcde: { data } }

Parameters

  • arr
  • obj
  • name

getIdFromProductList

Parameters

  • productList
  • type string Type of Identifier used (asin, upc, ean, jan, etc)
  • id string Product Identifier string

getIdFromProductList

Determine the product id. GetMatchingProduct* and ListMatchingProducts return VERY similar results, but GetMatchingProduct includes a list of identifiers as $.IdType and $.Id. ListMatchingProduct does not return those, as you're not requesting a list of Ids.

Parameters

  • productList
  • product any information about a single product from MatchingProduct APIs

Returns ProductIdentifier

parseMatchingProduct

Parse MWS product info into Product[] (TODO: document Product[], it's quite a large potential result)

Parameters

  • productData any MWS product info

Returns Array<Product>

reformatOfferCount

Parameters

reformatOffer

Parameters

  • offer
  • subCondition string The subcondition of the item (New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other)
  • sellerFeedbackRating SellerFeedbackRating Information about the seller's feedback
  • shippingTime DetailedShippingTime Maximum time within which the item will likely be shipped
  • listingPrice Money The price of the item
  • points Points? The number of Amazon Points offered with the purchase of an item
  • shipping Money Cost of shipping
  • shipsFrom ShipsFrom? State and Country where item is shipped from
  • isFulfilledByAmazon boolean True if FBA, False if not
  • isBuyBoxWinner boolean? True if offer has buy box, False if not
  • isFeaturedMerchant boolean? True if seller is eligible for Buy Box, False if not
  • unknown string

reformatOffer

Parameters

reformatOffer

Parameters

reformatOffer

Parameters

reformatOffer

Parameters

  • offer
  • unknown string
  • subCondition string The subcondition of the item (New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other)
  • sellerFeedbackRating SellerFeedbackRating Information about the seller's feedback
  • shippingTime DetailedShippingTime Maximum time within which the item will likely be shipped
  • listingPrice Money The price of the item
  • points Points? The number of Amazon Points offered with the purchase of an item
  • shipping Money Cost of shipping
  • shipsFrom ShipsFrom? State and Country where item is shipped from
  • isFulfilledByAmazon boolean True if FBA, False if not
  • isBuyBoxWinner boolean? True if offer has buy box, False if not
  • isFeaturedMerchant boolean? True if seller is eligible for Buy Box, False if not

reformatLowestPrice

Parameters

  • lp
  • condition string
  • fulfillmentChannel string
  • landedPrice Money
  • listingPrice Money
  • shipping string

reformatBuyBoxPrice

Parameters

  • bb
  • condition string
  • landedPrice Money
  • listingPrice Money
  • shipping Money

reformatSummary

Parameters

  • summary
  • totalOfferCount number
  • numberOfOffers number
  • listPrice Money
  • lowestPrices Array<LowestPrice>
  • buyBoxPrices Array

parseLowestPricedOffers

Parameters

  • offerData
  • asin string asin returned by request
  • marketplace string marketplace asin is in
  • itemCondition string condition of item requested
  • summary OfferSummary -
  • offers Array<Offers> list of offers

getProductCategoriesForAsins

Parameters

  • api
  • sku string SKU that this category information belongs to
  • error object? This field is set when a server error is returned, see error.code and error.body for further info. Server Errors may be returned for invalid SKUs or other reasons.
  • Self productCategory? The product category that this SKU belongs to - if not present, may be an invalid ASIN
  • ProductCategoryId string The string or numeric-string category identifier for the category
  • ProductCategoryName string The string human readable description of the category
  • Parent productCategory? Parent product category. This will not be present if this category is the root.

getProductCategoriesForAsins

Parameters

  • api
  • asin string ASIN that this category information belongs to
  • error object? This field is set when a server error is returned, see error.code and error.body for further info. Server Errors may be returned for invalid ASINs or other reasons.
  • Self productCategory? The product category this ASIN belongs to - if not present, may be an invalid ASIN

getProductCategoriesForAsins

Parameters

  • api
  • ProductCategoryId string The string or numeric-string category identifier for the category
  • ProductCategoryName string The string human readable description of the category
  • Parent productCategory? Parent product category. This will not be present if this category is the root.
  • sku string SKU that this category information belongs to
  • error object? This field is set when a server error is returned, see error.code and error.body for further info. Server Errors may be returned for invalid SKUs or other reasons.
  • Self productCategory? The product category that this SKU belongs to - if not present, may be an invalid ASIN

estimateRequestParser

Parameters

  • estimates
  • feeType string The type of fee (ReferralFee, PerItemFee, VariableClosingFee, etc)
  • marketplaceId string MWS MarketplaceId to request item within
  • idType string type of identifier for item (ASIN, GCID, SellerSKU, UPC, EAN, ISBN, JAN)
  • idValue string identifier to use (see idType)
  • isAmazonFulfilled boolean true for FBA fees, false for Merchant Fulfilled fees
  • listingPrice Money currencyCode and amount for listing price
  • shipping Money currencyCode and amount for shipping price
  • points object pointsNumber: amazon points for purchase (Japan only?)
  • identifier string? identifier to attach to request. If not given, will be FBA.${idValue} for FBA requests or MF.${idValue} for MF requests

estimateRequestParser

Parameters

  • estimates
  • feeType string The type of fee (ReferralFee, PerItemFee, VariableClosingFee, etc)
  • feeAmount Money Base fee, currencyCode and amount
  • feePromotion Money Discounts applied to fee, currencyCode and amount
  • finalFee Money feeAmount minus feePromotion, currencyCode and amount

estimateRequestParser

Parameters

  • estimates
  • marketplaceId string MWS MarketplaceId to request item within
  • idType string type of identifier for item (ASIN, GCID, SellerSKU, UPC, EAN, ISBN, JAN)
  • idValue string identifier to use (see idType)
  • isAmazonFulfilled boolean true for FBA fees, false for Merchant Fulfilled fees
  • listingPrice Money currencyCode and amount for listing price
  • shipping Money currencyCode and amount for shipping price
  • points object pointsNumber: amazon points for purchase (Japan only?)
  • identifier string? identifier to attach to request. If not given, will be FBA.${idValue} for FBA requests or MF.${idValue} for MF requests

estimateRequestParser

Parameters

  • estimates
  • totalFees Money currencyCode and amount for total fees
  • time string ISO8601 time stamp format time the fee response was created
  • detail Array<FeeDetail> array of details about each of the fees that make up totalFees
  • identifier FeeIdentifier information about the EstimateRequest
  • status string "Success" for success or "ServerError" for request failure
  • error Error? If an Error occurred (success === "Failure"), a description of the Error

estimateRequestParser

Parameters

  • estimates
  • marketplaceId string MWS MarketplaceId requested
  • idType string type of identifier requested
  • sellerId string the seller identifier that requested the estimate
  • isAmazonFulfilled boolean true for FBA, false for Merchant Fulfilled
  • sellerInputIdentifier string identifier from EstimateRequest
  • idValue string the product idValue from EstimateRequest
  • priceToEstimateFees object Money values entered in as listingPrice and shipping to EstimateRequest
    • priceToEstimateFees.listingPrice Money listingPrice from EstimateRequest
    • priceToEstimateFees.shipping Money shipping from EstimateRequest
  • time string ISO8601 time stamp format time the fee response was created
  • detail Array<FeeDetail> array of details about each of the fees that make up totalFees
  • identifier FeeIdentifier information about the EstimateRequest
  • status string "Success" for success or "ServerError" for request failure
  • error Error? If an Error occurred (success === "Failure"), a description of the Error

writeFile

Promisified version of fs.writeFile We like to use Promises. writeFile does not come in a Promise variant, currently. Use util/promisify to make it work with Promises. This is better than using writeFileSync. Trust me. :-)

Parameters

  • fileName string path/filename to write to
  • contents (string | Buffer) what to write to file

requestReport

Parameters

  • api
  • ReportType string Type of Report Requested @see REQUEST_REPORT_TYPES
  • ReportProcessingStatus string Status of Report @see REPORT_PROCESSING_STATUS_TYPES
  • EndDate string ISO Date for Date Ending period
  • Scheduled boolean True if report is scheduled, false if immediate
  • ReportRequestId string Identifier to use with getReport to fetch the report when ready
  • SubmittedDate string ISO Date for Date request was submitted
  • StartDate string ISO Date for Date report begins at

reportRequestListParser

Parameters

  • out
  • ReportType string Type of Report Requested @see REQUEST_REPORT_TYPES
  • ReportProcessingStatus string Status of Report @see REPORT_PROCESSING_STATUS_TYPES
  • EndDate string ISO Date for Report End Period
  • Scheduled boolean True if report is scheduled, false if immediate
  • ReportRequestId string Identifier for the Report Request
  • StartedProcessingDate string ISO Date for time MWS started processing request
  • StartDate string ISO Date for Report Start Period
  • CompletedDate string ISO Date for time MWS completed processing request
  • GeneratedReportId string Identifier to use with getReport to retrieve the report

getReportListParser

TO DO: WRITE DOCUMENTATION

Parameters

  • out

manageReportScheduleParser

TO DO: WRITE DOCUMENTATION

Parameters

  • out

getReportScheduleListParser

TO DO: WRITE DOCUMENTATION

Parameters

  • out

updateReportAcknowledgementsParser

TO DO: WRITE DOCUMENTATION

Parameters

  • out