python-amazon-sp-api 2.0.15__py3-none-any.whl → 2.1.3__py3-none-any.whl
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.
- {python_amazon_sp_api-2.0.15.dist-info → python_amazon_sp_api-2.1.3.dist-info}/METADATA +7 -7
- python_amazon_sp_api-2.1.3.dist-info/RECORD +350 -0
- sp_api/__version__.py +1 -1
- sp_api/api/__init__.py +160 -4
- sp_api/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +85 -110
- sp_api/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu_2024_05_09.py +456 -0
- sp_api/api/aplus_content/aplus_content.py +176 -125
- sp_api/api/application_integrations/application_integrations.py +59 -68
- sp_api/api/application_management/application_management.py +20 -13
- sp_api/api/authorization/authorization.py +8 -26
- sp_api/api/catalog/catalog.py +27 -61
- sp_api/api/catalog_items/catalog_items.py +108 -78
- sp_api/api/catalog_items/catalog_items_2020_12_01.py +86 -0
- sp_api/api/catalog_items/catalog_items_2022_04_01.py +89 -0
- sp_api/api/customer_feedback/customer_feedback.py +100 -0
- sp_api/api/data_kiosk/data_kiosk.py +80 -75
- sp_api/api/delivery_by_amazon/__init__.py +0 -0
- sp_api/api/delivery_by_amazon/delivery_by_amazon.py +92 -0
- sp_api/api/delivery_by_amazon/delivery_by_amazon_2022_07_01.py +81 -0
- sp_api/api/easy_ship/easy_ship.py +121 -111
- sp_api/api/external_fulfillment/external_fulfillment.py +211 -434
- sp_api/api/external_fulfillment/inventory.py +120 -0
- sp_api/api/external_fulfillment/inventory_2021_01_06.py +71 -0
- sp_api/api/external_fulfillment/inventory_2024_09_11.py +96 -0
- sp_api/api/external_fulfillment/returns.py +120 -0
- sp_api/api/external_fulfillment/returns_2021_08_19.py +88 -0
- sp_api/api/external_fulfillment/returns_2024_09_11.py +141 -0
- sp_api/api/external_fulfillment/shipping.py +120 -0
- sp_api/api/external_fulfillment/shipping_2021_01_06.py +256 -0
- sp_api/api/external_fulfillment/shipping_2024_09_11.py +233 -0
- sp_api/api/fba_inbound_eligibility/fba_inbound_eligibility.py +30 -24
- sp_api/api/fba_small_and_light/fba_small_and_light.py +60 -99
- sp_api/api/feeds/feeds.py +75 -245
- sp_api/api/feeds/feeds_2021_06_30.py +320 -0
- sp_api/api/finances/finances.py +123 -90
- sp_api/api/finances/finances_2024_06_01.py +71 -0
- sp_api/api/finances/finances_2024_06_19.py +114 -0
- sp_api/api/finances/finances_v0.py +116 -0
- sp_api/api/fulfillment_inbound/fulfillment_inbound.py +107 -1784
- sp_api/api/fulfillment_inbound/fulfillment_inbound_2024_03_20.py +1722 -0
- sp_api/api/fulfillment_inbound/fulfillment_inbound_v0.py +1384 -0
- sp_api/api/fulfillment_outbound/fulfillment_outbound.py +256 -480
- sp_api/api/inventories/inventories.py +79 -42
- sp_api/api/invoices/__init__.py +0 -0
- sp_api/api/invoices/invoices.py +92 -0
- sp_api/api/invoices/invoices_2024_06_19.py +344 -0
- sp_api/api/listings_items/listings_items.py +110 -163
- sp_api/api/listings_items/listings_items_2020_09_01.py +189 -0
- sp_api/api/listings_items/listings_items_2021_08_01.py +233 -0
- sp_api/api/listings_restrictions/listings_restrictions.py +23 -10
- sp_api/api/merchant_fulfillment/merchant_fulfillment.py +107 -222
- sp_api/api/messaging/messaging.py +184 -198
- sp_api/api/notifications/notifications.py +144 -106
- sp_api/api/orders/orders.py +9 -46
- sp_api/api/orders/orders_2026_01_01.py +19 -65
- sp_api/api/orders/orders_v0.py +152 -184
- sp_api/api/product_fees/product_fees.py +101 -75
- sp_api/api/product_type_definitions/product_type_definitions.py +47 -36
- sp_api/api/products/products.py +94 -386
- sp_api/api/products/products_2022_05_01.py +96 -0
- sp_api/api/products/products_v0.py +389 -0
- sp_api/api/replenishment/replenishment.py +58 -69
- sp_api/api/reports/reports.py +124 -157
- sp_api/api/sales/sales.py +22 -39
- sp_api/api/seller_wallet/__init__.py +0 -0
- sp_api/api/seller_wallet/seller_wallet.py +92 -0
- sp_api/api/seller_wallet/seller_wallet_2024_03_01.py +300 -0
- sp_api/api/sellers/sellers.py +15 -35
- sp_api/api/services/services.py +479 -82
- sp_api/api/shipment_invoicing/__init__.py +0 -0
- sp_api/api/shipment_invoicing/shipment_invoicing.py +92 -0
- sp_api/api/shipment_invoicing/shipment_invoicing_v0.py +101 -0
- sp_api/api/shipping/shipping.py +94 -440
- sp_api/api/shipping/shippingV2.py +183 -474
- sp_api/api/shipping/shipping_v1.py +330 -0
- sp_api/api/shipping/shipping_v2.py +723 -0
- sp_api/api/solicitations/solicitations.py +28 -18
- sp_api/api/supply_sources/supply_sources.py +67 -57
- sp_api/api/tokens/tokens.py +14 -35
- sp_api/api/vehicles/__init__.py +0 -0
- sp_api/api/vehicles/vehicles.py +92 -0
- sp_api/api/vehicles/vehicles_2024_11_01.py +33 -0
- sp_api/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +16 -29
- sp_api/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +116 -189
- sp_api/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders_2021_12_28.py +114 -0
- sp_api/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders_v1.py +114 -0
- sp_api/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +15 -225
- sp_api/api/vendor_direct_fulfillment_sandbox_test_data/__init__.py +0 -0
- sp_api/api/vendor_direct_fulfillment_sandbox_test_data/vendor_direct_fulfillment_sandbox_test_data.py +92 -0
- sp_api/api/vendor_direct_fulfillment_sandbox_test_data/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.py +50 -0
- sp_api/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +122 -624
- sp_api/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping_2021_12_28.py +390 -0
- sp_api/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping_v1.py +320 -0
- sp_api/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +113 -29
- sp_api/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions_2021_12_28.py +47 -0
- sp_api/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions_v1.py +47 -0
- sp_api/api/vendor_invoices/vendor_invoices.py +15 -264
- sp_api/api/vendor_orders/vendor_orders.py +83 -131
- sp_api/api/vendor_shipments/vendor_shipments.py +149 -68
- sp_api/api/vendor_transaction_status/vendor_transaction_status.py +16 -11
- sp_api/asyncio/api/__init__.py +159 -4
- sp_api/asyncio/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +84 -110
- sp_api/asyncio/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu_2024_05_09.py +457 -0
- sp_api/asyncio/api/aplus_content/aplus_content.py +176 -125
- sp_api/asyncio/api/application_integrations/application_integrations.py +59 -68
- sp_api/asyncio/api/application_management/application_management.py +20 -13
- sp_api/asyncio/api/authorization/authorization.py +8 -26
- sp_api/asyncio/api/catalog/catalog.py +27 -61
- sp_api/asyncio/api/catalog_items/catalog_items.py +94 -71
- sp_api/asyncio/api/catalog_items/catalog_items_2020_12_01.py +87 -0
- sp_api/asyncio/api/catalog_items/catalog_items_2022_04_01.py +90 -0
- sp_api/asyncio/api/customer_feedback/customer_feedback.py +100 -0
- sp_api/asyncio/api/data_kiosk/data_kiosk.py +80 -75
- sp_api/asyncio/api/delivery_by_amazon/__init__.py +0 -0
- sp_api/asyncio/api/delivery_by_amazon/delivery_by_amazon.py +92 -0
- sp_api/asyncio/api/delivery_by_amazon/delivery_by_amazon_2022_07_01.py +82 -0
- sp_api/asyncio/api/easy_ship/easy_ship.py +121 -111
- sp_api/asyncio/api/external_fulfillment/external_fulfillment.py +212 -435
- sp_api/asyncio/api/external_fulfillment/inventory.py +126 -0
- sp_api/asyncio/api/external_fulfillment/inventory_2021_01_06.py +73 -0
- sp_api/asyncio/api/external_fulfillment/inventory_2024_09_11.py +98 -0
- sp_api/asyncio/api/external_fulfillment/returns.py +124 -0
- sp_api/asyncio/api/external_fulfillment/returns_2021_08_19.py +90 -0
- sp_api/asyncio/api/external_fulfillment/returns_2024_09_11.py +143 -0
- sp_api/asyncio/api/external_fulfillment/shipping.py +124 -0
- sp_api/asyncio/api/external_fulfillment/shipping_2021_01_06.py +258 -0
- sp_api/asyncio/api/external_fulfillment/shipping_2024_09_11.py +235 -0
- sp_api/asyncio/api/fba_inbound_eligibility/fba_inbound_eligibility.py +31 -25
- sp_api/asyncio/api/fba_small_and_light/fba_small_and_light.py +61 -100
- sp_api/asyncio/api/feeds/feeds.py +75 -243
- sp_api/asyncio/api/feeds/feeds_2021_06_30.py +318 -0
- sp_api/asyncio/api/finances/finances.py +123 -91
- sp_api/asyncio/api/finances/finances_2024_06_01.py +72 -0
- sp_api/asyncio/api/finances/finances_2024_06_19.py +115 -0
- sp_api/asyncio/api/finances/finances_v0.py +117 -0
- sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound.py +107 -1785
- sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound_2024_03_20.py +1723 -0
- sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound_v0.py +1385 -0
- sp_api/asyncio/api/fulfillment_outbound/fulfillment_outbound.py +257 -481
- sp_api/asyncio/api/inventories/inventories.py +79 -42
- sp_api/asyncio/api/invoices/__init__.py +0 -0
- sp_api/asyncio/api/invoices/invoices.py +92 -0
- sp_api/asyncio/api/invoices/invoices_2024_06_19.py +345 -0
- sp_api/asyncio/api/listings_items/listings_items.py +109 -163
- sp_api/asyncio/api/listings_items/listings_items_2020_09_01.py +190 -0
- sp_api/asyncio/api/listings_items/listings_items_2021_08_01.py +233 -0
- sp_api/asyncio/api/listings_restrictions/listings_restrictions.py +23 -10
- sp_api/asyncio/api/merchant_fulfillment/merchant_fulfillment.py +110 -222
- sp_api/asyncio/api/messaging/messaging.py +185 -199
- sp_api/asyncio/api/notifications/notifications.py +145 -107
- sp_api/asyncio/api/orders/orders.py +9 -46
- sp_api/asyncio/api/orders/orders_2026_01_01.py +19 -65
- sp_api/asyncio/api/orders/orders_v0.py +152 -184
- sp_api/asyncio/api/product_fees/product_fees.py +101 -75
- sp_api/asyncio/api/product_type_definitions/product_type_definitions.py +47 -36
- sp_api/asyncio/api/products/products.py +94 -387
- sp_api/asyncio/api/products/products_2022_05_01.py +109 -0
- sp_api/asyncio/api/products/products_v0.py +388 -0
- sp_api/asyncio/api/replenishment/replenishment.py +59 -70
- sp_api/asyncio/api/reports/reports.py +124 -157
- sp_api/asyncio/api/sales/sales.py +22 -39
- sp_api/asyncio/api/seller_wallet/__init__.py +0 -0
- sp_api/asyncio/api/seller_wallet/seller_wallet.py +92 -0
- sp_api/asyncio/api/seller_wallet/seller_wallet_2024_03_01.py +301 -0
- sp_api/asyncio/api/sellers/sellers.py +16 -36
- sp_api/asyncio/api/services/services.py +479 -82
- sp_api/asyncio/api/shipment_invoicing/__init__.py +0 -0
- sp_api/asyncio/api/shipment_invoicing/shipment_invoicing.py +92 -0
- sp_api/asyncio/api/shipment_invoicing/shipment_invoicing_v0.py +102 -0
- sp_api/asyncio/api/shipping/shipping.py +94 -441
- sp_api/asyncio/api/shipping/shippingV2.py +181 -472
- sp_api/asyncio/api/shipping/shipping_v1.py +331 -0
- sp_api/asyncio/api/shipping/shipping_v2.py +717 -0
- sp_api/asyncio/api/solicitations/solicitations.py +29 -19
- sp_api/asyncio/api/supply_sources/supply_sources.py +67 -57
- sp_api/asyncio/api/tokens/tokens.py +14 -35
- sp_api/asyncio/api/vehicles/__init__.py +0 -0
- sp_api/asyncio/api/vehicles/vehicles.py +92 -0
- sp_api/asyncio/api/vehicles/vehicles_2024_11_01.py +34 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +16 -29
- sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +120 -192
- sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders_2021_12_28.py +116 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders_v1.py +115 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +15 -225
- sp_api/asyncio/api/vendor_direct_fulfillment_sandbox_test_data/__init__.py +0 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_sandbox_test_data/vendor_direct_fulfillment_sandbox_test_data.py +92 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_sandbox_test_data/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.py +51 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +120 -623
- sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping_2021_12_28.py +392 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping_v1.py +321 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +112 -29
- sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions_2021_12_28.py +49 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions_v1.py +48 -0
- sp_api/asyncio/api/vendor_invoices/vendor_invoices.py +16 -265
- sp_api/asyncio/api/vendor_orders/vendor_orders.py +84 -132
- sp_api/asyncio/api/vendor_shipments/vendor_shipments.py +150 -69
- sp_api/asyncio/api/vendor_transaction_status/vendor_transaction_status.py +17 -12
- sp_api/asyncio/base/client.py +2 -2
- sp_api/asyncio/util/load_date_bound.py +1 -1
- sp_api/base/__init__.py +10 -0
- sp_api/base/_core.py +2 -2
- sp_api/base/client.py +3 -3
- sp_api/base/helpers.py +12 -1
- sp_api/base/marketplaces.py +6 -3
- sp_api/util/__init__.py +2 -0
- sp_api/util/load_date_bound.py +1 -1
- sp_api/util/versioned_client.py +45 -0
- python_amazon_sp_api-2.0.15.dist-info/RECORD +0 -255
- sp_api/asyncio/api/models/__init__.py +0 -4
- sp_api/asyncio/api/overrides/__init__.py +0 -1
- {python_amazon_sp_api-2.0.15.data → python_amazon_sp_api-2.1.3.data}/scripts/make_endpoint +0 -0
- {python_amazon_sp_api-2.0.15.dist-info → python_amazon_sp_api-2.1.3.dist-info}/WHEEL +0 -0
- {python_amazon_sp_api-2.0.15.dist-info → python_amazon_sp_api-2.1.3.dist-info}/licenses/LICENSE +0 -0
- {python_amazon_sp_api-2.0.15.dist-info → python_amazon_sp_api-2.1.3.dist-info}/top_level.txt +0 -0
|
@@ -16,25 +16,32 @@ class ProductTypeDefinitions(AsyncBaseClient):
|
|
|
16
16
|
async def search_definitions_product_types(self, **kwargs) -> ApiResponse:
|
|
17
17
|
"""
|
|
18
18
|
search_definitions_product_types(self, **kwargs) -> ApiResponse
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
Search for and return a list of Amazon product types that have definitions available.
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
**Usage Plans:**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
|
|
24
|
+
| Plan type | Rate (requests per second) | Burst |
|
|
25
|
+
| ---- | ---- | ---- |
|
|
26
|
+
|Default| 5 | 10 |
|
|
27
|
+
|Selling partner specific| Variable | Variable |
|
|
28
|
+
|
|
29
|
+
The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
|
|
30
|
+
|
|
31
|
+
Examples:
|
|
32
|
+
literal blocks::
|
|
33
|
+
|
|
34
|
+
await ProductTypeDefinitions().search_definitions_product_types()
|
|
35
|
+
|
|
32
36
|
Args:
|
|
33
|
-
key keywords:
|
|
34
|
-
key marketplaceIds:
|
|
35
|
-
|
|
37
|
+
key keywords: object | A comma-delimited list of keywords to search product types. **Note:** Cannot be used with `itemName`.
|
|
38
|
+
key marketplaceIds: object | required A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
39
|
+
key itemName: object | The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with `keywords`.
|
|
40
|
+
key locale: object | The locale for the display names in the response. Defaults to the primary locale of the marketplace.
|
|
41
|
+
key searchLocale: object | The locale used for the `keywords` and `itemName` parameters. Defaults to the primary locale of the marketplace.
|
|
42
|
+
|
|
36
43
|
Returns:
|
|
37
|
-
ApiResponse
|
|
44
|
+
ApiResponse
|
|
38
45
|
"""
|
|
39
46
|
|
|
40
47
|
return await self._request(kwargs.pop("path"), params=kwargs)
|
|
@@ -43,31 +50,35 @@ class ProductTypeDefinitions(AsyncBaseClient):
|
|
|
43
50
|
async def get_definitions_product_type(self, productType, **kwargs) -> ApiResponse:
|
|
44
51
|
"""
|
|
45
52
|
get_definitions_product_type(self, productType, **kwargs) -> ApiResponse
|
|
46
|
-
|
|
53
|
+
|
|
47
54
|
Retrieve an Amazon product type definition.
|
|
48
|
-
|
|
55
|
+
|
|
49
56
|
**Usage Plans:**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
|
|
58
|
+
| Plan type | Rate (requests per second) | Burst |
|
|
59
|
+
| ---- | ---- | ---- |
|
|
60
|
+
|Default| 5 | 10 |
|
|
61
|
+
|Selling partner specific| Variable | Variable |
|
|
62
|
+
|
|
63
|
+
The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
|
|
64
|
+
|
|
65
|
+
Examples:
|
|
66
|
+
literal blocks::
|
|
67
|
+
|
|
68
|
+
await ProductTypeDefinitions().get_definitions_product_type("value")
|
|
69
|
+
|
|
60
70
|
Args:
|
|
61
|
-
productType:
|
|
62
|
-
key sellerId:
|
|
63
|
-
key marketplaceIds:
|
|
64
|
-
|
|
65
|
-
key
|
|
66
|
-
key
|
|
67
|
-
key
|
|
68
|
-
|
|
71
|
+
productType: object | required The Amazon product type name.
|
|
72
|
+
key sellerId: object | A selling partner identifier. When provided, seller-specific requirements and values are populated within the product type definition schema, such as brand names associated with the selling partner.
|
|
73
|
+
key marketplaceIds: object | required A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
74
|
+
Note: This parameter is limited to one marketplaceId at this time.
|
|
75
|
+
key productTypeVersion: object | The version of the Amazon product type to retrieve. Defaults to "LATEST",. Prerelease versions of product type definitions may be retrieved with "RELEASE_CANDIDATE". If no prerelease version is currently available, the "LATEST" live version will be provided.
|
|
76
|
+
key requirements: object | The name of the requirements set to retrieve requirements for.
|
|
77
|
+
key requirementsEnforced: object | Identifies if the required attributes for a requirements set are enforced by the product type definition schema. Non-enforced requirements enable structural validation of individual attributes without all the required attributes being present (such as for partial updates).
|
|
78
|
+
key locale: object | Locale for retrieving display labels and other presentation details. Defaults to the default language of the first marketplace in the request.
|
|
79
|
+
|
|
69
80
|
Returns:
|
|
70
|
-
ApiResponse
|
|
81
|
+
ApiResponse
|
|
71
82
|
"""
|
|
72
83
|
|
|
73
84
|
return await self._request(
|
|
@@ -1,405 +1,112 @@
|
|
|
1
|
-
from
|
|
1
|
+
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
from
|
|
5
|
-
from sp_api.api.products.products_definitions import (
|
|
6
|
-
GetCompetitiveSummaryBatch,
|
|
7
|
-
GetFeaturedOfferExpectedPriceBatch,
|
|
8
|
-
GetItemOffersBatchRequest,
|
|
9
|
-
GetListingOffersBatchRequest,
|
|
10
|
-
)
|
|
11
|
-
from sp_api.util import ensure_csv
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class Products(AsyncBaseClient):
|
|
15
|
-
"""
|
|
16
|
-
:links:
|
|
17
|
-
https://github.com/amzn/selling-partner-api-docs/blob/main/references/product-pricing-api/productPricingV0.md
|
|
18
|
-
https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-reference
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
@sp_endpoint("/products/pricing/v0/price", method="GET")
|
|
22
|
-
async def get_product_pricing_for_skus(
|
|
23
|
-
self, seller_sku_list: [str], item_condition=None, offer_type=None, **kwargs
|
|
24
|
-
) -> ApiResponse:
|
|
25
|
-
"""
|
|
26
|
-
get_product_pricing_for_skus(self, seller_sku_list: [str], item_condition: str = None, **kwargs) -> ApiResponse
|
|
27
|
-
Returns pricing information for a seller's offer listings based on SKU.
|
|
28
|
-
|
|
29
|
-
**Usage Plan:**
|
|
30
|
-
|
|
31
|
-
====================================== ==============
|
|
32
|
-
Rate (requests per second) Burst
|
|
33
|
-
====================================== ==============
|
|
34
|
-
.5 1
|
|
35
|
-
====================================== ==============
|
|
36
|
-
|
|
37
|
-
Examples:
|
|
38
|
-
literal blocks::
|
|
39
|
-
|
|
40
|
-
Products().get_product_pricing_for_skus(['sku', 'sku1'], MarketplaceId="ATVPDKIKX0DER")
|
|
41
|
-
|
|
42
|
-
Args:
|
|
43
|
-
seller_sku_list: [str]
|
|
44
|
-
item_condition: str ("New", "Used", "Collectible", "Refurbished", "Club")
|
|
45
|
-
offer_type: str ("B2C" or "B2B") Default is B2C.
|
|
46
|
-
**kwargs:
|
|
47
|
-
|
|
48
|
-
Returns:
|
|
49
|
-
ApiResponse:
|
|
50
|
-
"""
|
|
51
|
-
if item_condition is not None:
|
|
52
|
-
kwargs["ItemCondition"] = item_condition
|
|
53
|
-
if offer_type is not None:
|
|
54
|
-
kwargs["OfferType"] = offer_type
|
|
55
|
-
|
|
56
|
-
return self._create_get_pricing_request(seller_sku_list, "Sku", **kwargs)
|
|
57
|
-
|
|
58
|
-
@sp_endpoint("/products/pricing/v0/price", method="GET")
|
|
59
|
-
async def get_product_pricing_for_asins(
|
|
60
|
-
self, asin_list: [str], item_condition=None, offer_type=None, **kwargs
|
|
61
|
-
) -> ApiResponse:
|
|
62
|
-
"""
|
|
63
|
-
get_product_pricing_for_asins(self, asin_list: [str], item_condition=None, **kwargs) -> ApiResponse
|
|
64
|
-
Returns pricing information for a seller's offer listings based on ASIN.
|
|
65
|
-
|
|
66
|
-
**Usage Plan:**
|
|
67
|
-
|
|
68
|
-
====================================== ==============
|
|
69
|
-
Rate (requests per second) Burst
|
|
70
|
-
====================================== ==============
|
|
71
|
-
.5 1
|
|
72
|
-
====================================== ==============
|
|
73
|
-
|
|
74
|
-
Examples:
|
|
75
|
-
literal blocks::
|
|
76
|
-
|
|
77
|
-
Products().get_product_pricing_for_asins(['asin1', 'asin2'], MarketplaceId="ATVPDKIKX0DER")
|
|
78
|
-
|
|
79
|
-
Args:
|
|
80
|
-
asin_list: [str]
|
|
81
|
-
item_condition: str | ("New", "Used", "Collectible", "Refurbished", "Club") Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. Available values : New, Used, Collectible, Refurbished, Club
|
|
82
|
-
offer_type: str ("B2C" or "B2B") Default is B2C.
|
|
83
|
-
Returns:
|
|
84
|
-
ApiResponse
|
|
85
|
-
"""
|
|
86
|
-
if item_condition is not None:
|
|
87
|
-
kwargs["ItemCondition"] = item_condition
|
|
88
|
-
if offer_type is not None:
|
|
89
|
-
kwargs["OfferType"] = offer_type
|
|
90
|
-
|
|
91
|
-
return self._create_get_pricing_request(asin_list, "Asin", **kwargs)
|
|
92
|
-
|
|
93
|
-
@sp_endpoint("/products/pricing/v0/competitivePrice", method="GET")
|
|
94
|
-
async def get_competitive_pricing_for_skus(
|
|
95
|
-
self, seller_sku_list: [str], customer_type=None, **kwargs
|
|
96
|
-
) -> ApiResponse:
|
|
97
|
-
"""
|
|
98
|
-
get_competitive_pricing_for_skus(self, seller_sku_list, **kwargs) -> ApiResponse
|
|
99
|
-
Returns competitive pricing information for a seller's offer listings based on Seller Sku
|
|
100
|
-
|
|
101
|
-
**Usage Plan:**
|
|
102
|
-
|
|
103
|
-
====================================== ==============
|
|
104
|
-
Rate (requests per second) Burst
|
|
105
|
-
====================================== ==============
|
|
106
|
-
.5 1
|
|
107
|
-
====================================== ==============
|
|
108
|
-
|
|
109
|
-
Examples:
|
|
110
|
-
literal blocks::
|
|
111
|
-
|
|
112
|
-
Products().get_competitive_pricing_for_skus([], MarketplaceId="ATVPDKIKX0DER")
|
|
113
|
-
|
|
114
|
-
Args:
|
|
115
|
-
seller_sku_list: [str]
|
|
116
|
-
customer_type: Optional (query) str ("Consumer" or "Business") Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
|
|
117
|
-
|
|
118
|
-
Returns:
|
|
119
|
-
ApiResponse
|
|
120
|
-
"""
|
|
121
|
-
|
|
122
|
-
if customer_type is not None:
|
|
123
|
-
kwargs["CustomerType"] = customer_type
|
|
124
|
-
|
|
125
|
-
return self._create_get_pricing_request(seller_sku_list, "Sku", **kwargs)
|
|
126
|
-
|
|
127
|
-
@sp_endpoint("/products/pricing/v0/competitivePrice", method="GET")
|
|
128
|
-
async def get_competitive_pricing_for_asins(
|
|
129
|
-
self, asin_list: [str], customer_type=None, **kwargs
|
|
130
|
-
) -> ApiResponse:
|
|
131
|
-
"""
|
|
132
|
-
get_competitive_pricing_for_asins(self, asin_list, **kwargs) -> ApiResponse
|
|
133
|
-
Returns competitive pricing information for a seller's offer listings based on ASIN
|
|
134
|
-
|
|
135
|
-
**Usage Plan:**
|
|
136
|
-
|
|
137
|
-
====================================== ==============
|
|
138
|
-
Rate (requests per second) Burst
|
|
139
|
-
====================================== ==============
|
|
140
|
-
.5 1
|
|
141
|
-
====================================== ==============
|
|
142
|
-
|
|
143
|
-
Examples:
|
|
144
|
-
literal blocks::
|
|
145
|
-
|
|
146
|
-
Products().get_competitive_pricing_for_asins([], MarketplaceId="ATVPDKIKX0DER")
|
|
147
|
-
|
|
148
|
-
Args:
|
|
149
|
-
asin_list: [str]
|
|
150
|
-
customer_type: Optional (query) str ("Consumer" or "Business") Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
|
|
151
|
-
|
|
152
|
-
Returns:
|
|
153
|
-
ApiResponse
|
|
3
|
+
import enum
|
|
4
|
+
from typing import Any, Literal, TYPE_CHECKING, overload
|
|
154
5
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
kwargs["CustomerType"] = customer_type
|
|
158
|
-
|
|
159
|
-
return self._create_get_pricing_request(asin_list, "Asin", **kwargs)
|
|
160
|
-
|
|
161
|
-
@sp_endpoint("/products/pricing/v0/listings/{}/offers", method="GET")
|
|
162
|
-
async def get_listings_offer(
|
|
163
|
-
self, seller_sku: str, item_condition: str, customer_type: str = None, **kwargs
|
|
164
|
-
) -> ApiResponse:
|
|
165
|
-
"""
|
|
166
|
-
get_listings_offer(self, seller_sku: str, **kwargs) -> ApiResponse
|
|
167
|
-
Returns the lowest priced offers for a single SKU listing
|
|
168
|
-
|
|
169
|
-
**Usage Plan:**
|
|
170
|
-
|
|
171
|
-
====================================== ==============
|
|
172
|
-
Rate (requests per second) Burst
|
|
173
|
-
====================================== ==============
|
|
174
|
-
1 2
|
|
175
|
-
====================================== ==============
|
|
176
|
-
|
|
177
|
-
Args:
|
|
178
|
-
key MarketplaceId: Required (query) str
|
|
179
|
-
item_condition: Required (query) str | ("New", "Used", "Collectible", "Refurbished", "Club") Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. Available values : New, Used, Collectible, Refurbished, Club
|
|
180
|
-
seller_sku: Required (path) str
|
|
181
|
-
customer_type: Optional (query) str ("Consumer" or "Business") Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
Returns:
|
|
185
|
-
ApiResponse
|
|
186
|
-
|
|
187
|
-
"""
|
|
188
|
-
kwargs["ItemCondition"] = item_condition
|
|
189
|
-
|
|
190
|
-
if customer_type is not None:
|
|
191
|
-
kwargs["CustomerType"] = customer_type
|
|
192
|
-
|
|
193
|
-
return await self._request(
|
|
194
|
-
fill_query_params(kwargs.pop("path"), seller_sku), params={**kwargs}
|
|
195
|
-
)
|
|
196
|
-
|
|
197
|
-
@sp_endpoint("/products/pricing/v0/items/{}/offers", method="GET")
|
|
198
|
-
async def get_item_offers(
|
|
199
|
-
self, asin: str, item_condition: str, customer_type: str = None, **kwargs
|
|
200
|
-
) -> ApiResponse:
|
|
201
|
-
"""
|
|
202
|
-
get_item_offers(self, asin: str, **kwargs) -> ApiResponse
|
|
203
|
-
Returns the lowest priced offers for a single item based on ASIN
|
|
204
|
-
|
|
205
|
-
**Usage Plan:**
|
|
206
|
-
|
|
207
|
-
====================================== ==============
|
|
208
|
-
Rate (requests per second) Burst
|
|
209
|
-
====================================== ==============
|
|
210
|
-
.5 1
|
|
211
|
-
====================================== ==============
|
|
212
|
-
|
|
213
|
-
Args:
|
|
214
|
-
key MarketplaceId: Required (query) str
|
|
215
|
-
item_condition: Required (query) str | ("New", "Used", "Collectible", "Refurbished", "Club") Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. Available values : New, Used, Collectible, Refurbished, Club
|
|
216
|
-
asin: Required (path) str
|
|
217
|
-
customer_type: Optional (query) str ("Consumer" or "Business") Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
Returns:
|
|
221
|
-
ApiResponse
|
|
222
|
-
|
|
223
|
-
"""
|
|
224
|
-
kwargs["ItemCondition"] = item_condition
|
|
225
|
-
|
|
226
|
-
if customer_type is not None:
|
|
227
|
-
kwargs["CustomerType"] = customer_type
|
|
228
|
-
|
|
229
|
-
return await self._request(
|
|
230
|
-
fill_query_params(kwargs.pop("path"), asin), params={**kwargs}
|
|
231
|
-
)
|
|
232
|
-
|
|
233
|
-
@sp_endpoint("/batches/products/pricing/v0/itemOffers", method="POST")
|
|
234
|
-
async def get_item_offers_batch(
|
|
235
|
-
self,
|
|
236
|
-
requests_: Optional[Union[List[Dict], GetItemOffersBatchRequest]] = None,
|
|
237
|
-
**kwargs,
|
|
238
|
-
) -> ApiResponse:
|
|
239
|
-
"""
|
|
240
|
-
get_item_offers_batch(self, requests_: Optional[List[Union[Dict, ItemOffersRequest]]], **kwargs) -> ApiResponse
|
|
241
|
-
Returns the lowest priced offers for a batch of items based on ASIN.
|
|
242
|
-
|
|
243
|
-
**Usage Plan:**
|
|
244
|
-
|
|
245
|
-
====================================== ==============
|
|
246
|
-
Rate (requests per second) Burst
|
|
247
|
-
====================================== ==============
|
|
248
|
-
.5 1
|
|
249
|
-
====================================== ==============
|
|
250
|
-
|
|
251
|
-
Args:
|
|
252
|
-
requests_: Optional (Body) [dict] The request associated with the getItemOffersBatch API call.
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
Returns:
|
|
256
|
-
ApiResponse
|
|
257
|
-
|
|
258
|
-
"""
|
|
259
|
-
if isinstance(requests_, GetItemOffersBatchRequest):
|
|
260
|
-
get_item_offers_batch_request = requests_.to_dict()
|
|
261
|
-
else:
|
|
262
|
-
get_item_offers_batch_request = {"requests": requests_}
|
|
263
|
-
|
|
264
|
-
return await self._request(
|
|
265
|
-
kwargs.pop("path"),
|
|
266
|
-
data=get_item_offers_batch_request,
|
|
267
|
-
params={**kwargs},
|
|
268
|
-
add_marketplace=False,
|
|
269
|
-
)
|
|
270
|
-
|
|
271
|
-
@sp_endpoint("/batches/products/pricing/v0/listingOffers", method="POST")
|
|
272
|
-
async def get_listing_offers_batch(
|
|
273
|
-
self,
|
|
274
|
-
requests_: Optional[Union[List[Dict], GetListingOffersBatchRequest]] = None,
|
|
275
|
-
**kwargs,
|
|
276
|
-
) -> ApiResponse:
|
|
277
|
-
"""
|
|
278
|
-
get_listing_offers_batch(self, requests_: Optional[Union[List[Dict], GetListingOffersBatchRequest]], **kwargs) -> ApiResponse
|
|
279
|
-
Returns the lowest priced offers for a batch of listings based on ASIN.
|
|
280
|
-
|
|
281
|
-
**Usage Plan:**
|
|
282
|
-
|
|
283
|
-
====================================== ==============
|
|
284
|
-
Rate (requests per second) Burst
|
|
285
|
-
====================================== ==============
|
|
286
|
-
.5 1
|
|
287
|
-
====================================== ==============
|
|
288
|
-
|
|
289
|
-
Args:
|
|
290
|
-
requests_: Optional (Body) [dict] The request associated with the getListingOffersBatch API call.
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
Returns:
|
|
294
|
-
ApiResponse
|
|
295
|
-
|
|
296
|
-
"""
|
|
297
|
-
if isinstance(requests_, GetListingOffersBatchRequest):
|
|
298
|
-
get_listing_offers_batch_request = requests_.to_dict()
|
|
299
|
-
else:
|
|
300
|
-
get_listing_offers_batch_request = {"requests": requests_}
|
|
6
|
+
from sp_api.asyncio.base import AsyncBaseClient
|
|
7
|
+
from sp_api.util.versioned_client import VersionedClientMeta
|
|
301
8
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
data=get_listing_offers_batch_request,
|
|
305
|
-
params={**kwargs},
|
|
306
|
-
add_marketplace=False,
|
|
307
|
-
)
|
|
9
|
+
from .products_2022_05_01 import ProductsV20220501
|
|
10
|
+
from .products_v0 import ProductsV0
|
|
308
11
|
|
|
309
|
-
@sp_endpoint('/batches/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice', method='POST')
|
|
310
|
-
async def get_featured_offer_expected_price_batch(self, requests_: Optional[
|
|
311
|
-
Union[List[Dict], GetFeaturedOfferExpectedPriceBatch]], **kwargs) -> ApiResponse:
|
|
312
|
-
"""
|
|
313
|
-
get_featured_offer_expected_price_batch(self, **kwargs) -> ApiResponse
|
|
314
12
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
offers may change, and different offers may be featured based on other factors, including fulfillment
|
|
320
|
-
capabilities to a specific customer. The response to an unsuccessful request includes the available error text.
|
|
13
|
+
class ProductsVersion(str, enum.Enum):
|
|
14
|
+
V0 = "v0"
|
|
15
|
+
V_2022_05_01 = "2022-05-01"
|
|
16
|
+
LATEST = "2022-05-01"
|
|
321
17
|
|
|
322
|
-
**Usage Plan:**
|
|
323
18
|
|
|
324
|
-
|
|
325
|
-
Rate (requests per second) Burst
|
|
326
|
-
====================================== ==============
|
|
327
|
-
.033 1
|
|
328
|
-
====================================== ==============
|
|
19
|
+
if TYPE_CHECKING:
|
|
329
20
|
|
|
330
|
-
|
|
331
|
-
|
|
21
|
+
class _ProductsMeta(VersionedClientMeta):
|
|
22
|
+
@overload
|
|
23
|
+
def __call__(
|
|
24
|
+
cls,
|
|
25
|
+
*args: Any,
|
|
26
|
+
version: Literal[ProductsVersion.V_2022_05_01, ProductsVersion.LATEST, "2022-05-01"],
|
|
27
|
+
**kwargs: Any,
|
|
28
|
+
) -> ProductsV20220501: ...
|
|
332
29
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
30
|
+
@overload
|
|
31
|
+
def __call__(
|
|
32
|
+
cls,
|
|
33
|
+
*args: Any,
|
|
34
|
+
version: Literal[ProductsVersion.V0, "v0"],
|
|
35
|
+
**kwargs: Any,
|
|
36
|
+
) -> ProductsV0: ...
|
|
340
37
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
38
|
+
@overload
|
|
39
|
+
def __call__(
|
|
40
|
+
cls,
|
|
41
|
+
*args: Any,
|
|
42
|
+
version: None = None,
|
|
43
|
+
**kwargs: Any,
|
|
44
|
+
) -> ProductsV0: ...
|
|
347
45
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
46
|
+
@overload
|
|
47
|
+
def __call__(
|
|
48
|
+
cls,
|
|
49
|
+
*args: Any,
|
|
50
|
+
version: str | ProductsVersion,
|
|
51
|
+
**kwargs: Any,
|
|
52
|
+
) -> AsyncBaseClient: ...
|
|
352
53
|
|
|
353
|
-
Returns the competitive summary response including featured buying options for the ASIN and `marketplaceId` combination.
|
|
354
54
|
|
|
355
|
-
|
|
55
|
+
else:
|
|
56
|
+
_ProductsMeta = VersionedClientMeta
|
|
356
57
|
|
|
357
|
-
====================================== ==============
|
|
358
|
-
Rate (requests per second) Burst
|
|
359
|
-
====================================== ==============
|
|
360
|
-
.033 1
|
|
361
|
-
====================================== ==============
|
|
362
58
|
|
|
363
|
-
|
|
364
|
-
|
|
59
|
+
class Products(AsyncBaseClient, metaclass=_ProductsMeta):
|
|
60
|
+
"""Product Pricing API client.
|
|
365
61
|
|
|
366
|
-
|
|
367
|
-
ApiResponse:
|
|
368
|
-
"""
|
|
369
|
-
if isinstance(requests_, GetCompetitiveSummaryBatch):
|
|
370
|
-
get_competitive_summary_batch_request = requests_.to_dict()
|
|
371
|
-
else:
|
|
372
|
-
get_competitive_summary_batch_request = {"requests": requests_}
|
|
62
|
+
This class dispatches to a versioned Product Pricing API client.
|
|
373
63
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
data=get_competitive_summary_batch_request,
|
|
377
|
-
params={**kwargs},
|
|
378
|
-
add_marketplace=False
|
|
379
|
-
)
|
|
64
|
+
If you do not pass a version, the constructor returns the oldest supported implementation ("v0").
|
|
65
|
+
"""
|
|
380
66
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
67
|
+
if TYPE_CHECKING:
|
|
68
|
+
@overload
|
|
69
|
+
def __new__(
|
|
70
|
+
cls,
|
|
71
|
+
*args: Any,
|
|
72
|
+
version: Literal[ProductsVersion.V_2022_05_01, ProductsVersion.LATEST, "2022-05-01"],
|
|
73
|
+
**kwargs: Any,
|
|
74
|
+
) -> ProductsV20220501: ...
|
|
75
|
+
|
|
76
|
+
@overload
|
|
77
|
+
def __new__(
|
|
78
|
+
cls,
|
|
79
|
+
*args: Any,
|
|
80
|
+
version: Literal[ProductsVersion.V0, "v0"],
|
|
81
|
+
**kwargs: Any,
|
|
82
|
+
) -> ProductsV0: ...
|
|
83
|
+
|
|
84
|
+
@overload
|
|
85
|
+
def __new__(
|
|
86
|
+
cls,
|
|
87
|
+
*args: Any,
|
|
88
|
+
version: None = None,
|
|
89
|
+
**kwargs: Any,
|
|
90
|
+
) -> ProductsV0: ...
|
|
91
|
+
|
|
92
|
+
@overload
|
|
93
|
+
def __new__(
|
|
94
|
+
cls,
|
|
95
|
+
*args: Any,
|
|
96
|
+
version: str | ProductsVersion,
|
|
97
|
+
**kwargs: Any,
|
|
98
|
+
) -> AsyncBaseClient: ...
|
|
99
|
+
|
|
100
|
+
_DISPATCH = True
|
|
101
|
+
|
|
102
|
+
_DEFAULT_VERSION = "v0"
|
|
103
|
+
|
|
104
|
+
_VERSION_MAP = {
|
|
105
|
+
"v0": ProductsV0,
|
|
106
|
+
"2022-05-01": ProductsV20220501,
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
_VERSION_ALIASES = {
|
|
110
|
+
"v0": "v0",
|
|
111
|
+
"2022-05-01": "2022-05-01",
|
|
112
|
+
}
|