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