python-amazon-sp-api 1.9.39__py3-none-any.whl → 2.0.10__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.
Files changed (163) hide show
  1. {python_amazon_sp_api-1.9.39.dist-info → python_amazon_sp_api-2.0.10.dist-info}/METADATA +44 -8
  2. python_amazon_sp_api-2.0.10.dist-info/RECORD +253 -0
  3. {python_amazon_sp_api-1.9.39.dist-info → python_amazon_sp_api-2.0.10.dist-info}/WHEEL +1 -1
  4. {python_amazon_sp_api-1.9.39.dist-info → python_amazon_sp_api-2.0.10.dist-info}/top_level.txt +0 -1
  5. sp_api/__version__.py +1 -1
  6. sp_api/api/__init__.py +9 -3
  7. sp_api/api/application_integrations/application_integrations.py +2 -2
  8. sp_api/api/catalog/catalog.py +3 -4
  9. sp_api/api/catalog_items/catalog_items.py +3 -6
  10. sp_api/api/customer_feedback/customer_feedback.py +110 -0
  11. sp_api/api/data_kiosk/data_kiosk.py +5 -6
  12. sp_api/api/easy_ship/easy_ship.py +5 -5
  13. sp_api/api/external_fulfillment/external_fulfillment.py +706 -0
  14. sp_api/api/feeds/feeds.py +11 -8
  15. sp_api/api/fulfillment_inbound/fulfillment_inbound.py +35 -2
  16. sp_api/api/inventories/inventories.py +2 -7
  17. sp_api/api/listings_items/listings_items.py +3 -24
  18. sp_api/api/messaging/messaging.py +42 -0
  19. sp_api/api/orders/orders.py +59 -3
  20. sp_api/api/orders/orders_2026_01_01.py +54 -0
  21. sp_api/api/product_fees/product_fees.py +31 -74
  22. sp_api/api/products/products.py +3 -1
  23. sp_api/api/products/products_definitions.py +11 -169
  24. sp_api/api/reports/reports.py +61 -96
  25. sp_api/api/sales/sales.py +2 -2
  26. sp_api/asyncio/api/__init__.py +167 -0
  27. sp_api/asyncio/api/amazon_warehousing_and_distribu/__init__.py +9 -0
  28. sp_api/asyncio/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +130 -0
  29. sp_api/asyncio/api/aplus_content/__init__.py +5 -0
  30. sp_api/asyncio/api/aplus_content/aplus_content.py +330 -0
  31. sp_api/asyncio/api/application_integrations/__init__.py +5 -0
  32. sp_api/asyncio/api/application_integrations/application_integrations.py +119 -0
  33. sp_api/asyncio/api/application_management/__init__.py +5 -0
  34. sp_api/asyncio/api/application_management/application_management.py +36 -0
  35. sp_api/asyncio/api/authorization/__init__.py +5 -0
  36. sp_api/asyncio/api/authorization/authorization.py +54 -0
  37. sp_api/asyncio/api/catalog/__init__.py +5 -0
  38. sp_api/asyncio/api/catalog/catalog.py +111 -0
  39. sp_api/asyncio/api/catalog_items/__init__.py +6 -0
  40. sp_api/asyncio/api/catalog_items/catalog_items.py +93 -0
  41. sp_api/asyncio/api/clients/__init__.py +1 -0
  42. sp_api/asyncio/api/customer_feedback/__init__.py +5 -0
  43. sp_api/asyncio/api/customer_feedback/customer_feedback.py +111 -0
  44. sp_api/asyncio/api/data_kiosk/__init__.py +5 -0
  45. sp_api/asyncio/api/data_kiosk/data_kiosk.py +236 -0
  46. sp_api/asyncio/api/easy_ship/__init__.py +5 -0
  47. sp_api/asyncio/api/easy_ship/easy_ship.py +191 -0
  48. sp_api/asyncio/api/external_fulfillment/__init__.py +5 -0
  49. sp_api/asyncio/api/external_fulfillment/external_fulfillment.py +706 -0
  50. sp_api/asyncio/api/fba_inbound_eligibility/__init__.py +5 -0
  51. sp_api/asyncio/api/fba_inbound_eligibility/fba_inbound_eligibility.py +96 -0
  52. sp_api/asyncio/api/fba_small_and_light/__init__.py +5 -0
  53. sp_api/asyncio/api/fba_small_and_light/fba_small_and_light.py +213 -0
  54. sp_api/asyncio/api/feeds/feeds.py +260 -0
  55. sp_api/asyncio/api/finances/finances.py +100 -0
  56. sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound.py +1798 -0
  57. sp_api/asyncio/api/fulfillment_outbound/fulfillment_outbound.py +736 -0
  58. sp_api/asyncio/api/inventories/inventories.py +74 -0
  59. sp_api/asyncio/api/listings_items/listings_items.py +170 -0
  60. sp_api/asyncio/api/listings_restrictions/listings_restrictions.py +36 -0
  61. sp_api/asyncio/api/merchant_fulfillment/__init__.py +0 -0
  62. sp_api/asyncio/api/merchant_fulfillment/merchant_fulfillment.py +384 -0
  63. sp_api/asyncio/api/messaging/__init__.py +0 -0
  64. sp_api/asyncio/api/messaging/messaging.py +511 -0
  65. sp_api/asyncio/api/models/__init__.py +4 -0
  66. sp_api/asyncio/api/notifications/__init__.py +0 -0
  67. sp_api/asyncio/api/notifications/notifications.py +295 -0
  68. sp_api/asyncio/api/orders/__init__.py +0 -0
  69. sp_api/asyncio/api/orders/orders.py +412 -0
  70. sp_api/asyncio/api/orders/orders_2026_01_01.py +40 -0
  71. sp_api/asyncio/api/overrides/__init__.py +1 -0
  72. sp_api/asyncio/api/product_fees/__init__.py +0 -0
  73. sp_api/asyncio/api/product_fees/product_fees.py +194 -0
  74. sp_api/asyncio/api/product_type_definitions/__init__.py +0 -0
  75. sp_api/asyncio/api/product_type_definitions/product_type_definitions.py +75 -0
  76. sp_api/asyncio/api/products/__init__.py +0 -0
  77. sp_api/asyncio/api/products/products.py +405 -0
  78. sp_api/asyncio/api/products/products_definitions.py +11 -0
  79. sp_api/asyncio/api/replenishment/__init__.py +0 -0
  80. sp_api/asyncio/api/replenishment/replenishment.py +121 -0
  81. sp_api/asyncio/api/reports/__init__.py +0 -0
  82. sp_api/asyncio/api/reports/reports.py +439 -0
  83. sp_api/asyncio/api/sales/__init__.py +0 -0
  84. sp_api/asyncio/api/sales/sales.py +93 -0
  85. sp_api/asyncio/api/sellers/__init__.py +0 -0
  86. sp_api/asyncio/api/sellers/sellers.py +70 -0
  87. sp_api/asyncio/api/services/__init__.py +0 -0
  88. sp_api/asyncio/api/services/services.py +218 -0
  89. sp_api/asyncio/api/shipping/__init__.py +0 -0
  90. sp_api/asyncio/api/shipping/shipping.py +459 -0
  91. sp_api/asyncio/api/shipping/shippingV2.py +651 -0
  92. sp_api/asyncio/api/solicitations/__init__.py +0 -0
  93. sp_api/asyncio/api/solicitations/solicitations.py +78 -0
  94. sp_api/asyncio/api/supply_sources/__init__.py +0 -0
  95. sp_api/asyncio/api/supply_sources/supply_sources.py +138 -0
  96. sp_api/asyncio/api/tokens/__init__.py +0 -0
  97. sp_api/asyncio/api/tokens/tokens.py +65 -0
  98. sp_api/asyncio/api/upload/__init__.py +0 -0
  99. sp_api/asyncio/api/upload/upload.py +18 -0
  100. sp_api/asyncio/api/vendor_direct_fulfillment_inventory/__init__.py +0 -0
  101. sp_api/asyncio/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +64 -0
  102. sp_api/asyncio/api/vendor_direct_fulfillment_orders/__init__.py +0 -0
  103. sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +196 -0
  104. sp_api/asyncio/api/vendor_direct_fulfillment_payments/__init__.py +0 -0
  105. sp_api/asyncio/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +254 -0
  106. sp_api/asyncio/api/vendor_direct_fulfillment_shipping/__init__.py +0 -0
  107. sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +627 -0
  108. sp_api/asyncio/api/vendor_direct_fulfillment_transactions/__init__.py +0 -0
  109. sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +43 -0
  110. sp_api/asyncio/api/vendor_invoices/__init__.py +0 -0
  111. sp_api/asyncio/api/vendor_invoices/vendor_invoices.py +295 -0
  112. sp_api/asyncio/api/vendor_orders/__init__.py +0 -0
  113. sp_api/asyncio/api/vendor_orders/vendor_orders.py +210 -0
  114. sp_api/asyncio/api/vendor_shipments/__init__.py +0 -0
  115. sp_api/asyncio/api/vendor_shipments/vendor_shipments.py +118 -0
  116. sp_api/asyncio/api/vendor_transaction_status/__init__.py +0 -0
  117. sp_api/asyncio/api/vendor_transaction_status/vendor_transaction_status.py +41 -0
  118. sp_api/asyncio/auth/__init__.py +12 -0
  119. sp_api/asyncio/auth/access_token_client.py +145 -0
  120. sp_api/asyncio/auth/exceptions.py +5 -0
  121. sp_api/asyncio/base/__init__.py +53 -0
  122. sp_api/asyncio/base/_transport_httpx.py +50 -0
  123. sp_api/asyncio/base/base_client.py +8 -0
  124. sp_api/asyncio/base/client.py +169 -0
  125. sp_api/asyncio/util/__init__.py +29 -0
  126. sp_api/asyncio/util/key_maker.py +5 -0
  127. sp_api/asyncio/util/load_all_pages.py +55 -0
  128. sp_api/asyncio/util/load_date_bound.py +53 -0
  129. sp_api/asyncio/util/retry.py +88 -0
  130. sp_api/auth/_core.py +39 -0
  131. sp_api/auth/access_token_client.py +18 -29
  132. sp_api/base/ApiResponse.py +2 -2
  133. sp_api/base/_core.py +110 -0
  134. sp_api/base/_transport_httpx.py +39 -0
  135. sp_api/base/client.py +40 -63
  136. sp_api/base/helpers.py +1 -1
  137. sp_api/util/__init__.py +36 -0
  138. sp_api/util/params.py +57 -0
  139. sp_api/util/product_fees.py +40 -0
  140. sp_api/util/products_definitions.py +169 -0
  141. sp_api/util/report_document.py +154 -0
  142. python_amazon_sp_api-1.9.39.dist-info/RECORD +0 -148
  143. tests/api/finances/test_finances.py +0 -19
  144. tests/api/notifications/test_notifications.py +0 -26
  145. tests/api/orders/test_orders.py +0 -122
  146. tests/api/product_fees/product_fees.py +0 -49
  147. tests/api/reports/test_reports.py +0 -127
  148. tests/client/test_auth.py +0 -59
  149. tests/client/test_base.py +0 -163
  150. tests/client/test_credential_provider.py +0 -45
  151. tests/client/test_helpers.py +0 -142
  152. {python_amazon_sp_api-1.9.39.data → python_amazon_sp_api-2.0.10.data}/scripts/make_endpoint +0 -0
  153. {python_amazon_sp_api-1.9.39.dist-info → python_amazon_sp_api-2.0.10.dist-info}/licenses/LICENSE +0 -0
  154. {tests → sp_api/api/customer_feedback}/__init__.py +0 -0
  155. {tests/api → sp_api/api/external_fulfillment}/__init__.py +0 -0
  156. {tests/api/finances → sp_api/asyncio}/__init__.py +0 -0
  157. {tests/api/notifications → sp_api/asyncio/api/feeds}/__init__.py +0 -0
  158. {tests/api/orders → sp_api/asyncio/api/finances}/__init__.py +0 -0
  159. {tests/api/product_fees → sp_api/asyncio/api/fulfillment_inbound}/__init__.py +0 -0
  160. {tests/api/reports → sp_api/asyncio/api/fulfillment_outbound}/__init__.py +0 -0
  161. {tests/api/sellers → sp_api/asyncio/api/inventories}/__init__.py +0 -0
  162. {tests/client → sp_api/asyncio/api/listings_items}/__init__.py +0 -0
  163. /tests/api/sellers/test_sellers.py → /sp_api/asyncio/api/listings_restrictions/__init__.py +0 -0
@@ -0,0 +1,295 @@
1
+ from sp_api.base.helpers import sp_endpoint, fill_query_params
2
+ from sp_api.base import Client, Marketplaces, deprecated, NotificationType, ApiResponse
3
+ from sp_api.asyncio.base import AsyncBaseClient
4
+
5
+
6
+ class Notifications(AsyncBaseClient):
7
+ """
8
+ :link: https://github.com/amzn/selling-partner-api-docs/blob/main/references/notifications-api/notifications.md
9
+ """
10
+
11
+ grantless_scope = "sellingpartnerapi::notifications"
12
+
13
+ @deprecated
14
+ async def add_subscription(self, notification_type: NotificationType or str, **kwargs):
15
+ """deprecated, use create_subscription"""
16
+ return self.create_subscription(notification_type, **kwargs)
17
+
18
+ @sp_endpoint("/notifications/v1/subscriptions/{}", method="POST")
19
+ async def create_subscription(
20
+ self,
21
+ notification_type: NotificationType or str,
22
+ destination_id: str = None,
23
+ **kwargs
24
+ ) -> ApiResponse:
25
+ """
26
+ create_subscription(self, notification_type: NotificationType or str, destination_id: str = None, **kwargs) -> ApiResponse
27
+ Creates a subscription for the specified notification type to be delivered to the specified destination.
28
+ Before you can subscribe, you must first create the destination by calling the createDestination operation.
29
+
30
+ **Usage Plan:**
31
+
32
+ ====================================== ==============
33
+ Rate (requests per second) Burst
34
+ ====================================== ==============
35
+ 1 5
36
+ ====================================== ==============
37
+
38
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
39
+
40
+ Examples:
41
+ literal blocks::
42
+
43
+ Notifications().create_subscription(NotificationType.MFN_ORDER_STATUS_CHANGE, destination_id='dest_id')
44
+
45
+ Args:
46
+ notification_type: NotificationType or str
47
+ destination_id: str
48
+ **kwargs:
49
+
50
+
51
+ Returns:
52
+ ApiResponse:
53
+
54
+ """
55
+ data = {
56
+ "destinationId": kwargs.pop("destinationId", destination_id),
57
+ "payloadVersion": kwargs.pop("payload_version", "1.0"),
58
+ }
59
+ return await self._request(
60
+ fill_query_params(
61
+ kwargs.pop("path"),
62
+ (
63
+ notification_type
64
+ if isinstance(notification_type, str)
65
+ else notification_type.value
66
+ ),
67
+ ),
68
+ data={**kwargs, **data},
69
+ )
70
+
71
+ @sp_endpoint("/notifications/v1/subscriptions/{}")
72
+ async def get_subscription(
73
+ self, notification_type: NotificationType or str, **kwargs
74
+ ) -> ApiResponse:
75
+ """
76
+ get_subscription(self, notification_type: NotificationType or str, **kwargs) -> ApiResponse
77
+ Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier.
78
+
79
+ **Usage Plan:**
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
+ Examples:
90
+ literal blocks::
91
+
92
+ Notifications().get_subscription(NotificationType.REPORT_PROCESSING_FINISHED)
93
+
94
+ Args:
95
+ notification_type: NotificationType or str
96
+ **kwargs:
97
+
98
+ Returns:
99
+ ApiResponse:
100
+
101
+ """
102
+ return await self._request(
103
+ fill_query_params(
104
+ kwargs.pop("path"),
105
+ (
106
+ notification_type
107
+ if isinstance(notification_type, str)
108
+ else notification_type.value
109
+ ),
110
+ ),
111
+ params={**kwargs},
112
+ )
113
+
114
+ @sp_endpoint("/notifications/v1/subscriptions/{}/{}", method="DELETE")
115
+ async def delete_notification_subscription(
116
+ self, notification_type: NotificationType or str, subscription_id: str, **kwargs
117
+ ) -> ApiResponse:
118
+ """
119
+ delete_notification_subscription(self, notification_type: NotificationType or str, subscription_id: str, **kwargs) -> ApiResponse
120
+ Deletes the subscription indicated by the subscription identifier and notification type that you specify.
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 API is grantless. For more information, see "Grantless operations" in the Selling Partner API Developer Guide.
122
+
123
+ **Usage Plan:**
124
+
125
+ ====================================== ==============
126
+ Rate (requests per second) Burst
127
+ ====================================== ==============
128
+ 1 5
129
+ ====================================== ==============
130
+
131
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
132
+
133
+ Examples:
134
+ Notifications().delete_notification_subscription(NotificationType.MFN_ORDER_STATUS_CHANGE, 'subscription_id')
135
+
136
+ Args:
137
+ notification_type: NotificationType or str
138
+ subscription_id: str
139
+ **kwargs:
140
+
141
+ Returns:
142
+ ApiResponse:
143
+
144
+ """
145
+ return await self._request(
146
+ fill_query_params(
147
+ kwargs.pop("path"),
148
+ (
149
+ notification_type
150
+ if isinstance(notification_type, str)
151
+ else notification_type.value
152
+ ),
153
+ subscription_id,
154
+ ),
155
+ params={**kwargs},
156
+ )
157
+
158
+ @sp_endpoint(path="/notifications/v1/destinations", method="POST")
159
+ async def create_destination(
160
+ self,
161
+ name: str,
162
+ arn: str = None,
163
+ account_id: str = None,
164
+ region: str = None,
165
+ **kwargs
166
+ ) -> ApiResponse:
167
+ """
168
+ create_destination(self, name: str, arn: str, **kwargs) -> ApiResponse
169
+ 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
+
179
+ Examples:
180
+ literal blocks::
181
+
182
+ Notifications().create_destination(name='test', arn='arn:aws:sqs:us-east-2:444455556666:queue1')
183
+
184
+ Args:
185
+ account_id:
186
+ region:
187
+ name: str
188
+ arn: str
189
+ **kwargs:
190
+
191
+ Returns:
192
+ ApiResponse:
193
+
194
+ """
195
+ resource_name = "sqs" if not account_id else "eventBridge"
196
+ region = region if region else self.region
197
+
198
+ data = {
199
+ "resourceSpecification": {
200
+ resource_name: (
201
+ {"arn": arn}
202
+ if not account_id
203
+ else {"region": region, "accountId": account_id}
204
+ )
205
+ },
206
+ "name": name,
207
+ }
208
+
209
+ return await self._request_grantless_operation(
210
+ kwargs.pop("path"), data={**kwargs, **data}
211
+ )
212
+
213
+ @sp_endpoint("/notifications/v1/destinations", method="GET")
214
+ async def get_destinations(self, **kwargs) -> ApiResponse:
215
+ """
216
+ get_destinations(self, **kwargs) -> ApiResponse
217
+ Returns information about all destinations. The getDestinations API is grantless. For more information, see "Grantless operations" in the Selling Partner API Developer Guide.
218
+
219
+ **Usage Plan:**
220
+
221
+ ====================================== ==============
222
+ Rate (requests per second) Burst
223
+ ====================================== ==============
224
+ 1 5
225
+ ====================================== ==============
226
+
227
+
228
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
229
+
230
+ Args:
231
+ **kwargs:
232
+
233
+ Returns:
234
+ ApiResponse:
235
+
236
+ """
237
+ return await self._request_grantless_operation(kwargs.pop("path"), params={**kwargs})
238
+
239
+ @sp_endpoint("/notifications/v1/destinations/{}", method="GET")
240
+ async def get_destination(self, destination_id: str, **kwargs) -> ApiResponse:
241
+ """
242
+ get_destination(self, destination_id: str, **kwargs) -> ApiResponse
243
+ Returns information about all destinations. The getDestinations API is grantless. For more information, see "Grantless operations" in the Selling Partner API Developer Guide.
244
+
245
+ **Usage Plan:**
246
+
247
+ ====================================== ==============
248
+ Rate (requests per second) Burst
249
+ ====================================== ==============
250
+ 1 5
251
+ ====================================== ==============
252
+
253
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
254
+
255
+
256
+ Args:
257
+ destination_id: str
258
+ **kwargs:
259
+
260
+ Returns:
261
+ ApiResponse:
262
+
263
+
264
+ """
265
+ return await self._request_grantless_operation(
266
+ fill_query_params(kwargs.pop("path"), destination_id), params={**kwargs}
267
+ )
268
+
269
+ @sp_endpoint("/notifications/v1/destinations/{}", method="DELETE")
270
+ async def delete_destination(self, destination_id: str, **kwargs) -> ApiResponse:
271
+ """
272
+ delete_destination(self, destination_id: str, **kwargs) -> ApiResponse
273
+ Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see "Grantless operations" in the Selling Partner API Developer Guide.
274
+
275
+ **Usage Plan:**
276
+
277
+ ====================================== ==============
278
+ Rate (requests per second) Burst
279
+ ====================================== ==============
280
+ 1 5
281
+ ====================================== ==============
282
+
283
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
284
+
285
+ Args:
286
+ destination_id: str
287
+ **kwargs:
288
+
289
+ Returns:
290
+ ApiResponse:
291
+
292
+ """
293
+ return await self._request_grantless_operation(
294
+ fill_query_params(kwargs.pop("path"), destination_id), params={**kwargs}
295
+ )
File without changes