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
|
@@ -15,22 +15,29 @@ class ApplicationManagement(AsyncBaseClient):
|
|
|
15
15
|
async def rotate_application_client_secret(self, **kwargs) -> ApiResponse:
|
|
16
16
|
"""
|
|
17
17
|
rotate_application_client_secret(self, **kwargs) -> ApiResponse
|
|
18
|
-
|
|
19
|
-
Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/docs/application-management-api-v2023-11-30-use-case-guide).
|
|
20
|
-
|
|
18
|
+
|
|
19
|
+
Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret).
|
|
20
|
+
|
|
21
21
|
**Usage Plan:**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
|
|
23
|
+
====================================== ==============
|
|
24
|
+
Rate (requests per second) Burst
|
|
25
|
+
====================================== ==============
|
|
26
|
+
0.0167 1
|
|
27
|
+
====================================== ==============
|
|
28
|
+
|
|
29
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
30
|
+
|
|
31
|
+
Examples:
|
|
32
|
+
literal blocks::
|
|
33
|
+
|
|
34
|
+
await ApplicationManagement().rotate_application_client_secret()
|
|
35
|
+
|
|
29
36
|
Args:
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
**kwargs:
|
|
38
|
+
|
|
32
39
|
Returns:
|
|
33
|
-
ApiResponse
|
|
40
|
+
ApiResponse
|
|
34
41
|
"""
|
|
35
42
|
|
|
36
43
|
return await self._request_grantless_operation(kwargs.pop("path"), data=kwargs)
|
|
@@ -18,37 +18,19 @@ class Authorization(AsyncBaseClient):
|
|
|
18
18
|
async def get_authorization_code(self, **kwargs) -> ApiResponse:
|
|
19
19
|
"""
|
|
20
20
|
get_authorization_code(self, **kwargs) -> ApiResponse
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller's behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API.
|
|
23
|
-
|
|
24
|
-
**Usage Plan:**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
====================================== ==============
|
|
28
|
-
Rate (requests per second) Burst
|
|
29
|
-
====================================== ==============
|
|
30
|
-
1 5
|
|
31
|
-
====================================== ==============
|
|
32
|
-
|
|
33
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
34
|
-
|
|
23
|
+
|
|
35
24
|
Examples:
|
|
36
25
|
literal blocks::
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
developerId='test',
|
|
41
|
-
sellingPartnerId='test'
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
|
|
26
|
+
|
|
27
|
+
await Authorization().get_authorization_code()
|
|
28
|
+
|
|
45
29
|
Args:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
key mwsAuthToken:string | * REQUIRED The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore.
|
|
49
|
-
|
|
30
|
+
**kwargs:
|
|
31
|
+
|
|
50
32
|
Returns:
|
|
51
|
-
ApiResponse
|
|
33
|
+
ApiResponse
|
|
52
34
|
"""
|
|
53
35
|
|
|
54
36
|
return await self._request_grantless_operation(kwargs.pop("path"), params=kwargs)
|
|
@@ -14,31 +14,21 @@ class Catalog(AsyncBaseClient):
|
|
|
14
14
|
@sp_endpoint("/catalog/v0/items/{}")
|
|
15
15
|
async def get_item(self, asin: str, **kwargs) -> ApiResponse:
|
|
16
16
|
"""
|
|
17
|
-
get_item(self, asin
|
|
17
|
+
get_item(self, asin, **kwargs) -> ApiResponse
|
|
18
|
+
|
|
18
19
|
Returns a specified item and its attributes.
|
|
19
|
-
|
|
20
|
-
**Usage Plan:**
|
|
21
|
-
|
|
22
|
-
====================================== ==============
|
|
23
|
-
Rate (requests per second) Burst
|
|
24
|
-
====================================== ==============
|
|
25
|
-
1 1
|
|
26
|
-
====================================== ==============
|
|
27
|
-
|
|
28
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
29
|
-
|
|
20
|
+
|
|
30
21
|
Examples:
|
|
31
22
|
literal blocks::
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
|
|
24
|
+
await Catalog().get_item("value")
|
|
25
|
+
|
|
35
26
|
Args:
|
|
36
|
-
asin:
|
|
37
|
-
key MarketplaceId: str
|
|
27
|
+
asin: | required
|
|
38
28
|
**kwargs:
|
|
39
|
-
|
|
29
|
+
|
|
40
30
|
Returns:
|
|
41
|
-
|
|
31
|
+
ApiResponse
|
|
42
32
|
"""
|
|
43
33
|
return await self._request(
|
|
44
34
|
fill_query_params(kwargs.pop("path"), asin), params=kwargs
|
|
@@ -48,36 +38,19 @@ class Catalog(AsyncBaseClient):
|
|
|
48
38
|
async def list_items(self, **kwargs) -> ApiResponse:
|
|
49
39
|
"""
|
|
50
40
|
list_items(self, **kwargs) -> ApiResponse
|
|
41
|
+
|
|
51
42
|
Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required.
|
|
52
|
-
|
|
53
|
-
**Usage Plan:**
|
|
54
|
-
|
|
55
|
-
====================================== ==============
|
|
56
|
-
Rate (requests per second) Burst
|
|
57
|
-
====================================== ==============
|
|
58
|
-
1 1
|
|
59
|
-
====================================== ==============
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
63
|
-
|
|
43
|
+
|
|
64
44
|
Examples:
|
|
65
45
|
literal blocks::
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
46
|
+
|
|
47
|
+
await Catalog().list_items()
|
|
48
|
+
|
|
69
49
|
Args:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
key QueryContextId: str
|
|
73
|
-
key SellerSKU: str
|
|
74
|
-
key UPC: str
|
|
75
|
-
key EAN: str
|
|
76
|
-
key ISBN: str
|
|
77
|
-
key JAN: str
|
|
78
|
-
|
|
50
|
+
**kwargs:
|
|
51
|
+
|
|
79
52
|
Returns:
|
|
80
|
-
|
|
53
|
+
ApiResponse
|
|
81
54
|
"""
|
|
82
55
|
encode_kwarg(kwargs, "Query", urllib.parse.quote_plus)
|
|
83
56
|
return await self._request(kwargs.pop("path"), params=kwargs)
|
|
@@ -86,26 +59,19 @@ class Catalog(AsyncBaseClient):
|
|
|
86
59
|
async def list_categories(self, **kwargs) -> ApiResponse:
|
|
87
60
|
"""
|
|
88
61
|
list_categories(self, **kwargs) -> ApiResponse
|
|
62
|
+
|
|
89
63
|
Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
1 2
|
|
97
|
-
====================================== ==============
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
101
|
-
|
|
64
|
+
|
|
65
|
+
Examples:
|
|
66
|
+
literal blocks::
|
|
67
|
+
|
|
68
|
+
await Catalog().list_categories()
|
|
69
|
+
|
|
102
70
|
Args:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
key SellerSKU: str
|
|
106
|
-
|
|
71
|
+
**kwargs:
|
|
72
|
+
|
|
107
73
|
Returns:
|
|
108
|
-
|
|
74
|
+
ApiResponse
|
|
109
75
|
"""
|
|
110
76
|
encode_kwarg(kwargs, "Query", urllib.parse.quote_plus)
|
|
111
77
|
return await self._request(kwargs.pop("path"), params=kwargs)
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
import enum
|
|
4
|
+
from typing import Any, Literal, TYPE_CHECKING, overload
|
|
2
5
|
|
|
3
|
-
from sp_api.base import ApiResponse, fill_query_params, sp_endpoint
|
|
4
|
-
from sp_api.util import normalize_included_data
|
|
5
6
|
from sp_api.asyncio.base import AsyncBaseClient
|
|
7
|
+
from sp_api.util.versioned_client import VersionedClientMeta
|
|
8
|
+
|
|
9
|
+
from .catalog_items_2020_12_01 import CatalogItemsV20201201
|
|
10
|
+
from .catalog_items_2022_04_01 import CatalogItemsV20220401
|
|
6
11
|
|
|
7
12
|
|
|
8
13
|
class CatalogItemsVersion(str, enum.Enum):
|
|
@@ -11,83 +16,101 @@ class CatalogItemsVersion(str, enum.Enum):
|
|
|
11
16
|
LATEST = "2022-04-01"
|
|
12
17
|
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
"""
|
|
16
|
-
CatalogItems SP-API Client
|
|
17
|
-
:link:
|
|
18
|
-
|
|
19
|
-
The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog.
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
|
-
version: CatalogItemsVersion = CatalogItemsVersion.V_2020_12_01
|
|
23
|
-
|
|
24
|
-
def __init__(self, *args, **kwargs):
|
|
25
|
-
if "version" in kwargs:
|
|
26
|
-
self.version = kwargs.get("version", CatalogItemsVersion.V_2020_12_01)
|
|
27
|
-
super().__init__(*args, **{**kwargs, "version": self.version})
|
|
19
|
+
if TYPE_CHECKING:
|
|
28
20
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
class _CatalogItemsMeta(VersionedClientMeta):
|
|
22
|
+
@overload
|
|
23
|
+
def __call__(
|
|
24
|
+
cls,
|
|
25
|
+
*args: Any,
|
|
26
|
+
version: Literal[
|
|
27
|
+
CatalogItemsVersion.V_2022_04_01, CatalogItemsVersion.LATEST, "2022-04-01"
|
|
28
|
+
],
|
|
29
|
+
**kwargs: Any,
|
|
30
|
+
) -> CatalogItemsV20220401: ...
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
@overload
|
|
33
|
+
def __call__(
|
|
34
|
+
cls,
|
|
35
|
+
*args: Any,
|
|
36
|
+
version: Literal[CatalogItemsVersion.V_2020_12_01, "2020-12-01"],
|
|
37
|
+
**kwargs: Any,
|
|
38
|
+
) -> CatalogItemsV20201201: ...
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
@overload
|
|
41
|
+
def __call__(
|
|
42
|
+
cls,
|
|
43
|
+
*args: Any,
|
|
44
|
+
version: None = None,
|
|
45
|
+
**kwargs: Any,
|
|
46
|
+
) -> CatalogItemsV20201201: ...
|
|
37
47
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
@overload
|
|
49
|
+
def __call__(
|
|
50
|
+
cls,
|
|
51
|
+
*args: Any,
|
|
52
|
+
version: str | CatalogItemsVersion,
|
|
53
|
+
**kwargs: Any,
|
|
54
|
+
) -> AsyncBaseClient: ...
|
|
43
55
|
|
|
44
|
-
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 documentation.
|
|
45
56
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
49
|
-
key includedData:array | A comma-delimited string or list of data sets to include in the response. Default: summaries.
|
|
50
|
-
key brandNames:array | A comma-delimited list of brand names to limit the search to.
|
|
51
|
-
key classificationIds:array | A comma-delimited list of classification identifiers to limit the search to.
|
|
52
|
-
key pageSize:integer | Number of results to be returned per page.
|
|
53
|
-
key pageToken:string | A token to fetch a certain page when there are multiple pages worth of results.
|
|
54
|
-
key keywordsLocale:string | The language the keywords are provided in. Defaults to the primary locale of the marketplace.
|
|
55
|
-
key locale:string | Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
57
|
+
else:
|
|
58
|
+
_CatalogItemsMeta = VersionedClientMeta
|
|
56
59
|
|
|
57
|
-
Returns:
|
|
58
|
-
ApiResponse:
|
|
59
|
-
"""
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
class CatalogItems(AsyncBaseClient, metaclass=_CatalogItemsMeta):
|
|
62
|
+
"""Catalog Items API client.
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
async def get_catalog_item(self, asin, **kwargs) -> ApiResponse:
|
|
66
|
-
"""
|
|
67
|
-
get_catalog_item(self, asin, **kwargs) -> ApiResponse
|
|
64
|
+
This class dispatches to a versioned Catalog Items API client.
|
|
68
65
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
====================================== ==============
|
|
73
|
-
Rate (requests per second) Burst
|
|
74
|
-
====================================== ==============
|
|
75
|
-
5 5
|
|
76
|
-
====================================== ==============
|
|
77
|
-
|
|
78
|
-
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 documentation.
|
|
79
|
-
|
|
80
|
-
Args:
|
|
81
|
-
asin:string | * REQUIRED The Amazon Standard Identification Number (ASIN) of the item.
|
|
82
|
-
key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers. Data sets in the response contain data only for the specified marketplaces.
|
|
83
|
-
key includedData:array | A comma-delimited string or list of data sets to include in the response. Default: summaries.
|
|
84
|
-
key locale:string | Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
85
|
-
|
|
86
|
-
Returns:
|
|
87
|
-
ApiResponse:
|
|
88
|
-
"""
|
|
66
|
+
If you do not pass a version, the constructor returns the oldest supported implementation ("2020-12-01").
|
|
67
|
+
"""
|
|
89
68
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
69
|
+
if TYPE_CHECKING:
|
|
70
|
+
@overload
|
|
71
|
+
def __new__(
|
|
72
|
+
cls,
|
|
73
|
+
*args: Any,
|
|
74
|
+
version: Literal[
|
|
75
|
+
CatalogItemsVersion.V_2022_04_01, CatalogItemsVersion.LATEST, "2022-04-01"
|
|
76
|
+
],
|
|
77
|
+
**kwargs: Any,
|
|
78
|
+
) -> CatalogItemsV20220401: ...
|
|
79
|
+
|
|
80
|
+
@overload
|
|
81
|
+
def __new__(
|
|
82
|
+
cls,
|
|
83
|
+
*args: Any,
|
|
84
|
+
version: Literal[CatalogItemsVersion.V_2020_12_01, "2020-12-01"],
|
|
85
|
+
**kwargs: Any,
|
|
86
|
+
) -> CatalogItemsV20201201: ...
|
|
87
|
+
|
|
88
|
+
@overload
|
|
89
|
+
def __new__(
|
|
90
|
+
cls,
|
|
91
|
+
*args: Any,
|
|
92
|
+
version: None = None,
|
|
93
|
+
**kwargs: Any,
|
|
94
|
+
) -> CatalogItemsV20201201: ...
|
|
95
|
+
|
|
96
|
+
@overload
|
|
97
|
+
def __new__(
|
|
98
|
+
cls,
|
|
99
|
+
*args: Any,
|
|
100
|
+
version: str | CatalogItemsVersion,
|
|
101
|
+
**kwargs: Any,
|
|
102
|
+
) -> AsyncBaseClient: ...
|
|
103
|
+
|
|
104
|
+
_DISPATCH = True
|
|
105
|
+
|
|
106
|
+
_DEFAULT_VERSION = "2020-12-01"
|
|
107
|
+
|
|
108
|
+
_VERSION_MAP = {
|
|
109
|
+
"2020-12-01": CatalogItemsV20201201,
|
|
110
|
+
"2022-04-01": CatalogItemsV20220401,
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
_VERSION_ALIASES = {
|
|
114
|
+
"2020-12-01": "2020-12-01",
|
|
115
|
+
"2022-04-01": "2022-04-01",
|
|
116
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
from sp_api.base import sp_endpoint, fill_query_params, ApiResponse
|
|
2
|
+
from sp_api.asyncio.base import AsyncBaseClient
|
|
3
|
+
from sp_api.util import normalize_included_data
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CatalogItemsV20201201(AsyncBaseClient):
|
|
7
|
+
"""
|
|
8
|
+
CatalogItems SP-API Client
|
|
9
|
+
:link:
|
|
10
|
+
|
|
11
|
+
The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
@sp_endpoint("/catalog/2020-12-01/items", method="GET")
|
|
15
|
+
async def search_catalog_items(self, **kwargs) -> ApiResponse:
|
|
16
|
+
"""
|
|
17
|
+
search_catalog_items(self, **kwargs) -> ApiResponse
|
|
18
|
+
|
|
19
|
+
Search for and return a list of Amazon catalog items and associated information.
|
|
20
|
+
|
|
21
|
+
**Usage Plan:**
|
|
22
|
+
|
|
23
|
+
====================================== ==============
|
|
24
|
+
Rate (requests per second) Burst
|
|
25
|
+
====================================== ==============
|
|
26
|
+
2 2
|
|
27
|
+
====================================== ==============
|
|
28
|
+
|
|
29
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
30
|
+
|
|
31
|
+
Examples:
|
|
32
|
+
literal blocks::
|
|
33
|
+
|
|
34
|
+
await CatalogItemsV20201201().search_catalog_items()
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
key keywords: object | required A comma-delimited list of words or item identifiers to search the Amazon catalog for.
|
|
38
|
+
key marketplaceIds: object | required A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
39
|
+
key includedData: object | A comma-delimited list of data sets to include in the response. Default: summaries.
|
|
40
|
+
key brandNames: object | A comma-delimited list of brand names to limit the search to.
|
|
41
|
+
key classificationIds: object | A comma-delimited list of classification identifiers to limit the search to.
|
|
42
|
+
key pageSize: object | Number of results to be returned per page.
|
|
43
|
+
key pageToken: object | A token to fetch a certain page when there are multiple pages worth of results.
|
|
44
|
+
key keywordsLocale: object | The language the keywords are provided in. Defaults to the primary locale of the marketplace.
|
|
45
|
+
key locale: object | Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
46
|
+
|
|
47
|
+
Returns:
|
|
48
|
+
ApiResponse
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
normalize_included_data(kwargs)
|
|
52
|
+
return await self._request(kwargs.pop("path"), params=kwargs)
|
|
53
|
+
|
|
54
|
+
@sp_endpoint("/catalog/2020-12-01/items/{}", method="GET")
|
|
55
|
+
async def get_catalog_item(self, asin, **kwargs) -> ApiResponse:
|
|
56
|
+
"""
|
|
57
|
+
get_catalog_item(self, asin, **kwargs) -> ApiResponse
|
|
58
|
+
|
|
59
|
+
Retrieves details for an item in the Amazon catalog.
|
|
60
|
+
|
|
61
|
+
**Usage Plan:**
|
|
62
|
+
|
|
63
|
+
====================================== ==============
|
|
64
|
+
Rate (requests per second) Burst
|
|
65
|
+
====================================== ==============
|
|
66
|
+
2 2
|
|
67
|
+
====================================== ==============
|
|
68
|
+
|
|
69
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
70
|
+
|
|
71
|
+
Examples:
|
|
72
|
+
literal blocks::
|
|
73
|
+
|
|
74
|
+
await CatalogItemsV20201201().get_catalog_item("value")
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
asin: object | required The Amazon Standard Identification Number (ASIN) of the item.
|
|
78
|
+
key marketplaceIds: object | required A comma-delimited list of Amazon marketplace identifiers. Data sets in the response contain data only for the specified marketplaces.
|
|
79
|
+
key includedData: object | A comma-delimited list of data sets to include in the response. Default: summaries.
|
|
80
|
+
key locale: object | Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
ApiResponse
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
normalize_included_data(kwargs)
|
|
87
|
+
return await self._request(fill_query_params(kwargs.pop("path"), asin), params=kwargs)
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
from sp_api.base import sp_endpoint, fill_query_params, ApiResponse
|
|
2
|
+
from sp_api.asyncio.base import AsyncBaseClient
|
|
3
|
+
from sp_api.util import normalize_included_data
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CatalogItemsV20220401(AsyncBaseClient):
|
|
7
|
+
"""
|
|
8
|
+
CatalogItems SP-API Client
|
|
9
|
+
:link:
|
|
10
|
+
|
|
11
|
+
The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
@sp_endpoint("/catalog/2022-04-01/items", method="GET")
|
|
15
|
+
async def search_catalog_items(self, **kwargs) -> ApiResponse:
|
|
16
|
+
"""
|
|
17
|
+
search_catalog_items(self, **kwargs) -> ApiResponse
|
|
18
|
+
|
|
19
|
+
Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords.
|
|
20
|
+
|
|
21
|
+
**Usage Plan:**
|
|
22
|
+
|
|
23
|
+
====================================== ==============
|
|
24
|
+
Rate (requests per second) Burst
|
|
25
|
+
====================================== ==============
|
|
26
|
+
2 2
|
|
27
|
+
====================================== ==============
|
|
28
|
+
|
|
29
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
30
|
+
|
|
31
|
+
Examples:
|
|
32
|
+
literal blocks::
|
|
33
|
+
|
|
34
|
+
await CatalogItemsV20220401().search_catalog_items()
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
key identifiers: object | A comma-delimited list of product identifiers that you can use to search the Amazon catalog. **Note:** You cannot include `identifiers` and `keywords` in the same request.
|
|
38
|
+
key identifiersType: object | The type of product identifiers that you can use to search the Amazon catalog. **Note:** `identifiersType` is required when `identifiers` is in the request.
|
|
39
|
+
key marketplaceIds: object | required A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
|
|
40
|
+
key includedData: object | A comma-delimited list of datasets to include in the response.
|
|
41
|
+
key locale: object | The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
|
|
42
|
+
key sellerId: object | A selling partner identifier, such as a seller account or vendor code. **Note:** Required when `identifiersType` is `SKU`.
|
|
43
|
+
key keywords: object | A comma-delimited list of keywords that you can use to search the Amazon catalog. **Note:** You cannot include `keywords` and `identifiers` in the same request.
|
|
44
|
+
key brandNames: object | A comma-delimited list of brand names that you can use to limit the search in queries based on `keywords`. **Note:** Cannot be used with `identifiers`.
|
|
45
|
+
key classificationIds: object | A comma-delimited list of classification identifiers that you can use to limit the search in queries based on `keywords`. **Note:** Cannot be used with `identifiers`.
|
|
46
|
+
key pageSize: object | The number of results to include on each page.
|
|
47
|
+
key pageToken: object | A token that you can use to fetch a specific page when there are multiple pages of results.
|
|
48
|
+
key keywordsLocale: object | The language of the keywords that are included in queries based on `keywords`. Defaults to the primary locale of the marketplace. **Note:** Cannot be used with `identifiers`.
|
|
49
|
+
|
|
50
|
+
Returns:
|
|
51
|
+
ApiResponse
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
normalize_included_data(kwargs)
|
|
55
|
+
return await self._request(kwargs.pop("path"), params=kwargs)
|
|
56
|
+
|
|
57
|
+
@sp_endpoint("/catalog/2022-04-01/items/{}", method="GET")
|
|
58
|
+
async def get_catalog_item(self, asin, **kwargs) -> ApiResponse:
|
|
59
|
+
"""
|
|
60
|
+
get_catalog_item(self, asin, **kwargs) -> ApiResponse
|
|
61
|
+
|
|
62
|
+
Retrieves details for an item in the Amazon catalog.
|
|
63
|
+
|
|
64
|
+
**Usage Plan:**
|
|
65
|
+
|
|
66
|
+
====================================== ==============
|
|
67
|
+
Rate (requests per second) Burst
|
|
68
|
+
====================================== ==============
|
|
69
|
+
2 2
|
|
70
|
+
====================================== ==============
|
|
71
|
+
|
|
72
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
73
|
+
|
|
74
|
+
Examples:
|
|
75
|
+
literal blocks::
|
|
76
|
+
|
|
77
|
+
await CatalogItemsV20220401().get_catalog_item("value")
|
|
78
|
+
|
|
79
|
+
Args:
|
|
80
|
+
asin: object | required The Amazon Standard Identification Number (ASIN) of the item.
|
|
81
|
+
key marketplaceIds: object | required A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
|
|
82
|
+
key includedData: object | A comma-delimited list of datasets to include in the response.
|
|
83
|
+
key locale: object | The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
ApiResponse
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
normalize_included_data(kwargs)
|
|
90
|
+
return await self._request(fill_query_params(kwargs.pop("path"), asin), params=kwargs)
|