python-amazon-sp-api 1.9.18__py3-none-any.whl → 2.0.7__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 (167) hide show
  1. {python_amazon_sp_api-1.9.18.data → python_amazon_sp_api-2.0.7.data}/scripts/make_endpoint +2 -2
  2. {python_amazon_sp_api-1.9.18.dist-info → python_amazon_sp_api-2.0.7.dist-info}/METADATA +46 -23
  3. python_amazon_sp_api-2.0.7.dist-info/RECORD +251 -0
  4. {python_amazon_sp_api-1.9.18.dist-info → python_amazon_sp_api-2.0.7.dist-info}/WHEEL +1 -1
  5. {python_amazon_sp_api-1.9.18.dist-info → python_amazon_sp_api-2.0.7.dist-info}/top_level.txt +0 -1
  6. sp_api/__version__.py +1 -1
  7. sp_api/api/__init__.py +18 -1
  8. sp_api/api/application_integrations/application_integrations.py +118 -0
  9. sp_api/api/application_management/application_management.py +2 -1
  10. sp_api/api/catalog/catalog.py +3 -4
  11. sp_api/api/catalog_items/catalog_items.py +3 -6
  12. sp_api/api/customer_feedback/customer_feedback.py +110 -0
  13. sp_api/api/data_kiosk/data_kiosk.py +5 -6
  14. sp_api/api/easy_ship/easy_ship.py +190 -0
  15. sp_api/api/external_fulfillment/external_fulfillment.py +706 -0
  16. sp_api/api/feeds/feeds.py +11 -8
  17. sp_api/api/finances/finances.py +30 -4
  18. sp_api/api/fulfillment_inbound/fulfillment_inbound.py +35 -2
  19. sp_api/api/inventories/inventories.py +2 -7
  20. sp_api/api/listings_items/listings_items.py +3 -24
  21. sp_api/api/messaging/messaging.py +42 -0
  22. sp_api/api/orders/orders.py +7 -0
  23. sp_api/api/product_fees/product_fees.py +31 -74
  24. sp_api/api/products/products.py +80 -2
  25. sp_api/api/products/products_definitions.py +11 -85
  26. sp_api/api/reports/reports.py +65 -97
  27. sp_api/api/sales/sales.py +2 -2
  28. sp_api/asyncio/api/__init__.py +164 -0
  29. sp_api/asyncio/api/amazon_warehousing_and_distribu/__init__.py +9 -0
  30. sp_api/asyncio/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +130 -0
  31. sp_api/asyncio/api/aplus_content/__init__.py +5 -0
  32. sp_api/asyncio/api/aplus_content/aplus_content.py +330 -0
  33. sp_api/asyncio/api/application_integrations/__init__.py +5 -0
  34. sp_api/asyncio/api/application_integrations/application_integrations.py +119 -0
  35. sp_api/asyncio/api/application_management/__init__.py +5 -0
  36. sp_api/asyncio/api/application_management/application_management.py +36 -0
  37. sp_api/asyncio/api/authorization/__init__.py +5 -0
  38. sp_api/asyncio/api/authorization/authorization.py +54 -0
  39. sp_api/asyncio/api/catalog/__init__.py +5 -0
  40. sp_api/asyncio/api/catalog/catalog.py +111 -0
  41. sp_api/asyncio/api/catalog_items/__init__.py +6 -0
  42. sp_api/asyncio/api/catalog_items/catalog_items.py +93 -0
  43. sp_api/asyncio/api/clients/__init__.py +1 -0
  44. sp_api/asyncio/api/customer_feedback/__init__.py +5 -0
  45. sp_api/asyncio/api/customer_feedback/customer_feedback.py +111 -0
  46. sp_api/asyncio/api/data_kiosk/__init__.py +5 -0
  47. sp_api/asyncio/api/data_kiosk/data_kiosk.py +236 -0
  48. sp_api/asyncio/api/easy_ship/__init__.py +5 -0
  49. sp_api/asyncio/api/easy_ship/easy_ship.py +191 -0
  50. sp_api/asyncio/api/external_fulfillment/__init__.py +5 -0
  51. sp_api/asyncio/api/external_fulfillment/external_fulfillment.py +706 -0
  52. sp_api/asyncio/api/fba_inbound_eligibility/__init__.py +5 -0
  53. sp_api/asyncio/api/fba_inbound_eligibility/fba_inbound_eligibility.py +96 -0
  54. sp_api/asyncio/api/fba_small_and_light/__init__.py +5 -0
  55. sp_api/asyncio/api/fba_small_and_light/fba_small_and_light.py +213 -0
  56. sp_api/asyncio/api/feeds/feeds.py +260 -0
  57. sp_api/asyncio/api/finances/finances.py +100 -0
  58. sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound.py +1798 -0
  59. sp_api/asyncio/api/fulfillment_outbound/fulfillment_outbound.py +736 -0
  60. sp_api/asyncio/api/inventories/inventories.py +74 -0
  61. sp_api/asyncio/api/listings_items/__init__.py +0 -0
  62. sp_api/asyncio/api/listings_items/listings_items.py +170 -0
  63. sp_api/asyncio/api/listings_restrictions/__init__.py +0 -0
  64. sp_api/asyncio/api/listings_restrictions/listings_restrictions.py +36 -0
  65. sp_api/asyncio/api/merchant_fulfillment/__init__.py +0 -0
  66. sp_api/asyncio/api/merchant_fulfillment/merchant_fulfillment.py +384 -0
  67. sp_api/asyncio/api/messaging/__init__.py +0 -0
  68. sp_api/asyncio/api/messaging/messaging.py +511 -0
  69. sp_api/asyncio/api/models/__init__.py +4 -0
  70. sp_api/asyncio/api/notifications/__init__.py +0 -0
  71. sp_api/asyncio/api/notifications/notifications.py +295 -0
  72. sp_api/asyncio/api/orders/__init__.py +0 -0
  73. sp_api/asyncio/api/orders/orders.py +362 -0
  74. sp_api/asyncio/api/overrides/__init__.py +1 -0
  75. sp_api/asyncio/api/product_fees/__init__.py +0 -0
  76. sp_api/asyncio/api/product_fees/product_fees.py +194 -0
  77. sp_api/asyncio/api/product_type_definitions/__init__.py +0 -0
  78. sp_api/asyncio/api/product_type_definitions/product_type_definitions.py +75 -0
  79. sp_api/asyncio/api/products/__init__.py +0 -0
  80. sp_api/asyncio/api/products/products.py +405 -0
  81. sp_api/asyncio/api/products/products_definitions.py +11 -0
  82. sp_api/asyncio/api/replenishment/__init__.py +0 -0
  83. sp_api/asyncio/api/replenishment/replenishment.py +121 -0
  84. sp_api/asyncio/api/reports/__init__.py +0 -0
  85. sp_api/asyncio/api/reports/reports.py +439 -0
  86. sp_api/asyncio/api/sales/__init__.py +0 -0
  87. sp_api/asyncio/api/sales/sales.py +93 -0
  88. sp_api/asyncio/api/sellers/__init__.py +0 -0
  89. sp_api/asyncio/api/sellers/sellers.py +70 -0
  90. sp_api/asyncio/api/services/__init__.py +0 -0
  91. sp_api/asyncio/api/services/services.py +218 -0
  92. sp_api/asyncio/api/shipping/__init__.py +0 -0
  93. sp_api/asyncio/api/shipping/shipping.py +459 -0
  94. sp_api/asyncio/api/shipping/shippingV2.py +651 -0
  95. sp_api/asyncio/api/solicitations/__init__.py +0 -0
  96. sp_api/asyncio/api/solicitations/solicitations.py +78 -0
  97. sp_api/asyncio/api/supply_sources/__init__.py +0 -0
  98. sp_api/asyncio/api/supply_sources/supply_sources.py +138 -0
  99. sp_api/asyncio/api/tokens/__init__.py +0 -0
  100. sp_api/asyncio/api/tokens/tokens.py +65 -0
  101. sp_api/asyncio/api/upload/__init__.py +0 -0
  102. sp_api/asyncio/api/upload/upload.py +18 -0
  103. sp_api/asyncio/api/vendor_direct_fulfillment_inventory/__init__.py +0 -0
  104. sp_api/asyncio/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +64 -0
  105. sp_api/asyncio/api/vendor_direct_fulfillment_orders/__init__.py +0 -0
  106. sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +196 -0
  107. sp_api/asyncio/api/vendor_direct_fulfillment_payments/__init__.py +0 -0
  108. sp_api/asyncio/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +254 -0
  109. sp_api/asyncio/api/vendor_direct_fulfillment_shipping/__init__.py +0 -0
  110. sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +627 -0
  111. sp_api/asyncio/api/vendor_direct_fulfillment_transactions/__init__.py +0 -0
  112. sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +43 -0
  113. sp_api/asyncio/api/vendor_invoices/__init__.py +0 -0
  114. sp_api/asyncio/api/vendor_invoices/vendor_invoices.py +295 -0
  115. sp_api/asyncio/api/vendor_orders/__init__.py +0 -0
  116. sp_api/asyncio/api/vendor_orders/vendor_orders.py +210 -0
  117. sp_api/asyncio/api/vendor_shipments/__init__.py +0 -0
  118. sp_api/asyncio/api/vendor_shipments/vendor_shipments.py +118 -0
  119. sp_api/asyncio/api/vendor_transaction_status/__init__.py +0 -0
  120. sp_api/asyncio/api/vendor_transaction_status/vendor_transaction_status.py +41 -0
  121. sp_api/asyncio/auth/__init__.py +12 -0
  122. sp_api/asyncio/auth/access_token_client.py +145 -0
  123. sp_api/asyncio/auth/exceptions.py +5 -0
  124. sp_api/asyncio/base/__init__.py +53 -0
  125. sp_api/asyncio/base/_transport_httpx.py +50 -0
  126. sp_api/asyncio/base/base_client.py +8 -0
  127. sp_api/asyncio/base/client.py +169 -0
  128. sp_api/asyncio/util/__init__.py +29 -0
  129. sp_api/asyncio/util/key_maker.py +5 -0
  130. sp_api/asyncio/util/load_all_pages.py +55 -0
  131. sp_api/asyncio/util/load_date_bound.py +53 -0
  132. sp_api/asyncio/util/retry.py +88 -0
  133. sp_api/auth/_core.py +39 -0
  134. sp_api/auth/access_token_client.py +18 -29
  135. sp_api/base/ApiResponse.py +3 -2
  136. sp_api/base/_core.py +110 -0
  137. sp_api/base/_transport_httpx.py +39 -0
  138. sp_api/base/client.py +40 -63
  139. sp_api/base/helpers.py +1 -1
  140. sp_api/base/reportTypes.py +3 -2
  141. sp_api/util/__init__.py +36 -0
  142. sp_api/util/load_all_pages.py +2 -1
  143. sp_api/util/params.py +57 -0
  144. sp_api/util/product_fees.py +40 -0
  145. sp_api/util/products_definitions.py +169 -0
  146. sp_api/util/report_document.py +154 -0
  147. python_amazon_sp_api-1.9.18.dist-info/RECORD +0 -144
  148. tests/api/finances/test_finances.py +0 -19
  149. tests/api/notifications/test_notifications.py +0 -26
  150. tests/api/orders/test_orders.py +0 -122
  151. tests/api/product_fees/product_fees.py +0 -49
  152. tests/api/reports/test_reports.py +0 -127
  153. tests/client/test_auth.py +0 -59
  154. tests/client/test_base.py +0 -163
  155. tests/client/test_credential_provider.py +0 -45
  156. tests/client/test_helpers.py +0 -142
  157. {python_amazon_sp_api-1.9.18.dist-info → python_amazon_sp_api-2.0.7.dist-info/licenses}/LICENSE +0 -0
  158. {tests → sp_api/api/application_integrations}/__init__.py +0 -0
  159. {tests/api → sp_api/api/customer_feedback}/__init__.py +0 -0
  160. {tests/api/finances → sp_api/api/easy_ship}/__init__.py +0 -0
  161. {tests/api/notifications → sp_api/api/external_fulfillment}/__init__.py +0 -0
  162. {tests/api/orders → sp_api/asyncio}/__init__.py +0 -0
  163. {tests/api/product_fees → sp_api/asyncio/api/feeds}/__init__.py +0 -0
  164. {tests/api/reports → sp_api/asyncio/api/finances}/__init__.py +0 -0
  165. {tests/api/sellers → sp_api/asyncio/api/fulfillment_inbound}/__init__.py +0 -0
  166. {tests/client → sp_api/asyncio/api/fulfillment_outbound}/__init__.py +0 -0
  167. /tests/api/sellers/test_sellers.py → /sp_api/asyncio/api/inventories/__init__.py +0 -0
@@ -0,0 +1,70 @@
1
+ from sp_api.base.helpers import sp_endpoint
2
+ from sp_api.base import Client, Marketplaces, ApiResponse
3
+ from sp_api.asyncio.base import AsyncBaseClient
4
+
5
+
6
+ class Sellers(AsyncBaseClient):
7
+ """
8
+ :link: https://github.com/amzn/selling-partner-api-docs/blob/main/references/sellers-api/sellers.md
9
+
10
+ """
11
+
12
+ @sp_endpoint("/sellers/v1/marketplaceParticipations")
13
+ async def get_marketplace_participation(self, **kwargs) -> ApiResponse:
14
+ """
15
+ get_marketplace_participation(self, **kwargs) -> ApiResponse
16
+ Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller's participation in those marketplaces.
17
+
18
+ **Usage Plan:**
19
+
20
+ ====================================== ==============
21
+ Rate (requests per second) Burst
22
+ ====================================== ==============
23
+ .016 15
24
+ ====================================== ==============
25
+
26
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
27
+
28
+ Examples:
29
+ literal blocks::
30
+
31
+ res = Sellers().get_marketplace_participation()
32
+
33
+ Args:
34
+ **kwargs:
35
+
36
+ Returns:
37
+ GetMarketplaceParticipationsResponse:
38
+
39
+ """
40
+ return await self._request(kwargs.pop("path"), add_marketplace=False)
41
+
42
+ @sp_endpoint("/sellers/v1/account")
43
+ async def get_account(self, **kwargs) -> ApiResponse:
44
+ """
45
+ get_account(self, **kwargs) -> ApiResponse
46
+ Returns information about a seller account and its marketplaces.
47
+
48
+ **Usage Plan:**
49
+
50
+ ====================================== ==============
51
+ Rate (requests per second) Burst
52
+ ====================================== ==============
53
+ .016 15
54
+ ====================================== ==============
55
+
56
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
57
+
58
+ Examples:
59
+ literal blocks::
60
+
61
+ res = Sellers().get_account()
62
+
63
+ Args:
64
+ **kwargs:
65
+
66
+ Returns:
67
+ GetAccountResponse:
68
+
69
+ """
70
+ return await self._request(kwargs.pop("path"), add_marketplace=False)
File without changes
@@ -0,0 +1,218 @@
1
+ import urllib.parse
2
+
3
+ from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
4
+ from sp_api.asyncio.base import AsyncBaseClient
5
+
6
+
7
+ class Services(AsyncBaseClient):
8
+ """
9
+ Services SP-API Client
10
+ :link:
11
+
12
+ With the Services API, you can build applications that help service providers get and modify their service orders.
13
+ """
14
+
15
+ @sp_endpoint("/service/v1/serviceJobs/{}", method="GET")
16
+ async def get_service_job_by_service_job_id(self, serviceJobId, **kwargs) -> ApiResponse:
17
+ """
18
+ get_service_job_by_service_job_id(self, serviceJobId, **kwargs) -> ApiResponse
19
+
20
+ Gets service job details for the service job indicated by the service job identifier you specify.
21
+
22
+ **Usage Plan:**
23
+
24
+ ====================================== ==============
25
+ Rate (requests per second) Burst
26
+ ====================================== ==============
27
+ 20 40
28
+ ====================================== ==============
29
+
30
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
31
+
32
+ Args:
33
+ serviceJobId:string | * REQUIRED A service job identifier.
34
+
35
+ Returns:
36
+ ApiResponse:
37
+ """
38
+
39
+ return await self._request(
40
+ fill_query_params(kwargs.pop("path"), serviceJobId), params=kwargs
41
+ )
42
+
43
+ @sp_endpoint("/service/v1/serviceJobs/{}/cancellations", method="PUT")
44
+ async def cancel_service_job_by_service_job_id(
45
+ self, serviceJobId, **kwargs
46
+ ) -> ApiResponse:
47
+ """
48
+ cancel_service_job_by_service_job_id(self, serviceJobId, **kwargs) -> ApiResponse
49
+
50
+ Cancels the service job indicated by the service job identifier you specify.
51
+
52
+ **Usage Plan:**
53
+
54
+
55
+ ====================================== ==============
56
+ Rate (requests per second) Burst
57
+ ====================================== ==============
58
+ 5 20
59
+ ====================================== ==============
60
+
61
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
62
+
63
+ Args:
64
+ serviceJobId:string | * REQUIRED An Amazon defined service job identifier.
65
+ key cancellationReasonCode:string | * REQUIRED A cancel reason code that specifies the reason for cancelling a service job.
66
+
67
+ Returns:
68
+ ApiResponse:
69
+ """
70
+
71
+ return await self._request(
72
+ fill_query_params(kwargs.pop("path"), serviceJobId), data=kwargs
73
+ )
74
+
75
+ @sp_endpoint("/service/v1/serviceJobs/{}/completions", method="PUT")
76
+ async def complete_service_job_by_service_job_id(
77
+ self, serviceJobId, **kwargs
78
+ ) -> ApiResponse:
79
+ """
80
+ complete_service_job_by_service_job_id(self, serviceJobId, **kwargs) -> ApiResponse
81
+
82
+ Completes the service job indicated by the service job identifier you specify.
83
+
84
+ **Usage Plan:**
85
+
86
+
87
+ ====================================== ==============
88
+ Rate (requests per second) Burst
89
+ ====================================== ==============
90
+ 5 20
91
+ ====================================== ==============
92
+
93
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
94
+
95
+ Args:
96
+ serviceJobId:string | * REQUIRED An Amazon defined service job identifier.
97
+
98
+ Returns:
99
+ ApiResponse:
100
+ """
101
+
102
+ return await self._request(
103
+ fill_query_params(kwargs.pop("path"), serviceJobId), data=kwargs
104
+ )
105
+
106
+ @sp_endpoint("/service/v1/serviceJobs", method="GET")
107
+ async def get_service_jobs(self, **kwargs) -> ApiResponse:
108
+ """
109
+ get_service_jobs(self, **kwargs) -> ApiResponse
110
+
111
+ Gets service job details for the specified filter query.
112
+
113
+ **Usage Plan:**
114
+
115
+ ====================================== ==============
116
+ Rate (requests per second) Burst
117
+ ====================================== ==============
118
+ 10 40
119
+ ====================================== ==============
120
+
121
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
122
+
123
+ Args:
124
+ key serviceOrderIds: array | List of service order ids for the query you want to perform.Max values supported 20.
125
+ key serviceJobStatus: array | A list of one or more job status by which to filter the list of jobs.
126
+ key pageToken: string | String returned in the response of your previous request.
127
+ key pageSize: integer | A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20.
128
+ key sortField: string | Sort fields on which you want to sort the output.
129
+ key sortOrder: string | Sort order for the query you want to perform.
130
+ key createdAfter: string | A date used for selecting jobs created after (or at) a specified time must be in ISO 8601 format. Required if LastUpdatedAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.
131
+ key createdBefore: string | A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format.
132
+ key lastUpdatedAfter: string | A date used for selecting jobs updated after (or at) a specified time must be in ISO 8601 format. Required if createdAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.
133
+ key lastUpdatedBefore: string | A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format.
134
+ key scheduleStartDate: string | A date used for filtering jobs schedule after (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.
135
+ key scheduleEndDate: string | A date used for filtering jobs schedule before (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.
136
+ key marketplaceIds: array | * REQUIRED Used to select jobs that were placed in the specified marketplaces.
137
+
138
+ Returns:
139
+ ApiResponse:
140
+ """
141
+
142
+ return await self._request(kwargs.pop("path"), params=kwargs)
143
+
144
+ @sp_endpoint("/service/v1/serviceJobs/{}/appointments", method="POST")
145
+ async def add_appointment_for_service_job_by_service_job_id(
146
+ self, serviceJobId, **kwargs
147
+ ) -> ApiResponse:
148
+ """
149
+ add_appointment_for_service_job_by_service_job_id(self, serviceJobId, **kwargs) -> ApiResponse
150
+
151
+ Adds an appointment to the service job indicated by the service job identifier you specify.
152
+
153
+ **Usage Plan:**
154
+
155
+
156
+ ====================================== ==============
157
+ Rate (requests per second) Burst
158
+ ====================================== ==============
159
+ 5 20
160
+ ====================================== ==============
161
+
162
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
163
+
164
+ Args:
165
+ serviceJobId:string | * REQUIRED An Amazon defined service job identifier.
166
+ body: {
167
+ "appointmentTime": {
168
+ "startTime": "2019-08-24T14:15:22Z",
169
+ "durationInMinutes": 0
170
+ }
171
+ }
172
+
173
+ Returns:
174
+ ApiResponse:
175
+ """
176
+
177
+ return await self._request(
178
+ fill_query_params(kwargs.pop("path"), serviceJobId), data=kwargs
179
+ )
180
+
181
+ @sp_endpoint("/service/v1/serviceJobs/{}", method="POST")
182
+ async def reschedule_appointment_for_service_job_by_service_job_id(
183
+ self, serviceJobId, **kwargs
184
+ ) -> ApiResponse:
185
+ """
186
+ reschedule_appointment_for_service_job_by_service_job_id(self, serviceJobId, **kwargs) -> ApiResponse
187
+
188
+ Reschedules an appointment for the service job indicated by the service job identifier you specify.
189
+
190
+ **Usage Plan:**
191
+
192
+ ====================================== ==============
193
+ Rate (requests per second) Burst
194
+ ====================================== ==============
195
+ 5 20
196
+ ====================================== ==============
197
+
198
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
199
+
200
+ Args:
201
+ serviceJobId:string | * REQUIRED An Amazon defined service job identifier.
202
+ appointmentId:string | * REQUIRED An existing appointment identifier for the Service Job.
203
+ kwargs: Example | >>>
204
+ {
205
+ "appointmentTime": {
206
+ "startTime": "2019-08-24T14:15:22Z",
207
+ "durationInMinutes": 0
208
+ },
209
+ "rescheduleReasonCode": "string"
210
+ }
211
+
212
+ Returns:
213
+ ApiResponse:
214
+ """
215
+
216
+ return await self._request(
217
+ fill_query_params(kwargs.pop("path"), serviceJobId), data=kwargs
218
+ )
File without changes