@sp-api-sdk/product-pricing-api-v0 2.0.7 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/api-model/api/product-pricing-api.js +109 -25
- package/dist/cjs/src/api-model/base.js +7 -2
- package/dist/cjs/src/api-model/common.js +1 -1
- package/dist/cjs/src/api-model/configuration.js +8 -0
- package/dist/es/src/api-model/api/product-pricing-api.js +109 -25
- package/dist/es/src/api-model/base.js +6 -1
- package/dist/es/src/api-model/common.js +1 -1
- package/dist/es/src/api-model/configuration.js +8 -0
- package/dist/types/src/api-model/api/product-pricing-api.d.ts +140 -59
- package/dist/types/src/api-model/base.d.ts +14 -2
- package/dist/types/src/api-model/configuration.d.ts +8 -0
- package/dist/types/src/api-model/models/batch-offers-request-params.d.ts +2 -2
- package/dist/types/src/api-model/models/batch-offers-response.d.ts +3 -3
- package/dist/types/src/api-model/models/batch-request.d.ts +1 -1
- package/dist/types/src/api-model/models/buy-box-price-type.d.ts +4 -4
- package/dist/types/src/api-model/models/competitive-price-type.d.ts +3 -3
- package/dist/types/src/api-model/models/competitive-pricing-type.d.ts +3 -3
- package/dist/types/src/api-model/models/get-item-offers-batch-request.d.ts +1 -1
- package/dist/types/src/api-model/models/get-item-offers-batch-response.d.ts +1 -1
- package/dist/types/src/api-model/models/get-listing-offers-batch-request.d.ts +1 -1
- package/dist/types/src/api-model/models/get-listing-offers-batch-response.d.ts +1 -1
- package/dist/types/src/api-model/models/get-offers-response.d.ts +1 -1
- package/dist/types/src/api-model/models/get-offers-result.d.ts +4 -4
- package/dist/types/src/api-model/models/get-pricing-response.d.ts +1 -1
- package/dist/types/src/api-model/models/identifier-type.d.ts +2 -2
- package/dist/types/src/api-model/models/item-identifier.d.ts +1 -1
- package/dist/types/src/api-model/models/item-offers-request-params.d.ts +2 -2
- package/dist/types/src/api-model/models/item-offers-request.d.ts +2 -2
- package/dist/types/src/api-model/models/item-offers-response-all-of.d.ts +1 -1
- package/dist/types/src/api-model/models/item-offers-response.d.ts +2 -2
- package/dist/types/src/api-model/models/listing-offers-request-params.d.ts +2 -2
- package/dist/types/src/api-model/models/listing-offers-request.d.ts +2 -2
- package/dist/types/src/api-model/models/listing-offers-response-all-of.d.ts +1 -1
- package/dist/types/src/api-model/models/listing-offers-response.d.ts +2 -2
- package/dist/types/src/api-model/models/lowest-price-type.d.ts +4 -4
- package/dist/types/src/api-model/models/offer-count-type.d.ts +1 -1
- package/dist/types/src/api-model/models/offer-detail.d.ts +8 -8
- package/dist/types/src/api-model/models/offer-type.d.ts +4 -4
- package/dist/types/src/api-model/models/points.d.ts +1 -1
- package/dist/types/src/api-model/models/price-type.d.ts +2 -2
- package/dist/types/src/api-model/models/price.d.ts +1 -1
- package/dist/types/src/api-model/models/product.d.ts +4 -4
- package/dist/types/src/api-model/models/quantity-discount-price-type.d.ts +2 -2
- package/dist/types/src/api-model/models/summary.d.ts +5 -5
- package/package.json +4 -4
|
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.ProductPricingApi = exports.ProductPricingApiFactory = exports.ProductPricingApiFp = exports.ProductPricingApiAxiosParamCreator = void 0;
|
|
19
|
+
exports.GetPricingOfferTypeEnum = exports.GetPricingItemConditionEnum = exports.GetPricingItemTypeEnum = exports.GetListingOffersCustomerTypeEnum = exports.GetListingOffersItemConditionEnum = exports.GetItemOffersCustomerTypeEnum = exports.GetItemOffersItemConditionEnum = exports.GetCompetitivePricingCustomerTypeEnum = exports.GetCompetitivePricingItemTypeEnum = exports.ProductPricingApi = exports.ProductPricingApiFactory = exports.ProductPricingApiFp = exports.ProductPricingApiAxiosParamCreator = void 0;
|
|
20
20
|
const axios_1 = __importDefault(require("axios"));
|
|
21
21
|
// Some imports not used depending on template conditions
|
|
22
22
|
// @ts-ignore
|
|
@@ -32,10 +32,10 @@ const ProductPricingApiAxiosParamCreator = function (configuration) {
|
|
|
32
32
|
/**
|
|
33
33
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
34
34
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
35
|
-
* @param {
|
|
35
|
+
* @param {GetCompetitivePricingItemTypeEnum} 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.
|
|
36
36
|
* @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
|
|
37
37
|
* @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
|
|
38
|
-
* @param {
|
|
38
|
+
* @param {GetCompetitivePricingCustomerTypeEnum} [customerType] Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
|
|
39
39
|
* @param {*} [options] Override http request option.
|
|
40
40
|
* @throws {RequiredError}
|
|
41
41
|
*/
|
|
@@ -80,9 +80,9 @@ const ProductPricingApiAxiosParamCreator = function (configuration) {
|
|
|
80
80
|
/**
|
|
81
81
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
82
82
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
83
|
-
* @param {
|
|
83
|
+
* @param {GetItemOffersItemConditionEnum} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
|
84
84
|
* @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
|
|
85
|
-
* @param {
|
|
85
|
+
* @param {GetItemOffersCustomerTypeEnum} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
|
|
86
86
|
* @param {*} [options] Override http request option.
|
|
87
87
|
* @throws {RequiredError}
|
|
88
88
|
*/
|
|
@@ -153,9 +153,9 @@ const ProductPricingApiAxiosParamCreator = function (configuration) {
|
|
|
153
153
|
/**
|
|
154
154
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
155
155
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
156
|
-
* @param {
|
|
156
|
+
* @param {GetListingOffersItemConditionEnum} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
|
157
157
|
* @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit.
|
|
158
|
-
* @param {
|
|
158
|
+
* @param {GetListingOffersCustomerTypeEnum} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
|
|
159
159
|
* @param {*} [options] Override http request option.
|
|
160
160
|
* @throws {RequiredError}
|
|
161
161
|
*/
|
|
@@ -226,11 +226,11 @@ const ProductPricingApiAxiosParamCreator = function (configuration) {
|
|
|
226
226
|
/**
|
|
227
227
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
228
228
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
229
|
-
* @param {
|
|
229
|
+
* @param {GetPricingItemTypeEnum} 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.
|
|
230
230
|
* @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
|
|
231
231
|
* @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
|
|
232
|
-
* @param {
|
|
233
|
-
* @param {
|
|
232
|
+
* @param {GetPricingItemConditionEnum} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
|
233
|
+
* @param {GetPricingOfferTypeEnum} [offerType] Indicates whether to request pricing information for the seller\'s B2C or B2B offers. Default is B2C.
|
|
234
234
|
* @param {*} [options] Override http request option.
|
|
235
235
|
* @throws {RequiredError}
|
|
236
236
|
*/
|
|
@@ -288,29 +288,33 @@ const ProductPricingApiFp = function (configuration) {
|
|
|
288
288
|
/**
|
|
289
289
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
290
290
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
291
|
-
* @param {
|
|
291
|
+
* @param {GetCompetitivePricingItemTypeEnum} 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.
|
|
292
292
|
* @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
|
|
293
293
|
* @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
|
|
294
|
-
* @param {
|
|
294
|
+
* @param {GetCompetitivePricingCustomerTypeEnum} [customerType] Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
|
|
295
295
|
* @param {*} [options] Override http request option.
|
|
296
296
|
* @throws {RequiredError}
|
|
297
297
|
*/
|
|
298
298
|
async getCompetitivePricing(marketplaceId, itemType, asins, skus, customerType, options) {
|
|
299
299
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getCompetitivePricing(marketplaceId, itemType, asins, skus, customerType, options);
|
|
300
|
-
|
|
300
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
301
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['ProductPricingApi.getCompetitivePricing']?.[localVarOperationServerIndex]?.url;
|
|
302
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
301
303
|
},
|
|
302
304
|
/**
|
|
303
305
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
304
306
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
305
|
-
* @param {
|
|
307
|
+
* @param {GetItemOffersItemConditionEnum} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
|
306
308
|
* @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
|
|
307
|
-
* @param {
|
|
309
|
+
* @param {GetItemOffersCustomerTypeEnum} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
|
|
308
310
|
* @param {*} [options] Override http request option.
|
|
309
311
|
* @throws {RequiredError}
|
|
310
312
|
*/
|
|
311
313
|
async getItemOffers(marketplaceId, itemCondition, asin, customerType, options) {
|
|
312
314
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getItemOffers(marketplaceId, itemCondition, asin, customerType, options);
|
|
313
|
-
|
|
315
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
316
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['ProductPricingApi.getItemOffers']?.[localVarOperationServerIndex]?.url;
|
|
317
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
314
318
|
},
|
|
315
319
|
/**
|
|
316
320
|
* 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).
|
|
@@ -320,20 +324,24 @@ const ProductPricingApiFp = function (configuration) {
|
|
|
320
324
|
*/
|
|
321
325
|
async getItemOffersBatch(getItemOffersBatchRequestBody, options) {
|
|
322
326
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getItemOffersBatch(getItemOffersBatchRequestBody, options);
|
|
323
|
-
|
|
327
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
328
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['ProductPricingApi.getItemOffersBatch']?.[localVarOperationServerIndex]?.url;
|
|
329
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
324
330
|
},
|
|
325
331
|
/**
|
|
326
332
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
327
333
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
328
|
-
* @param {
|
|
334
|
+
* @param {GetListingOffersItemConditionEnum} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
|
329
335
|
* @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit.
|
|
330
|
-
* @param {
|
|
336
|
+
* @param {GetListingOffersCustomerTypeEnum} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
|
|
331
337
|
* @param {*} [options] Override http request option.
|
|
332
338
|
* @throws {RequiredError}
|
|
333
339
|
*/
|
|
334
340
|
async getListingOffers(marketplaceId, itemCondition, sellerSKU, customerType, options) {
|
|
335
341
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getListingOffers(marketplaceId, itemCondition, sellerSKU, customerType, options);
|
|
336
|
-
|
|
342
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
343
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['ProductPricingApi.getListingOffers']?.[localVarOperationServerIndex]?.url;
|
|
344
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
337
345
|
},
|
|
338
346
|
/**
|
|
339
347
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
@@ -343,22 +351,26 @@ const ProductPricingApiFp = function (configuration) {
|
|
|
343
351
|
*/
|
|
344
352
|
async getListingOffersBatch(getListingOffersBatchRequestBody, options) {
|
|
345
353
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getListingOffersBatch(getListingOffersBatchRequestBody, options);
|
|
346
|
-
|
|
354
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
355
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['ProductPricingApi.getListingOffersBatch']?.[localVarOperationServerIndex]?.url;
|
|
356
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
347
357
|
},
|
|
348
358
|
/**
|
|
349
359
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
350
360
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
351
|
-
* @param {
|
|
361
|
+
* @param {GetPricingItemTypeEnum} 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.
|
|
352
362
|
* @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
|
|
353
363
|
* @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
|
|
354
|
-
* @param {
|
|
355
|
-
* @param {
|
|
364
|
+
* @param {GetPricingItemConditionEnum} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
|
365
|
+
* @param {GetPricingOfferTypeEnum} [offerType] Indicates whether to request pricing information for the seller\'s B2C or B2B offers. Default is B2C.
|
|
356
366
|
* @param {*} [options] Override http request option.
|
|
357
367
|
* @throws {RequiredError}
|
|
358
368
|
*/
|
|
359
369
|
async getPricing(marketplaceId, itemType, asins, skus, itemCondition, offerType, options) {
|
|
360
370
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getPricing(marketplaceId, itemType, asins, skus, itemCondition, offerType, options);
|
|
361
|
-
|
|
371
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
372
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['ProductPricingApi.getPricing']?.[localVarOperationServerIndex]?.url;
|
|
373
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
362
374
|
},
|
|
363
375
|
};
|
|
364
376
|
};
|
|
@@ -496,3 +508,75 @@ class ProductPricingApi extends base_1.BaseAPI {
|
|
|
496
508
|
}
|
|
497
509
|
}
|
|
498
510
|
exports.ProductPricingApi = ProductPricingApi;
|
|
511
|
+
/**
|
|
512
|
+
* @export
|
|
513
|
+
*/
|
|
514
|
+
exports.GetCompetitivePricingItemTypeEnum = {
|
|
515
|
+
Asin: 'Asin',
|
|
516
|
+
Sku: 'Sku'
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* @export
|
|
520
|
+
*/
|
|
521
|
+
exports.GetCompetitivePricingCustomerTypeEnum = {
|
|
522
|
+
Consumer: 'Consumer',
|
|
523
|
+
Business: 'Business'
|
|
524
|
+
};
|
|
525
|
+
/**
|
|
526
|
+
* @export
|
|
527
|
+
*/
|
|
528
|
+
exports.GetItemOffersItemConditionEnum = {
|
|
529
|
+
New: 'New',
|
|
530
|
+
Used: 'Used',
|
|
531
|
+
Collectible: 'Collectible',
|
|
532
|
+
Refurbished: 'Refurbished',
|
|
533
|
+
Club: 'Club'
|
|
534
|
+
};
|
|
535
|
+
/**
|
|
536
|
+
* @export
|
|
537
|
+
*/
|
|
538
|
+
exports.GetItemOffersCustomerTypeEnum = {
|
|
539
|
+
Consumer: 'Consumer',
|
|
540
|
+
Business: 'Business'
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* @export
|
|
544
|
+
*/
|
|
545
|
+
exports.GetListingOffersItemConditionEnum = {
|
|
546
|
+
New: 'New',
|
|
547
|
+
Used: 'Used',
|
|
548
|
+
Collectible: 'Collectible',
|
|
549
|
+
Refurbished: 'Refurbished',
|
|
550
|
+
Club: 'Club'
|
|
551
|
+
};
|
|
552
|
+
/**
|
|
553
|
+
* @export
|
|
554
|
+
*/
|
|
555
|
+
exports.GetListingOffersCustomerTypeEnum = {
|
|
556
|
+
Consumer: 'Consumer',
|
|
557
|
+
Business: 'Business'
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* @export
|
|
561
|
+
*/
|
|
562
|
+
exports.GetPricingItemTypeEnum = {
|
|
563
|
+
Asin: 'Asin',
|
|
564
|
+
Sku: 'Sku'
|
|
565
|
+
};
|
|
566
|
+
/**
|
|
567
|
+
* @export
|
|
568
|
+
*/
|
|
569
|
+
exports.GetPricingItemConditionEnum = {
|
|
570
|
+
New: 'New',
|
|
571
|
+
Used: 'Used',
|
|
572
|
+
Collectible: 'Collectible',
|
|
573
|
+
Refurbished: 'Refurbished',
|
|
574
|
+
Club: 'Club'
|
|
575
|
+
};
|
|
576
|
+
/**
|
|
577
|
+
* @export
|
|
578
|
+
*/
|
|
579
|
+
exports.GetPricingOfferTypeEnum = {
|
|
580
|
+
B2C: 'B2C',
|
|
581
|
+
B2B: 'B2B'
|
|
582
|
+
};
|
|
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
19
|
+
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
20
20
|
const axios_1 = __importDefault(require("axios"));
|
|
21
21
|
exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
22
22
|
/**
|
|
@@ -43,7 +43,7 @@ class BaseAPI {
|
|
|
43
43
|
this.axios = axios;
|
|
44
44
|
if (configuration) {
|
|
45
45
|
this.configuration = configuration;
|
|
46
|
-
this.basePath = configuration.basePath
|
|
46
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -64,3 +64,8 @@ class RequiredError extends Error {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
exports.RequiredError = RequiredError;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @export
|
|
70
|
+
*/
|
|
71
|
+
exports.operationServerMap = {};
|
|
@@ -138,7 +138,7 @@ exports.toPathString = toPathString;
|
|
|
138
138
|
*/
|
|
139
139
|
const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
140
140
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
141
|
-
const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath
|
|
141
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
142
142
|
return axios.request(axiosRequestArgs);
|
|
143
143
|
};
|
|
144
144
|
};
|
|
@@ -49,6 +49,13 @@ class Configuration {
|
|
|
49
49
|
* @memberof Configuration
|
|
50
50
|
*/
|
|
51
51
|
basePath;
|
|
52
|
+
/**
|
|
53
|
+
* override server index
|
|
54
|
+
*
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof Configuration
|
|
57
|
+
*/
|
|
58
|
+
serverIndex;
|
|
52
59
|
/**
|
|
53
60
|
* base options for axios calls
|
|
54
61
|
*
|
|
@@ -70,6 +77,7 @@ class Configuration {
|
|
|
70
77
|
this.password = param.password;
|
|
71
78
|
this.accessToken = param.accessToken;
|
|
72
79
|
this.basePath = param.basePath;
|
|
80
|
+
this.serverIndex = param.serverIndex;
|
|
73
81
|
this.baseOptions = param.baseOptions;
|
|
74
82
|
this.formDataCtor = param.formDataCtor;
|
|
75
83
|
}
|
|
@@ -16,7 +16,7 @@ import globalAxios from 'axios';
|
|
|
16
16
|
// @ts-ignore
|
|
17
17
|
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
18
18
|
// @ts-ignore
|
|
19
|
-
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI } from '../base';
|
|
19
|
+
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from '../base';
|
|
20
20
|
/**
|
|
21
21
|
* ProductPricingApi - axios parameter creator
|
|
22
22
|
* @export
|
|
@@ -26,10 +26,10 @@ export const ProductPricingApiAxiosParamCreator = function (configuration) {
|
|
|
26
26
|
/**
|
|
27
27
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
28
28
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
29
|
-
* @param {
|
|
29
|
+
* @param {GetCompetitivePricingItemTypeEnum} 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.
|
|
30
30
|
* @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
|
|
31
31
|
* @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
|
|
32
|
-
* @param {
|
|
32
|
+
* @param {GetCompetitivePricingCustomerTypeEnum} [customerType] Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
|
|
33
33
|
* @param {*} [options] Override http request option.
|
|
34
34
|
* @throws {RequiredError}
|
|
35
35
|
*/
|
|
@@ -74,9 +74,9 @@ export const ProductPricingApiAxiosParamCreator = function (configuration) {
|
|
|
74
74
|
/**
|
|
75
75
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
76
76
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
77
|
-
* @param {
|
|
77
|
+
* @param {GetItemOffersItemConditionEnum} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
|
78
78
|
* @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
|
|
79
|
-
* @param {
|
|
79
|
+
* @param {GetItemOffersCustomerTypeEnum} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
|
|
80
80
|
* @param {*} [options] Override http request option.
|
|
81
81
|
* @throws {RequiredError}
|
|
82
82
|
*/
|
|
@@ -147,9 +147,9 @@ export const ProductPricingApiAxiosParamCreator = function (configuration) {
|
|
|
147
147
|
/**
|
|
148
148
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
149
149
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
150
|
-
* @param {
|
|
150
|
+
* @param {GetListingOffersItemConditionEnum} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
|
151
151
|
* @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit.
|
|
152
|
-
* @param {
|
|
152
|
+
* @param {GetListingOffersCustomerTypeEnum} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
|
|
153
153
|
* @param {*} [options] Override http request option.
|
|
154
154
|
* @throws {RequiredError}
|
|
155
155
|
*/
|
|
@@ -220,11 +220,11 @@ export const ProductPricingApiAxiosParamCreator = function (configuration) {
|
|
|
220
220
|
/**
|
|
221
221
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
222
222
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
223
|
-
* @param {
|
|
223
|
+
* @param {GetPricingItemTypeEnum} 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.
|
|
224
224
|
* @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
|
|
225
225
|
* @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
|
|
226
|
-
* @param {
|
|
227
|
-
* @param {
|
|
226
|
+
* @param {GetPricingItemConditionEnum} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
|
227
|
+
* @param {GetPricingOfferTypeEnum} [offerType] Indicates whether to request pricing information for the seller\'s B2C or B2B offers. Default is B2C.
|
|
228
228
|
* @param {*} [options] Override http request option.
|
|
229
229
|
* @throws {RequiredError}
|
|
230
230
|
*/
|
|
@@ -281,29 +281,33 @@ export const ProductPricingApiFp = function (configuration) {
|
|
|
281
281
|
/**
|
|
282
282
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
283
283
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
284
|
-
* @param {
|
|
284
|
+
* @param {GetCompetitivePricingItemTypeEnum} 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.
|
|
285
285
|
* @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
|
|
286
286
|
* @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
|
|
287
|
-
* @param {
|
|
287
|
+
* @param {GetCompetitivePricingCustomerTypeEnum} [customerType] Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
|
|
288
288
|
* @param {*} [options] Override http request option.
|
|
289
289
|
* @throws {RequiredError}
|
|
290
290
|
*/
|
|
291
291
|
async getCompetitivePricing(marketplaceId, itemType, asins, skus, customerType, options) {
|
|
292
292
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getCompetitivePricing(marketplaceId, itemType, asins, skus, customerType, options);
|
|
293
|
-
|
|
293
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
294
|
+
const localVarOperationServerBasePath = operationServerMap['ProductPricingApi.getCompetitivePricing']?.[localVarOperationServerIndex]?.url;
|
|
295
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
294
296
|
},
|
|
295
297
|
/**
|
|
296
298
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
297
299
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
298
|
-
* @param {
|
|
300
|
+
* @param {GetItemOffersItemConditionEnum} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
|
299
301
|
* @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
|
|
300
|
-
* @param {
|
|
302
|
+
* @param {GetItemOffersCustomerTypeEnum} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
|
|
301
303
|
* @param {*} [options] Override http request option.
|
|
302
304
|
* @throws {RequiredError}
|
|
303
305
|
*/
|
|
304
306
|
async getItemOffers(marketplaceId, itemCondition, asin, customerType, options) {
|
|
305
307
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getItemOffers(marketplaceId, itemCondition, asin, customerType, options);
|
|
306
|
-
|
|
308
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
309
|
+
const localVarOperationServerBasePath = operationServerMap['ProductPricingApi.getItemOffers']?.[localVarOperationServerIndex]?.url;
|
|
310
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
307
311
|
},
|
|
308
312
|
/**
|
|
309
313
|
* 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).
|
|
@@ -313,20 +317,24 @@ export const ProductPricingApiFp = function (configuration) {
|
|
|
313
317
|
*/
|
|
314
318
|
async getItemOffersBatch(getItemOffersBatchRequestBody, options) {
|
|
315
319
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getItemOffersBatch(getItemOffersBatchRequestBody, options);
|
|
316
|
-
|
|
320
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
321
|
+
const localVarOperationServerBasePath = operationServerMap['ProductPricingApi.getItemOffersBatch']?.[localVarOperationServerIndex]?.url;
|
|
322
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
317
323
|
},
|
|
318
324
|
/**
|
|
319
325
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
320
326
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
321
|
-
* @param {
|
|
327
|
+
* @param {GetListingOffersItemConditionEnum} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
|
322
328
|
* @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit.
|
|
323
|
-
* @param {
|
|
329
|
+
* @param {GetListingOffersCustomerTypeEnum} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
|
|
324
330
|
* @param {*} [options] Override http request option.
|
|
325
331
|
* @throws {RequiredError}
|
|
326
332
|
*/
|
|
327
333
|
async getListingOffers(marketplaceId, itemCondition, sellerSKU, customerType, options) {
|
|
328
334
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getListingOffers(marketplaceId, itemCondition, sellerSKU, customerType, options);
|
|
329
|
-
|
|
335
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
336
|
+
const localVarOperationServerBasePath = operationServerMap['ProductPricingApi.getListingOffers']?.[localVarOperationServerIndex]?.url;
|
|
337
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
330
338
|
},
|
|
331
339
|
/**
|
|
332
340
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
@@ -336,22 +344,26 @@ export const ProductPricingApiFp = function (configuration) {
|
|
|
336
344
|
*/
|
|
337
345
|
async getListingOffersBatch(getListingOffersBatchRequestBody, options) {
|
|
338
346
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getListingOffersBatch(getListingOffersBatchRequestBody, options);
|
|
339
|
-
|
|
347
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
348
|
+
const localVarOperationServerBasePath = operationServerMap['ProductPricingApi.getListingOffersBatch']?.[localVarOperationServerIndex]?.url;
|
|
349
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
340
350
|
},
|
|
341
351
|
/**
|
|
342
352
|
* 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
343
353
|
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
|
|
344
|
-
* @param {
|
|
354
|
+
* @param {GetPricingItemTypeEnum} 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.
|
|
345
355
|
* @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
|
|
346
356
|
* @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
|
|
347
|
-
* @param {
|
|
348
|
-
* @param {
|
|
357
|
+
* @param {GetPricingItemConditionEnum} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
|
358
|
+
* @param {GetPricingOfferTypeEnum} [offerType] Indicates whether to request pricing information for the seller\'s B2C or B2B offers. Default is B2C.
|
|
349
359
|
* @param {*} [options] Override http request option.
|
|
350
360
|
* @throws {RequiredError}
|
|
351
361
|
*/
|
|
352
362
|
async getPricing(marketplaceId, itemType, asins, skus, itemCondition, offerType, options) {
|
|
353
363
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getPricing(marketplaceId, itemType, asins, skus, itemCondition, offerType, options);
|
|
354
|
-
|
|
364
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
365
|
+
const localVarOperationServerBasePath = operationServerMap['ProductPricingApi.getPricing']?.[localVarOperationServerIndex]?.url;
|
|
366
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
355
367
|
},
|
|
356
368
|
};
|
|
357
369
|
};
|
|
@@ -486,3 +498,75 @@ export class ProductPricingApi extends BaseAPI {
|
|
|
486
498
|
return ProductPricingApiFp(this.configuration).getPricing(requestParameters.marketplaceId, requestParameters.itemType, requestParameters.asins, requestParameters.skus, requestParameters.itemCondition, requestParameters.offerType, options).then((request) => request(this.axios, this.basePath));
|
|
487
499
|
}
|
|
488
500
|
}
|
|
501
|
+
/**
|
|
502
|
+
* @export
|
|
503
|
+
*/
|
|
504
|
+
export const GetCompetitivePricingItemTypeEnum = {
|
|
505
|
+
Asin: 'Asin',
|
|
506
|
+
Sku: 'Sku'
|
|
507
|
+
};
|
|
508
|
+
/**
|
|
509
|
+
* @export
|
|
510
|
+
*/
|
|
511
|
+
export const GetCompetitivePricingCustomerTypeEnum = {
|
|
512
|
+
Consumer: 'Consumer',
|
|
513
|
+
Business: 'Business'
|
|
514
|
+
};
|
|
515
|
+
/**
|
|
516
|
+
* @export
|
|
517
|
+
*/
|
|
518
|
+
export const GetItemOffersItemConditionEnum = {
|
|
519
|
+
New: 'New',
|
|
520
|
+
Used: 'Used',
|
|
521
|
+
Collectible: 'Collectible',
|
|
522
|
+
Refurbished: 'Refurbished',
|
|
523
|
+
Club: 'Club'
|
|
524
|
+
};
|
|
525
|
+
/**
|
|
526
|
+
* @export
|
|
527
|
+
*/
|
|
528
|
+
export const GetItemOffersCustomerTypeEnum = {
|
|
529
|
+
Consumer: 'Consumer',
|
|
530
|
+
Business: 'Business'
|
|
531
|
+
};
|
|
532
|
+
/**
|
|
533
|
+
* @export
|
|
534
|
+
*/
|
|
535
|
+
export const GetListingOffersItemConditionEnum = {
|
|
536
|
+
New: 'New',
|
|
537
|
+
Used: 'Used',
|
|
538
|
+
Collectible: 'Collectible',
|
|
539
|
+
Refurbished: 'Refurbished',
|
|
540
|
+
Club: 'Club'
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* @export
|
|
544
|
+
*/
|
|
545
|
+
export const GetListingOffersCustomerTypeEnum = {
|
|
546
|
+
Consumer: 'Consumer',
|
|
547
|
+
Business: 'Business'
|
|
548
|
+
};
|
|
549
|
+
/**
|
|
550
|
+
* @export
|
|
551
|
+
*/
|
|
552
|
+
export const GetPricingItemTypeEnum = {
|
|
553
|
+
Asin: 'Asin',
|
|
554
|
+
Sku: 'Sku'
|
|
555
|
+
};
|
|
556
|
+
/**
|
|
557
|
+
* @export
|
|
558
|
+
*/
|
|
559
|
+
export const GetPricingItemConditionEnum = {
|
|
560
|
+
New: 'New',
|
|
561
|
+
Used: 'Used',
|
|
562
|
+
Collectible: 'Collectible',
|
|
563
|
+
Refurbished: 'Refurbished',
|
|
564
|
+
Club: 'Club'
|
|
565
|
+
};
|
|
566
|
+
/**
|
|
567
|
+
* @export
|
|
568
|
+
*/
|
|
569
|
+
export const GetPricingOfferTypeEnum = {
|
|
570
|
+
B2C: 'B2C',
|
|
571
|
+
B2B: 'B2B'
|
|
572
|
+
};
|
|
@@ -37,7 +37,7 @@ export class BaseAPI {
|
|
|
37
37
|
this.axios = axios;
|
|
38
38
|
if (configuration) {
|
|
39
39
|
this.configuration = configuration;
|
|
40
|
-
this.basePath = configuration.basePath
|
|
40
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -56,3 +56,8 @@ export class RequiredError extends Error {
|
|
|
56
56
|
this.name = "RequiredError";
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @export
|
|
62
|
+
*/
|
|
63
|
+
export const operationServerMap = {};
|
|
@@ -127,7 +127,7 @@ export const toPathString = function (url) {
|
|
|
127
127
|
*/
|
|
128
128
|
export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
129
129
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
130
|
-
const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath
|
|
130
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
131
131
|
return axios.request(axiosRequestArgs);
|
|
132
132
|
};
|
|
133
133
|
};
|