UNPKG

@scaleleap/selling-partner-api-sdk

Version:

📦 A fully typed TypeScript and Node.js SDK library for Amazon Selling Partner API

551 lines • 56.2 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Selling Partner API for Pricing * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products. * * The version of the OpenAPI document: v0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ProductPricingApi = exports.ProductPricingApiFactory = exports.ProductPricingApiFp = exports.ProductPricingApiAxiosParamCreator = exports.QuantityDiscountType = exports.OfferCustomerType = exports.ItemCondition = exports.HttpMethod = exports.FulfillmentChannelType = exports.DetailedShippingTimeTypeAvailabilityTypeEnum = exports.CustomerType = exports.ConditionType = void 0; const axios_1 = __importDefault(require("axios")); // Some imports not used depending on template conditions // @ts-ignore const common_1 = require("./common"); // @ts-ignore const base_1 = require("./base"); /** * Indicates the condition of the item. Possible values: New, Used, Collectible, Refurbished, Club. * @export * @enum {string} */ var ConditionType; (function (ConditionType) { ConditionType["New"] = "New"; ConditionType["Used"] = "Used"; ConditionType["Collectible"] = "Collectible"; ConditionType["Refurbished"] = "Refurbished"; ConditionType["Club"] = "Club"; })(ConditionType || (exports.ConditionType = ConditionType = {})); /** * Indicates whether to request Consumer or Business offers. Default is Consumer. * @export * @enum {string} */ var CustomerType; (function (CustomerType) { CustomerType["Consumer"] = "Consumer"; CustomerType["Business"] = "Business"; })(CustomerType || (exports.CustomerType = CustomerType = {})); /** * @export * @enum {string} */ var DetailedShippingTimeTypeAvailabilityTypeEnum; (function (DetailedShippingTimeTypeAvailabilityTypeEnum) { DetailedShippingTimeTypeAvailabilityTypeEnum["Now"] = "NOW"; DetailedShippingTimeTypeAvailabilityTypeEnum["FutureWithoutDate"] = "FUTURE_WITHOUT_DATE"; DetailedShippingTimeTypeAvailabilityTypeEnum["FutureWithDate"] = "FUTURE_WITH_DATE"; })(DetailedShippingTimeTypeAvailabilityTypeEnum || (exports.DetailedShippingTimeTypeAvailabilityTypeEnum = DetailedShippingTimeTypeAvailabilityTypeEnum = {})); /** * Indicates whether the item is fulfilled by Amazon or by the seller (merchant). * @export * @enum {string} */ var FulfillmentChannelType; (function (FulfillmentChannelType) { FulfillmentChannelType["Amazon"] = "Amazon"; FulfillmentChannelType["Merchant"] = "Merchant"; })(FulfillmentChannelType || (exports.FulfillmentChannelType = FulfillmentChannelType = {})); /** * The HTTP method associated with the individual APIs being called as part of the batch request. * @export * @enum {string} */ var HttpMethod; (function (HttpMethod) { HttpMethod["Get"] = "GET"; HttpMethod["Put"] = "PUT"; HttpMethod["Patch"] = "PATCH"; HttpMethod["Delete"] = "DELETE"; HttpMethod["Post"] = "POST"; })(HttpMethod || (exports.HttpMethod = HttpMethod = {})); /** * Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. * @export * @enum {string} */ var ItemCondition; (function (ItemCondition) { ItemCondition["New"] = "New"; ItemCondition["Used"] = "Used"; ItemCondition["Collectible"] = "Collectible"; ItemCondition["Refurbished"] = "Refurbished"; ItemCondition["Club"] = "Club"; })(ItemCondition || (exports.ItemCondition = ItemCondition = {})); /** * * @export * @enum {string} */ var OfferCustomerType; (function (OfferCustomerType) { OfferCustomerType["B2C"] = "B2C"; OfferCustomerType["B2B"] = "B2B"; })(OfferCustomerType || (exports.OfferCustomerType = OfferCustomerType = {})); /** * * @export * @enum {string} */ var QuantityDiscountType; (function (QuantityDiscountType) { QuantityDiscountType["QuantityDiscount"] = "QUANTITY_DISCOUNT"; })(QuantityDiscountType || (exports.QuantityDiscountType = QuantityDiscountType = {})); /** * ProductPricingApi - axios parameter creator * @export */ const ProductPricingApiAxiosParamCreator = function (configuration) { return { /** * Returns competitive pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. * @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. * @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCompetitivePricing: async (marketplaceId, itemType, asins, skus, customerType, options = {}) => { // verify required parameter 'marketplaceId' is not null or undefined (0, common_1.assertParamExists)('getCompetitivePricing', 'marketplaceId', marketplaceId); // verify required parameter 'itemType' is not null or undefined (0, common_1.assertParamExists)('getCompetitivePricing', 'itemType', itemType); const localVarPath = `/products/pricing/v0/competitivePrice`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (marketplaceId !== undefined) { localVarQueryParameter['MarketplaceId'] = marketplaceId; } if (asins) { localVarQueryParameter['Asins'] = asins.join(base_1.COLLECTION_FORMATS.csv); } if (skus) { localVarQueryParameter['Skus'] = skus.join(base_1.COLLECTION_FORMATS.csv); } if (itemType !== undefined) { localVarQueryParameter['ItemType'] = itemType; } if (customerType !== undefined) { localVarQueryParameter['CustomerType'] = customerType; } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getItemOffers: async (marketplaceId, itemCondition, asin, customerType, options = {}) => { // verify required parameter 'marketplaceId' is not null or undefined (0, common_1.assertParamExists)('getItemOffers', 'marketplaceId', marketplaceId); // verify required parameter 'itemCondition' is not null or undefined (0, common_1.assertParamExists)('getItemOffers', 'itemCondition', itemCondition); // verify required parameter 'asin' is not null or undefined (0, common_1.assertParamExists)('getItemOffers', 'asin', asin); const localVarPath = `/products/pricing/v0/items/{Asin}/offers` .replace(`{${"Asin"}}`, encodeURIComponent(String(asin))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (marketplaceId !== undefined) { localVarQueryParameter['MarketplaceId'] = marketplaceId; } if (itemCondition !== undefined) { localVarQueryParameter['ItemCondition'] = itemCondition; } if (customerType !== undefined) { localVarQueryParameter['CustomerType'] = customerType; } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the lowest priced offers for a batch of items based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {GetItemOffersBatchRequest} getItemOffersBatchRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ getItemOffersBatch: async (getItemOffersBatchRequestBody, options = {}) => { // verify required parameter 'getItemOffersBatchRequestBody' is not null or undefined (0, common_1.assertParamExists)('getItemOffersBatch', 'getItemOffersBatchRequestBody', getItemOffersBatchRequestBody); const localVarPath = `/batches/products/pricing/v0/itemOffers`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(getItemOffersBatchRequestBody, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the lowest priced offers for a single SKU listing. **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. * @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\&#39;s SellerId, which is included with every operation that you submit. * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getListingOffers: async (marketplaceId, itemCondition, sellerSKU, customerType, options = {}) => { // verify required parameter 'marketplaceId' is not null or undefined (0, common_1.assertParamExists)('getListingOffers', 'marketplaceId', marketplaceId); // verify required parameter 'itemCondition' is not null or undefined (0, common_1.assertParamExists)('getListingOffers', 'itemCondition', itemCondition); // verify required parameter 'sellerSKU' is not null or undefined (0, common_1.assertParamExists)('getListingOffers', 'sellerSKU', sellerSKU); const localVarPath = `/products/pricing/v0/listings/{SellerSKU}/offers` .replace(`{${"SellerSKU"}}`, encodeURIComponent(String(sellerSKU))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (marketplaceId !== undefined) { localVarQueryParameter['MarketplaceId'] = marketplaceId; } if (itemCondition !== undefined) { localVarQueryParameter['ItemCondition'] = itemCondition; } if (customerType !== undefined) { localVarQueryParameter['CustomerType'] = customerType; } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the lowest priced offers for a batch of listings by SKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {GetListingOffersBatchRequest} getListingOffersBatchRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ getListingOffersBatch: async (getListingOffersBatchRequestBody, options = {}) => { // verify required parameter 'getListingOffersBatchRequestBody' is not null or undefined (0, common_1.assertParamExists)('getListingOffersBatch', 'getListingOffersBatchRequestBody', getListingOffersBatchRequestBody); const localVarPath = `/batches/products/pricing/v0/listingOffers`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(getListingOffersBatchRequestBody, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. * @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. * @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. * @param {'B2C' | 'B2B'} [offerType] Indicates whether to request pricing information for the seller\&#39;s B2C or B2B offers. Default is B2C. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPricing: async (marketplaceId, itemType, asins, skus, itemCondition, offerType, options = {}) => { // verify required parameter 'marketplaceId' is not null or undefined (0, common_1.assertParamExists)('getPricing', 'marketplaceId', marketplaceId); // verify required parameter 'itemType' is not null or undefined (0, common_1.assertParamExists)('getPricing', 'itemType', itemType); const localVarPath = `/products/pricing/v0/price`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (marketplaceId !== undefined) { localVarQueryParameter['MarketplaceId'] = marketplaceId; } if (asins) { localVarQueryParameter['Asins'] = asins.join(base_1.COLLECTION_FORMATS.csv); } if (skus) { localVarQueryParameter['Skus'] = skus.join(base_1.COLLECTION_FORMATS.csv); } if (itemType !== undefined) { localVarQueryParameter['ItemType'] = itemType; } if (itemCondition !== undefined) { localVarQueryParameter['ItemCondition'] = itemCondition; } if (offerType !== undefined) { localVarQueryParameter['OfferType'] = offerType; } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.ProductPricingApiAxiosParamCreator = ProductPricingApiAxiosParamCreator; /** * ProductPricingApi - functional programming interface * @export */ const ProductPricingApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.ProductPricingApiAxiosParamCreator)(configuration); return { /** * Returns competitive pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. * @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. * @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCompetitivePricing(marketplaceId, itemType, asins, skus, customerType, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getCompetitivePricing(marketplaceId, itemType, asins, skus, customerType, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getItemOffers(marketplaceId, itemCondition, asin, customerType, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getItemOffers(marketplaceId, itemCondition, asin, customerType, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns the lowest priced offers for a batch of items based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {GetItemOffersBatchRequest} getItemOffersBatchRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getItemOffersBatch(getItemOffersBatchRequestBody, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getItemOffersBatch(getItemOffersBatchRequestBody, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns the lowest priced offers for a single SKU listing. **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. * @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\&#39;s SellerId, which is included with every operation that you submit. * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getListingOffers(marketplaceId, itemCondition, sellerSKU, customerType, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getListingOffers(marketplaceId, itemCondition, sellerSKU, customerType, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns the lowest priced offers for a batch of listings by SKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {GetListingOffersBatchRequest} getListingOffersBatchRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getListingOffersBatch(getListingOffersBatchRequestBody, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getListingOffersBatch(getListingOffersBatchRequestBody, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. * @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. * @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. * @param {'B2C' | 'B2B'} [offerType] Indicates whether to request pricing information for the seller\&#39;s B2C or B2B offers. Default is B2C. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getPricing(marketplaceId, itemType, asins, skus, itemCondition, offerType, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getPricing(marketplaceId, itemType, asins, skus, itemCondition, offerType, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; exports.ProductPricingApiFp = ProductPricingApiFp; /** * ProductPricingApi - factory interface * @export */ const ProductPricingApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.ProductPricingApiFp)(configuration); return { /** * Returns competitive pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. * @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. * @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCompetitivePricing(marketplaceId, itemType, asins, skus, customerType, options) { return localVarFp.getCompetitivePricing(marketplaceId, itemType, asins, skus, customerType, options).then((request) => request(axios, basePath)); }, /** * Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getItemOffers(marketplaceId, itemCondition, asin, customerType, options) { return localVarFp.getItemOffers(marketplaceId, itemCondition, asin, customerType, options).then((request) => request(axios, basePath)); }, /** * Returns the lowest priced offers for a batch of items based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {GetItemOffersBatchRequest} getItemOffersBatchRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ getItemOffersBatch(getItemOffersBatchRequestBody, options) { return localVarFp.getItemOffersBatch(getItemOffersBatchRequestBody, options).then((request) => request(axios, basePath)); }, /** * Returns the lowest priced offers for a single SKU listing. **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. * @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\&#39;s SellerId, which is included with every operation that you submit. * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getListingOffers(marketplaceId, itemCondition, sellerSKU, customerType, options) { return localVarFp.getListingOffers(marketplaceId, itemCondition, sellerSKU, customerType, options).then((request) => request(axios, basePath)); }, /** * Returns the lowest priced offers for a batch of listings by SKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {GetListingOffersBatchRequest} getListingOffersBatchRequestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ getListingOffersBatch(getListingOffersBatchRequestBody, options) { return localVarFp.getListingOffersBatch(getListingOffersBatchRequestBody, options).then((request) => request(axios, basePath)); }, /** * Returns pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. * @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. * @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. * @param {'B2C' | 'B2B'} [offerType] Indicates whether to request pricing information for the seller\&#39;s B2C or B2B offers. Default is B2C. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPricing(marketplaceId, itemType, asins, skus, itemCondition, offerType, options) { return localVarFp.getPricing(marketplaceId, itemType, asins, skus, itemCondition, offerType, options).then((request) => request(axios, basePath)); }, }; }; exports.ProductPricingApiFactory = ProductPricingApiFactory; /** * ProductPricingApi - object-oriented interface * @export * @class ProductPricingApi * @extends {BaseAPI} */ class ProductPricingApi extends base_1.BaseAPI { /** * Returns competitive pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {ProductPricingApiGetCompetitivePricingRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProductPricingApi */ getCompetitivePricing(requestParameters, options) { return (0, exports.ProductPricingApiFp)(this.configuration).getCompetitivePricing(requestParameters.marketplaceId, requestParameters.itemType, requestParameters.asins, requestParameters.skus, requestParameters.customerType, options).then((request) => request(this.axios, this.basePath)); } /** * Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose busi