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
|
@@ -12,7 +12,23 @@ class Notifications(AsyncBaseClient):
|
|
|
12
12
|
|
|
13
13
|
@deprecated
|
|
14
14
|
async def add_subscription(self, notification_type: NotificationType or str, **kwargs):
|
|
15
|
-
"""
|
|
15
|
+
"""
|
|
16
|
+
add_subscription(self, notification_type, **kwargs) -> ApiResponse
|
|
17
|
+
|
|
18
|
+
deprecated, use create_subscription
|
|
19
|
+
|
|
20
|
+
Examples:
|
|
21
|
+
literal blocks::
|
|
22
|
+
|
|
23
|
+
await Notifications().add_subscription("value")
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
notification_type: | required
|
|
27
|
+
**kwargs:
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
ApiResponse
|
|
31
|
+
"""
|
|
16
32
|
return self.create_subscription(notification_type, **kwargs)
|
|
17
33
|
|
|
18
34
|
@sp_endpoint("/notifications/v1/subscriptions/{}", method="POST")
|
|
@@ -23,34 +39,31 @@ class Notifications(AsyncBaseClient):
|
|
|
23
39
|
**kwargs
|
|
24
40
|
) -> ApiResponse:
|
|
25
41
|
"""
|
|
26
|
-
create_subscription(self, notification_type
|
|
27
|
-
|
|
28
|
-
Before you can subscribe, you must first create the destination by calling the createDestination operation.
|
|
29
|
-
|
|
42
|
+
create_subscription(self, notification_type, destination_id, **kwargs) -> ApiResponse
|
|
43
|
+
|
|
44
|
+
Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the `createDestination` operation. In cases where the specified notification type supports multiple payload versions, you can utilize this API to subscribe to a different payload version if you already have an existing subscription for a different payload version.
|
|
45
|
+
|
|
30
46
|
**Usage Plan:**
|
|
31
|
-
|
|
47
|
+
|
|
32
48
|
====================================== ==============
|
|
33
49
|
Rate (requests per second) Burst
|
|
34
50
|
====================================== ==============
|
|
35
51
|
1 5
|
|
36
52
|
====================================== ==============
|
|
37
|
-
|
|
53
|
+
|
|
38
54
|
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
39
|
-
|
|
55
|
+
|
|
40
56
|
Examples:
|
|
41
57
|
literal blocks::
|
|
42
|
-
|
|
43
|
-
Notifications().create_subscription(
|
|
44
|
-
|
|
58
|
+
|
|
59
|
+
await Notifications().create_subscription("value", "value")
|
|
60
|
+
|
|
45
61
|
Args:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
62
|
+
body: CreateSubscriptionRequest | required
|
|
63
|
+
param: object |
|
|
64
|
+
|
|
51
65
|
Returns:
|
|
52
|
-
ApiResponse
|
|
53
|
-
|
|
66
|
+
ApiResponse
|
|
54
67
|
"""
|
|
55
68
|
data = {
|
|
56
69
|
"destinationId": kwargs.pop("destinationId", destination_id),
|
|
@@ -73,31 +86,21 @@ class Notifications(AsyncBaseClient):
|
|
|
73
86
|
self, notification_type: NotificationType or str, **kwargs
|
|
74
87
|
) -> ApiResponse:
|
|
75
88
|
"""
|
|
76
|
-
get_subscription(self, notification_type
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
====================================== ==============
|
|
82
|
-
Rate (requests per second) Burst
|
|
83
|
-
====================================== ==============
|
|
84
|
-
1 5
|
|
85
|
-
====================================== ==============
|
|
86
|
-
|
|
87
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
88
|
-
|
|
89
|
+
get_subscription(self, notification_type, **kwargs) -> ApiResponse
|
|
90
|
+
|
|
91
|
+
Returns information about subscription of the specified notification type and payload version. `payloadVersion` is an optional parameter. When `payloadVersion` is not provided, it will return latest payload version subscription's information. You can use this API to get subscription information when you do not have a subscription identifier.
|
|
92
|
+
|
|
89
93
|
Examples:
|
|
90
94
|
literal blocks::
|
|
91
|
-
|
|
92
|
-
Notifications().get_subscription(
|
|
93
|
-
|
|
95
|
+
|
|
96
|
+
await Notifications().get_subscription("value")
|
|
97
|
+
|
|
94
98
|
Args:
|
|
95
|
-
notification_type:
|
|
99
|
+
notification_type: | required
|
|
96
100
|
**kwargs:
|
|
97
|
-
|
|
101
|
+
|
|
98
102
|
Returns:
|
|
99
|
-
ApiResponse
|
|
100
|
-
|
|
103
|
+
ApiResponse
|
|
101
104
|
"""
|
|
102
105
|
return await self._request(
|
|
103
106
|
fill_query_params(
|
|
@@ -116,31 +119,31 @@ class Notifications(AsyncBaseClient):
|
|
|
116
119
|
self, notification_type: NotificationType or str, subscription_id: str, **kwargs
|
|
117
120
|
) -> ApiResponse:
|
|
118
121
|
"""
|
|
119
|
-
delete_notification_subscription(self, notification_type
|
|
120
|
-
|
|
121
|
-
The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById
|
|
122
|
-
|
|
122
|
+
delete_notification_subscription(self, notification_type, subscription_id, **kwargs) -> ApiResponse
|
|
123
|
+
|
|
124
|
+
Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The `deleteSubscriptionById` operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).
|
|
125
|
+
|
|
123
126
|
**Usage Plan:**
|
|
124
|
-
|
|
127
|
+
|
|
125
128
|
====================================== ==============
|
|
126
129
|
Rate (requests per second) Burst
|
|
127
130
|
====================================== ==============
|
|
128
131
|
1 5
|
|
129
132
|
====================================== ==============
|
|
130
|
-
|
|
133
|
+
|
|
131
134
|
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
132
|
-
|
|
135
|
+
|
|
133
136
|
Examples:
|
|
134
|
-
|
|
135
|
-
|
|
137
|
+
literal blocks::
|
|
138
|
+
|
|
139
|
+
await Notifications().delete_notification_subscription("value", "value")
|
|
140
|
+
|
|
136
141
|
Args:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
subscriptionId: object | required The identifier for the subscription that you want to delete.
|
|
143
|
+
param: object |
|
|
144
|
+
|
|
141
145
|
Returns:
|
|
142
|
-
ApiResponse
|
|
143
|
-
|
|
146
|
+
ApiResponse
|
|
144
147
|
"""
|
|
145
148
|
return await self._request(
|
|
146
149
|
fill_query_params(
|
|
@@ -165,32 +168,24 @@ class Notifications(AsyncBaseClient):
|
|
|
165
168
|
**kwargs
|
|
166
169
|
) -> ApiResponse:
|
|
167
170
|
"""
|
|
168
|
-
create_destination(self, name
|
|
171
|
+
create_destination(self, name, arn, account_id, region, **kwargs) -> ApiResponse
|
|
172
|
+
|
|
169
173
|
Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see "Grantless operations" in the Selling Partner API Developer Guide.
|
|
170
|
-
|
|
171
|
-
**Usage Plan:**
|
|
172
|
-
|
|
173
|
-
====================================== ==============
|
|
174
|
-
Rate (requests per second) Burst
|
|
175
|
-
====================================== ==============
|
|
176
|
-
1 5
|
|
177
|
-
====================================== ==============
|
|
178
|
-
|
|
174
|
+
|
|
179
175
|
Examples:
|
|
180
176
|
literal blocks::
|
|
181
|
-
|
|
182
|
-
Notifications().create_destination(
|
|
183
|
-
|
|
177
|
+
|
|
178
|
+
await Notifications().create_destination("value", "value", "value", "value")
|
|
179
|
+
|
|
184
180
|
Args:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
181
|
+
name: | required
|
|
182
|
+
arn: | required
|
|
183
|
+
account_id: | required
|
|
184
|
+
region: | required
|
|
189
185
|
**kwargs:
|
|
190
|
-
|
|
186
|
+
|
|
191
187
|
Returns:
|
|
192
|
-
ApiResponse
|
|
193
|
-
|
|
188
|
+
ApiResponse
|
|
194
189
|
"""
|
|
195
190
|
resource_name = "sqs" if not account_id else "eventBridge"
|
|
196
191
|
region = region if region else self.region
|
|
@@ -214,53 +209,59 @@ class Notifications(AsyncBaseClient):
|
|
|
214
209
|
async def get_destinations(self, **kwargs) -> ApiResponse:
|
|
215
210
|
"""
|
|
216
211
|
get_destinations(self, **kwargs) -> ApiResponse
|
|
217
|
-
|
|
218
|
-
|
|
212
|
+
|
|
213
|
+
Returns information about all destinations. The `getDestinations` operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).
|
|
214
|
+
|
|
219
215
|
**Usage Plan:**
|
|
220
|
-
|
|
216
|
+
|
|
221
217
|
====================================== ==============
|
|
222
218
|
Rate (requests per second) Burst
|
|
223
219
|
====================================== ==============
|
|
224
220
|
1 5
|
|
225
221
|
====================================== ==============
|
|
226
|
-
|
|
227
|
-
|
|
222
|
+
|
|
228
223
|
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
229
|
-
|
|
224
|
+
|
|
225
|
+
Examples:
|
|
226
|
+
literal blocks::
|
|
227
|
+
|
|
228
|
+
await Notifications().get_destinations()
|
|
229
|
+
|
|
230
230
|
Args:
|
|
231
231
|
**kwargs:
|
|
232
|
-
|
|
232
|
+
|
|
233
233
|
Returns:
|
|
234
|
-
ApiResponse
|
|
235
|
-
|
|
234
|
+
ApiResponse
|
|
236
235
|
"""
|
|
237
236
|
return await self._request_grantless_operation(kwargs.pop("path"), params={**kwargs})
|
|
238
237
|
|
|
239
238
|
@sp_endpoint("/notifications/v1/destinations/{}", method="GET")
|
|
240
239
|
async def get_destination(self, destination_id: str, **kwargs) -> ApiResponse:
|
|
241
240
|
"""
|
|
242
|
-
get_destination(self, destination_id
|
|
243
|
-
|
|
244
|
-
|
|
241
|
+
get_destination(self, destination_id, **kwargs) -> ApiResponse
|
|
242
|
+
|
|
243
|
+
Returns information about the destination that you specify. The `getDestination` operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).
|
|
244
|
+
|
|
245
245
|
**Usage Plan:**
|
|
246
|
-
|
|
246
|
+
|
|
247
247
|
====================================== ==============
|
|
248
248
|
Rate (requests per second) Burst
|
|
249
249
|
====================================== ==============
|
|
250
250
|
1 5
|
|
251
251
|
====================================== ==============
|
|
252
|
-
|
|
252
|
+
|
|
253
253
|
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
|
|
255
|
+
Examples:
|
|
256
|
+
literal blocks::
|
|
257
|
+
|
|
258
|
+
await Notifications().get_destination("value")
|
|
259
|
+
|
|
256
260
|
Args:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
261
|
+
destinationId: object | required The identifier generated when you created the destination.
|
|
262
|
+
|
|
260
263
|
Returns:
|
|
261
|
-
ApiResponse
|
|
262
|
-
|
|
263
|
-
|
|
264
|
+
ApiResponse
|
|
264
265
|
"""
|
|
265
266
|
return await self._request_grantless_operation(
|
|
266
267
|
fill_query_params(kwargs.pop("path"), destination_id), params={**kwargs}
|
|
@@ -269,27 +270,64 @@ class Notifications(AsyncBaseClient):
|
|
|
269
270
|
@sp_endpoint("/notifications/v1/destinations/{}", method="DELETE")
|
|
270
271
|
async def delete_destination(self, destination_id: str, **kwargs) -> ApiResponse:
|
|
271
272
|
"""
|
|
272
|
-
delete_destination(self, destination_id
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
delete_destination(self, destination_id, **kwargs) -> ApiResponse
|
|
274
|
+
|
|
275
|
+
Deletes the destination that you specify. The `deleteDestination` operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).
|
|
276
|
+
|
|
275
277
|
**Usage Plan:**
|
|
276
|
-
|
|
278
|
+
|
|
277
279
|
====================================== ==============
|
|
278
280
|
Rate (requests per second) Burst
|
|
279
281
|
====================================== ==============
|
|
280
282
|
1 5
|
|
281
283
|
====================================== ==============
|
|
282
|
-
|
|
284
|
+
|
|
283
285
|
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
284
|
-
|
|
286
|
+
|
|
287
|
+
Examples:
|
|
288
|
+
literal blocks::
|
|
289
|
+
|
|
290
|
+
await Notifications().delete_destination("value")
|
|
291
|
+
|
|
285
292
|
Args:
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
293
|
+
destinationId: object | required The identifier for the destination that you want to delete.
|
|
294
|
+
|
|
289
295
|
Returns:
|
|
290
|
-
ApiResponse
|
|
291
|
-
|
|
296
|
+
ApiResponse
|
|
292
297
|
"""
|
|
293
298
|
return await self._request_grantless_operation(
|
|
294
299
|
fill_query_params(kwargs.pop("path"), destination_id), params={**kwargs}
|
|
295
|
-
)
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
@sp_endpoint("/notifications/v1/subscriptions/{}/{}", method="GET")
|
|
305
|
+
async def get_subscription_by_id(self, notificationType, subscriptionId, **kwargs) -> ApiResponse:
|
|
306
|
+
"""
|
|
307
|
+
get_subscription_by_id(self, notificationType, subscriptionId, **kwargs) -> ApiResponse
|
|
308
|
+
|
|
309
|
+
Returns information about a subscription for the specified notification type. The `getSubscriptionById` operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).
|
|
310
|
+
|
|
311
|
+
**Usage Plan:**
|
|
312
|
+
|
|
313
|
+
====================================== ==============
|
|
314
|
+
Rate (requests per second) Burst
|
|
315
|
+
====================================== ==============
|
|
316
|
+
1 5
|
|
317
|
+
====================================== ==============
|
|
318
|
+
|
|
319
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
320
|
+
|
|
321
|
+
Examples:
|
|
322
|
+
literal blocks::
|
|
323
|
+
|
|
324
|
+
await Notifications().get_subscription_by_id("value", "value")
|
|
325
|
+
|
|
326
|
+
Args:
|
|
327
|
+
subscriptionId: object | required The identifier for the subscription that you want to get.
|
|
328
|
+
param: object |
|
|
329
|
+
|
|
330
|
+
Returns:
|
|
331
|
+
ApiResponse
|
|
332
|
+
"""
|
|
333
|
+
return await self._request(fill_query_params(kwargs.pop("path"), notificationType, subscriptionId), params=kwargs)
|
|
@@ -6,6 +6,7 @@ from typing import Any, Literal, TYPE_CHECKING, overload
|
|
|
6
6
|
from sp_api.asyncio.base import AsyncBaseClient
|
|
7
7
|
from sp_api.base import ApiResponse, Marketplaces, deprecated, fill_query_params, sp_endpoint
|
|
8
8
|
from sp_api.util import normalize_csv_param
|
|
9
|
+
from sp_api.util.versioned_client import VersionedClientMeta
|
|
9
10
|
|
|
10
11
|
from .orders_2026_01_01 import OrdersV20260101
|
|
11
12
|
from .orders_v0 import OrdersV0
|
|
@@ -17,52 +18,12 @@ class OrdersVersion(str, enum.Enum):
|
|
|
17
18
|
LATEST = "2026-01-01"
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
class _VersionedClientMeta(type):
|
|
21
|
-
"""Metaclass that dispatches construction to a version-specific implementation.
|
|
22
|
-
|
|
23
|
-
This keeps the call-site ergonomic (`Orders(version=...)`) while allowing a single
|
|
24
|
-
place to implement the dispatch logic.
|
|
25
|
-
|
|
26
|
-
Subclasses should define:
|
|
27
|
-
- `_VERSION_MAP`: mapping of normalized version strings to implementation classes
|
|
28
|
-
- `_VERSION_ALIASES` (optional): mapping of alias strings to normalized versions
|
|
29
|
-
|
|
30
|
-
If no version is provided, the default version is used.
|
|
31
|
-
"""
|
|
32
|
-
|
|
33
|
-
def __call__(cls, *args: Any, **kwargs: Any):
|
|
34
|
-
version = kwargs.pop("version", None)
|
|
35
|
-
|
|
36
|
-
# Only dispatch for the public front class itself.
|
|
37
|
-
if cls is Orders:
|
|
38
|
-
# Backwards-compatible default: if no version is provided, return the
|
|
39
|
-
# oldest supported implementation.
|
|
40
|
-
v_raw = version if version is not None else getattr(cls, "_DEFAULT_VERSION", None)
|
|
41
|
-
if v_raw is None:
|
|
42
|
-
return super().__call__(*args, **kwargs)
|
|
43
|
-
|
|
44
|
-
v_raw = getattr(v_raw, "value", v_raw)
|
|
45
|
-
v = str(v_raw)
|
|
46
|
-
aliases: dict[str, str] = getattr(cls, "_VERSION_ALIASES", {})
|
|
47
|
-
v_norm = aliases.get(v, v)
|
|
48
|
-
|
|
49
|
-
impl_map: dict[str, type] = getattr(cls, "_VERSION_MAP", {})
|
|
50
|
-
impl = impl_map.get(v_norm)
|
|
51
|
-
if impl is not None:
|
|
52
|
-
return impl(*args, **kwargs)
|
|
53
|
-
|
|
54
|
-
supported = ", ".join(sorted(impl_map.keys()))
|
|
55
|
-
raise ValueError(f"Unsupported version {v!r}. Supported: {supported}")
|
|
56
|
-
|
|
57
|
-
return super().__call__(*args, **kwargs)
|
|
58
|
-
|
|
59
|
-
|
|
60
21
|
if TYPE_CHECKING:
|
|
61
22
|
|
|
62
|
-
class _OrdersMeta(
|
|
23
|
+
class _OrdersMeta(VersionedClientMeta):
|
|
63
24
|
@overload
|
|
64
25
|
def __call__(
|
|
65
|
-
|
|
26
|
+
cls,
|
|
66
27
|
*args: Any,
|
|
67
28
|
version: Literal[OrdersVersion.V_2026_01_01, OrdersVersion.LATEST, "2026-01-01"],
|
|
68
29
|
**kwargs: Any,
|
|
@@ -70,7 +31,7 @@ if TYPE_CHECKING:
|
|
|
70
31
|
|
|
71
32
|
@overload
|
|
72
33
|
def __call__(
|
|
73
|
-
|
|
34
|
+
cls,
|
|
74
35
|
*args: Any,
|
|
75
36
|
version: Literal[OrdersVersion.V0, "v0"],
|
|
76
37
|
**kwargs: Any,
|
|
@@ -78,7 +39,7 @@ if TYPE_CHECKING:
|
|
|
78
39
|
|
|
79
40
|
@overload
|
|
80
41
|
def __call__(
|
|
81
|
-
|
|
42
|
+
cls,
|
|
82
43
|
*args: Any,
|
|
83
44
|
version: None = None,
|
|
84
45
|
**kwargs: Any,
|
|
@@ -86,7 +47,7 @@ if TYPE_CHECKING:
|
|
|
86
47
|
|
|
87
48
|
@overload
|
|
88
49
|
def __call__(
|
|
89
|
-
|
|
50
|
+
cls,
|
|
90
51
|
*args: Any,
|
|
91
52
|
version: str | OrdersVersion,
|
|
92
53
|
**kwargs: Any,
|
|
@@ -94,7 +55,7 @@ if TYPE_CHECKING:
|
|
|
94
55
|
|
|
95
56
|
|
|
96
57
|
else:
|
|
97
|
-
_OrdersMeta =
|
|
58
|
+
_OrdersMeta = VersionedClientMeta
|
|
98
59
|
|
|
99
60
|
class Orders(AsyncBaseClient, metaclass=_OrdersMeta):
|
|
100
61
|
"""Orders API client.
|
|
@@ -141,6 +102,8 @@ class Orders(AsyncBaseClient, metaclass=_OrdersMeta):
|
|
|
141
102
|
|
|
142
103
|
_DEFAULT_VERSION = "v0"
|
|
143
104
|
|
|
105
|
+
_DISPATCH = True
|
|
106
|
+
|
|
144
107
|
_VERSION_MAP = {
|
|
145
108
|
"v0": OrdersV0,
|
|
146
109
|
"2026-01-01": OrdersV20260101,
|
|
@@ -21,47 +21,19 @@ class OrdersV20260101(AsyncBaseClient):
|
|
|
21
21
|
async def search_orders(self, **kwargs: Any) -> ApiResponse:
|
|
22
22
|
"""
|
|
23
23
|
search_orders(self, **kwargs) -> ApiResponse
|
|
24
|
-
|
|
25
|
-
You can filter the response for specific types of orders.
|
|
26
|
-
|
|
27
|
-
**Usage Plan:**
|
|
28
|
-
|
|
29
|
-
====================================== =====================
|
|
30
|
-
Rate (requests per second) Burst
|
|
31
|
-
====================================== =====================
|
|
32
|
-
See x-amzn-ratelimit-limit response See Amazon docs
|
|
33
|
-
====================================== =====================
|
|
34
|
-
|
|
35
|
-
Note:
|
|
36
|
-
The SP-API returns an `x-amzn-ratelimit-limit` (or similar) response header indicating the rate limit
|
|
37
|
-
applied to the request. Rate and burst can vary by seller/account and by any Amazon-granted overrides.
|
|
38
|
-
|
|
39
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
40
|
-
|
|
24
|
+
|
|
25
|
+
Returns orders that are created or updated during the time period that you specify. You can filter the response for specific types of orders.
|
|
26
|
+
|
|
41
27
|
Examples:
|
|
42
28
|
literal blocks::
|
|
43
|
-
|
|
44
|
-
OrdersV20260101().search_orders(
|
|
45
|
-
|
|
46
|
-
marketplaceIds=["A1PA6795UKMFR9"]
|
|
47
|
-
)
|
|
48
|
-
|
|
29
|
+
|
|
30
|
+
await OrdersV20260101().search_orders()
|
|
31
|
+
|
|
49
32
|
Args:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
key lastUpdatedAfter: str
|
|
53
|
-
key lastUpdatedBefore: str
|
|
54
|
-
key fulfillmentStatuses: [str] | str
|
|
55
|
-
key marketplaceIds: [str] | str
|
|
56
|
-
key fulfilledBy: [str] | str
|
|
57
|
-
key includedData: [str] | str
|
|
58
|
-
key paginationToken: str
|
|
59
|
-
key maxResultsPerPage: int
|
|
60
|
-
|
|
33
|
+
**kwargs:
|
|
34
|
+
|
|
61
35
|
Returns:
|
|
62
|
-
ApiResponse
|
|
63
|
-
|
|
64
|
-
|
|
36
|
+
ApiResponse
|
|
65
37
|
"""
|
|
66
38
|
|
|
67
39
|
normalize_csv_param(kwargs, "fulfillmentStatuses")
|
|
@@ -73,39 +45,21 @@ class OrdersV20260101(AsyncBaseClient):
|
|
|
73
45
|
@sp_endpoint("/orders/2026-01-01/orders/{}")
|
|
74
46
|
async def get_order(self, order_id: str, **kwargs: Any) -> ApiResponse:
|
|
75
47
|
"""
|
|
76
|
-
get_order(self, order_id
|
|
48
|
+
get_order(self, order_id, **kwargs) -> ApiResponse
|
|
49
|
+
|
|
77
50
|
Returns the order that you specify.
|
|
78
|
-
|
|
79
|
-
**Usage Plan:**
|
|
80
|
-
|
|
81
|
-
====================================== =====================
|
|
82
|
-
Rate (requests per second) Burst
|
|
83
|
-
====================================== =====================
|
|
84
|
-
See x-amzn-ratelimit-limit response See Amazon docs
|
|
85
|
-
====================================== =====================
|
|
86
|
-
|
|
87
|
-
Note:
|
|
88
|
-
The SP-API returns an `x-amzn-ratelimit-limit` (or similar) response header indicating the rate limit
|
|
89
|
-
applied to the request. Rate and burst can vary by seller/account and by any Amazon-granted overrides.
|
|
90
|
-
|
|
91
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
92
|
-
|
|
51
|
+
|
|
93
52
|
Examples:
|
|
94
53
|
literal blocks::
|
|
95
|
-
|
|
96
|
-
OrdersV20260101().get_order(
|
|
97
|
-
|
|
98
|
-
includedData=["orderItems"]
|
|
99
|
-
)
|
|
100
|
-
|
|
54
|
+
|
|
55
|
+
await OrdersV20260101().get_order("value")
|
|
56
|
+
|
|
101
57
|
Args:
|
|
102
|
-
order_id:
|
|
103
|
-
|
|
104
|
-
|
|
58
|
+
order_id: | required
|
|
59
|
+
**kwargs:
|
|
60
|
+
|
|
105
61
|
Returns:
|
|
106
|
-
ApiResponse
|
|
107
|
-
|
|
108
|
-
|
|
62
|
+
ApiResponse
|
|
109
63
|
"""
|
|
110
64
|
|
|
111
65
|
normalize_csv_param(kwargs, "includedData")
|