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.
Files changed (214) hide show
  1. {python_amazon_sp_api-2.0.15.dist-info → python_amazon_sp_api-2.1.3.dist-info}/METADATA +7 -7
  2. python_amazon_sp_api-2.1.3.dist-info/RECORD +350 -0
  3. sp_api/__version__.py +1 -1
  4. sp_api/api/__init__.py +160 -4
  5. sp_api/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +85 -110
  6. sp_api/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu_2024_05_09.py +456 -0
  7. sp_api/api/aplus_content/aplus_content.py +176 -125
  8. sp_api/api/application_integrations/application_integrations.py +59 -68
  9. sp_api/api/application_management/application_management.py +20 -13
  10. sp_api/api/authorization/authorization.py +8 -26
  11. sp_api/api/catalog/catalog.py +27 -61
  12. sp_api/api/catalog_items/catalog_items.py +108 -78
  13. sp_api/api/catalog_items/catalog_items_2020_12_01.py +86 -0
  14. sp_api/api/catalog_items/catalog_items_2022_04_01.py +89 -0
  15. sp_api/api/customer_feedback/customer_feedback.py +100 -0
  16. sp_api/api/data_kiosk/data_kiosk.py +80 -75
  17. sp_api/api/delivery_by_amazon/__init__.py +0 -0
  18. sp_api/api/delivery_by_amazon/delivery_by_amazon.py +92 -0
  19. sp_api/api/delivery_by_amazon/delivery_by_amazon_2022_07_01.py +81 -0
  20. sp_api/api/easy_ship/easy_ship.py +121 -111
  21. sp_api/api/external_fulfillment/external_fulfillment.py +211 -434
  22. sp_api/api/external_fulfillment/inventory.py +120 -0
  23. sp_api/api/external_fulfillment/inventory_2021_01_06.py +71 -0
  24. sp_api/api/external_fulfillment/inventory_2024_09_11.py +96 -0
  25. sp_api/api/external_fulfillment/returns.py +120 -0
  26. sp_api/api/external_fulfillment/returns_2021_08_19.py +88 -0
  27. sp_api/api/external_fulfillment/returns_2024_09_11.py +141 -0
  28. sp_api/api/external_fulfillment/shipping.py +120 -0
  29. sp_api/api/external_fulfillment/shipping_2021_01_06.py +256 -0
  30. sp_api/api/external_fulfillment/shipping_2024_09_11.py +233 -0
  31. sp_api/api/fba_inbound_eligibility/fba_inbound_eligibility.py +30 -24
  32. sp_api/api/fba_small_and_light/fba_small_and_light.py +60 -99
  33. sp_api/api/feeds/feeds.py +75 -245
  34. sp_api/api/feeds/feeds_2021_06_30.py +320 -0
  35. sp_api/api/finances/finances.py +123 -90
  36. sp_api/api/finances/finances_2024_06_01.py +71 -0
  37. sp_api/api/finances/finances_2024_06_19.py +114 -0
  38. sp_api/api/finances/finances_v0.py +116 -0
  39. sp_api/api/fulfillment_inbound/fulfillment_inbound.py +107 -1784
  40. sp_api/api/fulfillment_inbound/fulfillment_inbound_2024_03_20.py +1722 -0
  41. sp_api/api/fulfillment_inbound/fulfillment_inbound_v0.py +1384 -0
  42. sp_api/api/fulfillment_outbound/fulfillment_outbound.py +256 -480
  43. sp_api/api/inventories/inventories.py +79 -42
  44. sp_api/api/invoices/__init__.py +0 -0
  45. sp_api/api/invoices/invoices.py +92 -0
  46. sp_api/api/invoices/invoices_2024_06_19.py +344 -0
  47. sp_api/api/listings_items/listings_items.py +110 -163
  48. sp_api/api/listings_items/listings_items_2020_09_01.py +189 -0
  49. sp_api/api/listings_items/listings_items_2021_08_01.py +233 -0
  50. sp_api/api/listings_restrictions/listings_restrictions.py +23 -10
  51. sp_api/api/merchant_fulfillment/merchant_fulfillment.py +107 -222
  52. sp_api/api/messaging/messaging.py +184 -198
  53. sp_api/api/notifications/notifications.py +144 -106
  54. sp_api/api/orders/orders.py +9 -46
  55. sp_api/api/orders/orders_2026_01_01.py +19 -65
  56. sp_api/api/orders/orders_v0.py +152 -184
  57. sp_api/api/product_fees/product_fees.py +101 -75
  58. sp_api/api/product_type_definitions/product_type_definitions.py +47 -36
  59. sp_api/api/products/products.py +94 -386
  60. sp_api/api/products/products_2022_05_01.py +96 -0
  61. sp_api/api/products/products_v0.py +389 -0
  62. sp_api/api/replenishment/replenishment.py +58 -69
  63. sp_api/api/reports/reports.py +124 -157
  64. sp_api/api/sales/sales.py +22 -39
  65. sp_api/api/seller_wallet/__init__.py +0 -0
  66. sp_api/api/seller_wallet/seller_wallet.py +92 -0
  67. sp_api/api/seller_wallet/seller_wallet_2024_03_01.py +300 -0
  68. sp_api/api/sellers/sellers.py +15 -35
  69. sp_api/api/services/services.py +479 -82
  70. sp_api/api/shipment_invoicing/__init__.py +0 -0
  71. sp_api/api/shipment_invoicing/shipment_invoicing.py +92 -0
  72. sp_api/api/shipment_invoicing/shipment_invoicing_v0.py +101 -0
  73. sp_api/api/shipping/shipping.py +94 -440
  74. sp_api/api/shipping/shippingV2.py +183 -474
  75. sp_api/api/shipping/shipping_v1.py +330 -0
  76. sp_api/api/shipping/shipping_v2.py +723 -0
  77. sp_api/api/solicitations/solicitations.py +28 -18
  78. sp_api/api/supply_sources/supply_sources.py +67 -57
  79. sp_api/api/tokens/tokens.py +14 -35
  80. sp_api/api/vehicles/__init__.py +0 -0
  81. sp_api/api/vehicles/vehicles.py +92 -0
  82. sp_api/api/vehicles/vehicles_2024_11_01.py +33 -0
  83. sp_api/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +16 -29
  84. sp_api/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +116 -189
  85. sp_api/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders_2021_12_28.py +114 -0
  86. sp_api/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders_v1.py +114 -0
  87. sp_api/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +15 -225
  88. sp_api/api/vendor_direct_fulfillment_sandbox_test_data/__init__.py +0 -0
  89. sp_api/api/vendor_direct_fulfillment_sandbox_test_data/vendor_direct_fulfillment_sandbox_test_data.py +92 -0
  90. sp_api/api/vendor_direct_fulfillment_sandbox_test_data/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.py +50 -0
  91. sp_api/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +122 -624
  92. sp_api/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping_2021_12_28.py +390 -0
  93. sp_api/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping_v1.py +320 -0
  94. sp_api/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +113 -29
  95. sp_api/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions_2021_12_28.py +47 -0
  96. sp_api/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions_v1.py +47 -0
  97. sp_api/api/vendor_invoices/vendor_invoices.py +15 -264
  98. sp_api/api/vendor_orders/vendor_orders.py +83 -131
  99. sp_api/api/vendor_shipments/vendor_shipments.py +149 -68
  100. sp_api/api/vendor_transaction_status/vendor_transaction_status.py +16 -11
  101. sp_api/asyncio/api/__init__.py +159 -4
  102. sp_api/asyncio/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +84 -110
  103. sp_api/asyncio/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu_2024_05_09.py +457 -0
  104. sp_api/asyncio/api/aplus_content/aplus_content.py +176 -125
  105. sp_api/asyncio/api/application_integrations/application_integrations.py +59 -68
  106. sp_api/asyncio/api/application_management/application_management.py +20 -13
  107. sp_api/asyncio/api/authorization/authorization.py +8 -26
  108. sp_api/asyncio/api/catalog/catalog.py +27 -61
  109. sp_api/asyncio/api/catalog_items/catalog_items.py +94 -71
  110. sp_api/asyncio/api/catalog_items/catalog_items_2020_12_01.py +87 -0
  111. sp_api/asyncio/api/catalog_items/catalog_items_2022_04_01.py +90 -0
  112. sp_api/asyncio/api/customer_feedback/customer_feedback.py +100 -0
  113. sp_api/asyncio/api/data_kiosk/data_kiosk.py +80 -75
  114. sp_api/asyncio/api/delivery_by_amazon/__init__.py +0 -0
  115. sp_api/asyncio/api/delivery_by_amazon/delivery_by_amazon.py +92 -0
  116. sp_api/asyncio/api/delivery_by_amazon/delivery_by_amazon_2022_07_01.py +82 -0
  117. sp_api/asyncio/api/easy_ship/easy_ship.py +121 -111
  118. sp_api/asyncio/api/external_fulfillment/external_fulfillment.py +212 -435
  119. sp_api/asyncio/api/external_fulfillment/inventory.py +126 -0
  120. sp_api/asyncio/api/external_fulfillment/inventory_2021_01_06.py +73 -0
  121. sp_api/asyncio/api/external_fulfillment/inventory_2024_09_11.py +98 -0
  122. sp_api/asyncio/api/external_fulfillment/returns.py +124 -0
  123. sp_api/asyncio/api/external_fulfillment/returns_2021_08_19.py +90 -0
  124. sp_api/asyncio/api/external_fulfillment/returns_2024_09_11.py +143 -0
  125. sp_api/asyncio/api/external_fulfillment/shipping.py +124 -0
  126. sp_api/asyncio/api/external_fulfillment/shipping_2021_01_06.py +258 -0
  127. sp_api/asyncio/api/external_fulfillment/shipping_2024_09_11.py +235 -0
  128. sp_api/asyncio/api/fba_inbound_eligibility/fba_inbound_eligibility.py +31 -25
  129. sp_api/asyncio/api/fba_small_and_light/fba_small_and_light.py +61 -100
  130. sp_api/asyncio/api/feeds/feeds.py +75 -243
  131. sp_api/asyncio/api/feeds/feeds_2021_06_30.py +318 -0
  132. sp_api/asyncio/api/finances/finances.py +123 -91
  133. sp_api/asyncio/api/finances/finances_2024_06_01.py +72 -0
  134. sp_api/asyncio/api/finances/finances_2024_06_19.py +115 -0
  135. sp_api/asyncio/api/finances/finances_v0.py +117 -0
  136. sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound.py +107 -1785
  137. sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound_2024_03_20.py +1723 -0
  138. sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound_v0.py +1385 -0
  139. sp_api/asyncio/api/fulfillment_outbound/fulfillment_outbound.py +257 -481
  140. sp_api/asyncio/api/inventories/inventories.py +79 -42
  141. sp_api/asyncio/api/invoices/__init__.py +0 -0
  142. sp_api/asyncio/api/invoices/invoices.py +92 -0
  143. sp_api/asyncio/api/invoices/invoices_2024_06_19.py +345 -0
  144. sp_api/asyncio/api/listings_items/listings_items.py +109 -163
  145. sp_api/asyncio/api/listings_items/listings_items_2020_09_01.py +190 -0
  146. sp_api/asyncio/api/listings_items/listings_items_2021_08_01.py +233 -0
  147. sp_api/asyncio/api/listings_restrictions/listings_restrictions.py +23 -10
  148. sp_api/asyncio/api/merchant_fulfillment/merchant_fulfillment.py +110 -222
  149. sp_api/asyncio/api/messaging/messaging.py +185 -199
  150. sp_api/asyncio/api/notifications/notifications.py +145 -107
  151. sp_api/asyncio/api/orders/orders.py +9 -46
  152. sp_api/asyncio/api/orders/orders_2026_01_01.py +19 -65
  153. sp_api/asyncio/api/orders/orders_v0.py +152 -184
  154. sp_api/asyncio/api/product_fees/product_fees.py +101 -75
  155. sp_api/asyncio/api/product_type_definitions/product_type_definitions.py +47 -36
  156. sp_api/asyncio/api/products/products.py +94 -387
  157. sp_api/asyncio/api/products/products_2022_05_01.py +109 -0
  158. sp_api/asyncio/api/products/products_v0.py +388 -0
  159. sp_api/asyncio/api/replenishment/replenishment.py +59 -70
  160. sp_api/asyncio/api/reports/reports.py +124 -157
  161. sp_api/asyncio/api/sales/sales.py +22 -39
  162. sp_api/asyncio/api/seller_wallet/__init__.py +0 -0
  163. sp_api/asyncio/api/seller_wallet/seller_wallet.py +92 -0
  164. sp_api/asyncio/api/seller_wallet/seller_wallet_2024_03_01.py +301 -0
  165. sp_api/asyncio/api/sellers/sellers.py +16 -36
  166. sp_api/asyncio/api/services/services.py +479 -82
  167. sp_api/asyncio/api/shipment_invoicing/__init__.py +0 -0
  168. sp_api/asyncio/api/shipment_invoicing/shipment_invoicing.py +92 -0
  169. sp_api/asyncio/api/shipment_invoicing/shipment_invoicing_v0.py +102 -0
  170. sp_api/asyncio/api/shipping/shipping.py +94 -441
  171. sp_api/asyncio/api/shipping/shippingV2.py +181 -472
  172. sp_api/asyncio/api/shipping/shipping_v1.py +331 -0
  173. sp_api/asyncio/api/shipping/shipping_v2.py +717 -0
  174. sp_api/asyncio/api/solicitations/solicitations.py +29 -19
  175. sp_api/asyncio/api/supply_sources/supply_sources.py +67 -57
  176. sp_api/asyncio/api/tokens/tokens.py +14 -35
  177. sp_api/asyncio/api/vehicles/__init__.py +0 -0
  178. sp_api/asyncio/api/vehicles/vehicles.py +92 -0
  179. sp_api/asyncio/api/vehicles/vehicles_2024_11_01.py +34 -0
  180. sp_api/asyncio/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +16 -29
  181. sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +120 -192
  182. sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders_2021_12_28.py +116 -0
  183. sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders_v1.py +115 -0
  184. sp_api/asyncio/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +15 -225
  185. sp_api/asyncio/api/vendor_direct_fulfillment_sandbox_test_data/__init__.py +0 -0
  186. sp_api/asyncio/api/vendor_direct_fulfillment_sandbox_test_data/vendor_direct_fulfillment_sandbox_test_data.py +92 -0
  187. sp_api/asyncio/api/vendor_direct_fulfillment_sandbox_test_data/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.py +51 -0
  188. sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +120 -623
  189. sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping_2021_12_28.py +392 -0
  190. sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping_v1.py +321 -0
  191. sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +112 -29
  192. sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions_2021_12_28.py +49 -0
  193. sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions_v1.py +48 -0
  194. sp_api/asyncio/api/vendor_invoices/vendor_invoices.py +16 -265
  195. sp_api/asyncio/api/vendor_orders/vendor_orders.py +84 -132
  196. sp_api/asyncio/api/vendor_shipments/vendor_shipments.py +150 -69
  197. sp_api/asyncio/api/vendor_transaction_status/vendor_transaction_status.py +17 -12
  198. sp_api/asyncio/base/client.py +2 -2
  199. sp_api/asyncio/util/load_date_bound.py +1 -1
  200. sp_api/base/__init__.py +10 -0
  201. sp_api/base/_core.py +2 -2
  202. sp_api/base/client.py +3 -3
  203. sp_api/base/helpers.py +12 -1
  204. sp_api/base/marketplaces.py +6 -3
  205. sp_api/util/__init__.py +2 -0
  206. sp_api/util/load_date_bound.py +1 -1
  207. sp_api/util/versioned_client.py +45 -0
  208. python_amazon_sp_api-2.0.15.dist-info/RECORD +0 -255
  209. sp_api/asyncio/api/models/__init__.py +0 -4
  210. sp_api/asyncio/api/overrides/__init__.py +0 -1
  211. {python_amazon_sp_api-2.0.15.data → python_amazon_sp_api-2.1.3.data}/scripts/make_endpoint +0 -0
  212. {python_amazon_sp_api-2.0.15.dist-info → python_amazon_sp_api-2.1.3.dist-info}/WHEEL +0 -0
  213. {python_amazon_sp_api-2.0.15.dist-info → python_amazon_sp_api-2.1.3.dist-info}/licenses/LICENSE +0 -0
  214. {python_amazon_sp_api-2.0.15.dist-info → python_amazon_sp_api-2.1.3.dist-info}/top_level.txt +0 -0
@@ -14,22 +14,29 @@ class ApplicationManagement(Client):
14
14
  def rotate_application_client_secret(self, **kwargs) -> ApiResponse:
15
15
  """
16
16
  rotate_application_client_secret(self, **kwargs) -> ApiResponse
17
-
18
- Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/docs/application-management-api-v2023-11-30-use-case-guide).
19
-
17
+
18
+ Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret).
19
+
20
20
  **Usage Plan:**
21
-
22
- | Rate (requests per second) | Burst |
23
- | ---- | ---- |
24
- | 0.0167 | 1 |
25
-
26
- The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
27
-
21
+
22
+ ====================================== ==============
23
+ Rate (requests per second) Burst
24
+ ====================================== ==============
25
+ 0.0167 1
26
+ ====================================== ==============
27
+
28
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
29
+
30
+ Examples:
31
+ literal blocks::
32
+
33
+ ApplicationManagement().rotate_application_client_secret()
34
+
28
35
  Args:
29
-
30
-
36
+ **kwargs:
37
+
31
38
  Returns:
32
- ApiResponse:
39
+ ApiResponse
33
40
  """
34
41
 
35
42
  return self._request_grantless_operation(kwargs.pop("path"), data=kwargs)
@@ -17,37 +17,19 @@ class Authorization(Client):
17
17
  def get_authorization_code(self, **kwargs) -> ApiResponse:
18
18
  """
19
19
  get_authorization_code(self, **kwargs) -> ApiResponse
20
-
20
+
21
21
  With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller's behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API.
22
-
23
- **Usage Plan:**
24
-
25
-
26
- ====================================== ==============
27
- Rate (requests per second) Burst
28
- ====================================== ==============
29
- 1 5
30
- ====================================== ==============
31
-
32
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
33
-
22
+
34
23
  Examples:
35
24
  literal blocks::
36
-
37
- res = Authorization().get_authorization_code(
38
- mwsAuthToken='test',
39
- developerId='test',
40
- sellingPartnerId='test'
41
- )
42
-
43
-
25
+
26
+ Authorization().get_authorization_code()
27
+
44
28
  Args:
45
- key sellingPartnerId:string | * REQUIRED The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore.
46
- key developerId:string | * REQUIRED Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central.
47
- key mwsAuthToken:string | * REQUIRED The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore.
48
-
29
+ **kwargs:
30
+
49
31
  Returns:
50
- ApiResponse:
32
+ ApiResponse
51
33
  """
52
34
 
53
35
  return self._request_grantless_operation(kwargs.pop("path"), params=kwargs)
@@ -13,31 +13,21 @@ class Catalog(Client):
13
13
  @sp_endpoint("/catalog/v0/items/{}")
14
14
  def get_item(self, asin: str, **kwargs) -> ApiResponse:
15
15
  """
16
- get_item(self, asin: str, **kwargs) -> ApiResponse
16
+ get_item(self, asin, **kwargs) -> ApiResponse
17
+
17
18
  Returns a specified item and its attributes.
18
-
19
- **Usage Plan:**
20
-
21
- ====================================== ==============
22
- Rate (requests per second) Burst
23
- ====================================== ==============
24
- 1 1
25
- ====================================== ==============
26
-
27
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
28
-
19
+
29
20
  Examples:
30
21
  literal blocks::
31
-
32
- res = Catalog().get_item('ASIN_200', MarketplaceId='TEST_CASE_200')
33
-
22
+
23
+ Catalog().get_item("value")
24
+
34
25
  Args:
35
- asin: str
36
- key MarketplaceId: str
26
+ asin: | required
37
27
  **kwargs:
38
-
28
+
39
29
  Returns:
40
- GetCatalogItemResponse:
30
+ ApiResponse
41
31
  """
42
32
  return self._request(fill_query_params(kwargs.pop("path"), asin), params=kwargs)
43
33
 
@@ -45,36 +35,19 @@ class Catalog(Client):
45
35
  def list_items(self, **kwargs) -> ApiResponse:
46
36
  """
47
37
  list_items(self, **kwargs) -> ApiResponse
38
+
48
39
  Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required.
49
-
50
- **Usage Plan:**
51
-
52
- ====================================== ==============
53
- Rate (requests per second) Burst
54
- ====================================== ==============
55
- 1 1
56
- ====================================== ==============
57
-
58
-
59
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
60
-
40
+
61
41
  Examples:
62
42
  literal blocks::
63
-
64
- res = Catalog().list_items(MarketplaceId='TEST_CASE_200', SellerSKU='SKU_200')
65
-
43
+
44
+ Catalog().list_items()
45
+
66
46
  Args:
67
- key MarketplaceId: str
68
- key Query: str
69
- key QueryContextId: str
70
- key SellerSKU: str
71
- key UPC: str
72
- key EAN: str
73
- key ISBN: str
74
- key JAN: str
75
-
47
+ **kwargs:
48
+
76
49
  Returns:
77
- ListCatalogItemsResponse:
50
+ ApiResponse
78
51
  """
79
52
  encode_kwarg(kwargs, "Query", urllib.parse.quote_plus)
80
53
  return self._request(kwargs.pop("path"), params=kwargs)
@@ -83,26 +56,19 @@ class Catalog(Client):
83
56
  def list_categories(self, **kwargs) -> ApiResponse:
84
57
  """
85
58
  list_categories(self, **kwargs) -> ApiResponse
59
+
86
60
  Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU
87
-
88
- **Usage Plan:**
89
-
90
- ====================================== ==============
91
- Rate (requests per second) Burst
92
- ====================================== ==============
93
- 1 2
94
- ====================================== ==============
95
-
96
-
97
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
98
-
61
+
62
+ Examples:
63
+ literal blocks::
64
+
65
+ Catalog().list_categories()
66
+
99
67
  Args:
100
- key MarketplaceId: str
101
- key ASIN: str
102
- key SellerSKU: str
103
-
68
+ **kwargs:
69
+
104
70
  Returns:
105
- ListCatalogCategoriesResponse:
71
+ ApiResponse
106
72
  """
107
73
  encode_kwarg(kwargs, "Query", urllib.parse.quote_plus)
108
74
  return self._request(kwargs.pop("path"), params=kwargs)
@@ -1,7 +1,13 @@
1
+ from __future__ import annotations
2
+
1
3
  import enum
4
+ from typing import Any, Literal, TYPE_CHECKING, overload
5
+ from sp_api.util.versioned_client import VersionedClientMeta
6
+
7
+ from sp_api.base import Client
2
8
 
3
- from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
4
- from sp_api.util import normalize_included_data
9
+ from .catalog_items_2020_12_01 import CatalogItemsV20201201
10
+ from .catalog_items_2022_04_01 import CatalogItemsV20220401
5
11
 
6
12
 
7
13
  class CatalogItemsVersion(str, enum.Enum):
@@ -10,81 +16,105 @@ class CatalogItemsVersion(str, enum.Enum):
10
16
  LATEST = "2022-04-01"
11
17
 
12
18
 
13
- class CatalogItems(Client):
14
- """
15
- CatalogItems SP-API Client
16
- :link:
17
-
18
- The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog.
19
+ if TYPE_CHECKING:
20
+
21
+ class _CatalogItemsMeta(VersionedClientMeta):
22
+ @overload
23
+ def __call__(
24
+ cls,
25
+ *args: Any,
26
+ version: Literal[
27
+ CatalogItemsVersion.V_2022_04_01,
28
+ CatalogItemsVersion.LATEST,
29
+ "2022-04-01",
30
+ ],
31
+ **kwargs: Any,
32
+ ) -> CatalogItemsV20220401: ...
33
+
34
+ @overload
35
+ def __call__(
36
+ cls,
37
+ *args: Any,
38
+ version: Literal[CatalogItemsVersion.V_2020_12_01, "2020-12-01"],
39
+ **kwargs: Any,
40
+ ) -> CatalogItemsV20201201: ...
41
+
42
+ @overload
43
+ def __call__(
44
+ cls,
45
+ *args: Any,
46
+ version: None = None,
47
+ **kwargs: Any,
48
+ ) -> CatalogItemsV20201201: ...
49
+
50
+ @overload
51
+ def __call__(
52
+ cls,
53
+ *args: Any,
54
+ version: str | CatalogItemsVersion,
55
+ **kwargs: Any,
56
+ ) -> Client: ...
57
+
58
+
59
+ else:
60
+ _CatalogItemsMeta = VersionedClientMeta
61
+
62
+
63
+ class CatalogItems(Client, metaclass=_CatalogItemsMeta):
64
+ """Catalog Items API client.
65
+
66
+ This class dispatches to a versioned Catalog Items API client.
67
+
68
+ If you do not pass a version, the constructor returns the oldest supported implementation ("2020-12-01").
19
69
  """
20
70
 
21
- version: CatalogItemsVersion = CatalogItemsVersion.V_2020_12_01
22
-
23
- def __init__(self, *args, **kwargs):
24
- if "version" in kwargs:
25
- self.version = kwargs.get("version", CatalogItemsVersion.V_2020_12_01)
26
- super().__init__(*args, **{**kwargs, "version": self.version})
27
-
28
- @sp_endpoint("/catalog/<version>/items", method="GET")
29
- def search_catalog_items(self, **kwargs) -> ApiResponse:
30
- """
31
- search_catalog_items(self, **kwargs) -> ApiResponse
32
-
33
- Search for and return a list of Amazon catalog items and associated information.
34
-
35
- **Usage Plans:**
36
-
37
- ====================================== ==============
38
- Rate (requests per second) Burst
39
- ====================================== ==============
40
- 1 5
41
- ====================================== ==============
42
-
43
- The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
44
-
45
- Args:
46
- key keywords:array | * REQUIRED A comma-delimited list of words or item identifiers to search the Amazon catalog for.
47
- key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers for the request.
48
- key includedData:array | A comma-delimited string or list of data sets to include in the response. Default: summaries.
49
- key brandNames:array | A comma-delimited list of brand names to limit the search to.
50
- key classificationIds:array | A comma-delimited list of classification identifiers to limit the search to.
51
- key pageSize:integer | Number of results to be returned per page.
52
- key pageToken:string | A token to fetch a certain page when there are multiple pages worth of results.
53
- key keywordsLocale:string | The language the keywords are provided in. Defaults to the primary locale of the marketplace.
54
- key locale:string | Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
55
-
56
- Returns:
57
- ApiResponse:
58
- """
59
-
60
- normalize_included_data(kwargs)
61
- return self._request(kwargs.pop("path"), params=kwargs)
62
-
63
- @sp_endpoint("/catalog/<version>/items/{}", method="GET")
64
- def get_catalog_item(self, asin, **kwargs) -> ApiResponse:
65
- """
66
- get_catalog_item(self, asin, **kwargs) -> ApiResponse
67
-
68
- Retrieves details for an item in the Amazon catalog.
69
-
70
-
71
- ====================================== ==============
72
- Rate (requests per second) Burst
73
- ====================================== ==============
74
- 5 5
75
- ====================================== ==============
76
-
77
- The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
78
-
79
- Args:
80
- asin:string | * REQUIRED The Amazon Standard Identification Number (ASIN) of the item.
81
- key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers. Data sets in the response contain data only for the specified marketplaces.
82
- key includedData:array | A comma-delimited string or list of data sets to include in the response. Default: summaries.
83
- key locale:string | Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
84
-
85
- Returns:
86
- ApiResponse:
87
- """
88
-
89
- normalize_included_data(kwargs)
90
- return self._request(fill_query_params(kwargs.pop("path"), asin), params=kwargs)
71
+ if TYPE_CHECKING:
72
+ @overload
73
+ def __new__(
74
+ cls,
75
+ *args: Any,
76
+ version: Literal[
77
+ CatalogItemsVersion.V_2022_04_01,
78
+ CatalogItemsVersion.LATEST,
79
+ "2022-04-01",
80
+ ],
81
+ **kwargs: Any,
82
+ ) -> CatalogItemsV20220401: ...
83
+
84
+ @overload
85
+ def __new__(
86
+ cls,
87
+ *args: Any,
88
+ version: Literal[CatalogItemsVersion.V_2020_12_01, "2020-12-01"],
89
+ **kwargs: Any,
90
+ ) -> CatalogItemsV20201201: ...
91
+
92
+ @overload
93
+ def __new__(
94
+ cls,
95
+ *args: Any,
96
+ version: None = None,
97
+ **kwargs: Any,
98
+ ) -> CatalogItemsV20201201: ...
99
+
100
+ @overload
101
+ def __new__(
102
+ cls,
103
+ *args: Any,
104
+ version: str | CatalogItemsVersion,
105
+ **kwargs: Any,
106
+ ) -> Client: ...
107
+
108
+ _DISPATCH = True
109
+
110
+ _DEFAULT_VERSION = "2020-12-01"
111
+
112
+ _VERSION_MAP = {
113
+ "2020-12-01": CatalogItemsV20201201,
114
+ "2022-04-01": CatalogItemsV20220401,
115
+ }
116
+
117
+ _VERSION_ALIASES = {
118
+ "2020-12-01": "2020-12-01",
119
+ "2022-04-01": "2022-04-01",
120
+ }
@@ -0,0 +1,86 @@
1
+ from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
2
+ from sp_api.util import normalize_included_data
3
+
4
+
5
+ class CatalogItemsV20201201(Client):
6
+ """
7
+ CatalogItems SP-API Client
8
+ :link:
9
+
10
+ The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog.
11
+ """
12
+
13
+ @sp_endpoint("/catalog/2020-12-01/items", method="GET")
14
+ def search_catalog_items(self, **kwargs) -> ApiResponse:
15
+ """
16
+ search_catalog_items(self, **kwargs) -> ApiResponse
17
+
18
+ Search for and return a list of Amazon catalog items and associated information.
19
+
20
+ **Usage Plan:**
21
+
22
+ ====================================== ==============
23
+ Rate (requests per second) Burst
24
+ ====================================== ==============
25
+ 2 2
26
+ ====================================== ==============
27
+
28
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
29
+
30
+ Examples:
31
+ literal blocks::
32
+
33
+ CatalogItemsV20201201().search_catalog_items()
34
+
35
+ Args:
36
+ key keywords: object | required A comma-delimited list of words or item identifiers to search the Amazon catalog for.
37
+ key marketplaceIds: object | required A comma-delimited list of Amazon marketplace identifiers for the request.
38
+ key includedData: object | A comma-delimited list of data sets to include in the response. Default: summaries.
39
+ key brandNames: object | A comma-delimited list of brand names to limit the search to.
40
+ key classificationIds: object | A comma-delimited list of classification identifiers to limit the search to.
41
+ key pageSize: object | Number of results to be returned per page.
42
+ key pageToken: object | A token to fetch a certain page when there are multiple pages worth of results.
43
+ key keywordsLocale: object | The language the keywords are provided in. Defaults to the primary locale of the marketplace.
44
+ key locale: object | Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
45
+
46
+ Returns:
47
+ ApiResponse
48
+ """
49
+
50
+ normalize_included_data(kwargs)
51
+ return self._request(kwargs.pop("path"), params=kwargs)
52
+
53
+ @sp_endpoint("/catalog/2020-12-01/items/{}", method="GET")
54
+ def get_catalog_item(self, asin, **kwargs) -> ApiResponse:
55
+ """
56
+ get_catalog_item(self, asin, **kwargs) -> ApiResponse
57
+
58
+ Retrieves details for an item in the Amazon catalog.
59
+
60
+ **Usage Plan:**
61
+
62
+ ====================================== ==============
63
+ Rate (requests per second) Burst
64
+ ====================================== ==============
65
+ 2 2
66
+ ====================================== ==============
67
+
68
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
69
+
70
+ Examples:
71
+ literal blocks::
72
+
73
+ CatalogItemsV20201201().get_catalog_item("value")
74
+
75
+ Args:
76
+ asin: object | required The Amazon Standard Identification Number (ASIN) of the item.
77
+ key marketplaceIds: object | required A comma-delimited list of Amazon marketplace identifiers. Data sets in the response contain data only for the specified marketplaces.
78
+ key includedData: object | A comma-delimited list of data sets to include in the response. Default: summaries.
79
+ key locale: object | Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
80
+
81
+ Returns:
82
+ ApiResponse
83
+ """
84
+
85
+ normalize_included_data(kwargs)
86
+ return self._request(fill_query_params(kwargs.pop("path"), asin), params=kwargs)
@@ -0,0 +1,89 @@
1
+ from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
2
+ from sp_api.util import normalize_included_data
3
+
4
+
5
+ class CatalogItemsV20220401(Client):
6
+ """
7
+ CatalogItems SP-API Client
8
+ :link:
9
+
10
+ The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog.
11
+ """
12
+
13
+ @sp_endpoint("/catalog/2022-04-01/items", method="GET")
14
+ def search_catalog_items(self, **kwargs) -> ApiResponse:
15
+ """
16
+ search_catalog_items(self, **kwargs) -> ApiResponse
17
+
18
+ Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords.
19
+
20
+ **Usage Plan:**
21
+
22
+ ====================================== ==============
23
+ Rate (requests per second) Burst
24
+ ====================================== ==============
25
+ 2 2
26
+ ====================================== ==============
27
+
28
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
29
+
30
+ Examples:
31
+ literal blocks::
32
+
33
+ CatalogItemsV20220401().search_catalog_items()
34
+
35
+ Args:
36
+ key identifiers: object | A comma-delimited list of product identifiers that you can use to search the Amazon catalog. **Note:** You cannot include `identifiers` and `keywords` in the same request.
37
+ key identifiersType: object | The type of product identifiers that you can use to search the Amazon catalog. **Note:** `identifiersType` is required when `identifiers` is in the request.
38
+ key marketplaceIds: object | required A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
39
+ key includedData: object | A comma-delimited list of datasets to include in the response.
40
+ key locale: object | The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
41
+ key sellerId: object | A selling partner identifier, such as a seller account or vendor code. **Note:** Required when `identifiersType` is `SKU`.
42
+ key keywords: object | A comma-delimited list of keywords that you can use to search the Amazon catalog. **Note:** You cannot include `keywords` and `identifiers` in the same request.
43
+ key brandNames: object | A comma-delimited list of brand names that you can use to limit the search in queries based on `keywords`. **Note:** Cannot be used with `identifiers`.
44
+ key classificationIds: object | A comma-delimited list of classification identifiers that you can use to limit the search in queries based on `keywords`. **Note:** Cannot be used with `identifiers`.
45
+ key pageSize: object | The number of results to include on each page.
46
+ key pageToken: object | A token that you can use to fetch a specific page when there are multiple pages of results.
47
+ key keywordsLocale: object | The language of the keywords that are included in queries based on `keywords`. Defaults to the primary locale of the marketplace. **Note:** Cannot be used with `identifiers`.
48
+
49
+ Returns:
50
+ ApiResponse
51
+ """
52
+
53
+ normalize_included_data(kwargs)
54
+ return self._request(kwargs.pop("path"), params=kwargs)
55
+
56
+ @sp_endpoint("/catalog/2022-04-01/items/{}", method="GET")
57
+ def get_catalog_item(self, asin, **kwargs) -> ApiResponse:
58
+ """
59
+ get_catalog_item(self, asin, **kwargs) -> ApiResponse
60
+
61
+ Retrieves details for an item in the Amazon catalog.
62
+
63
+ **Usage Plan:**
64
+
65
+ ====================================== ==============
66
+ Rate (requests per second) Burst
67
+ ====================================== ==============
68
+ 2 2
69
+ ====================================== ==============
70
+
71
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
72
+
73
+ Examples:
74
+ literal blocks::
75
+
76
+ CatalogItemsV20220401().get_catalog_item("value")
77
+
78
+ Args:
79
+ asin: object | required The Amazon Standard Identification Number (ASIN) of the item.
80
+ key marketplaceIds: object | required A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
81
+ key includedData: object | A comma-delimited list of datasets to include in the response.
82
+ key locale: object | The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
83
+
84
+ Returns:
85
+ ApiResponse
86
+ """
87
+
88
+ normalize_included_data(kwargs)
89
+ return self._request(fill_query_params(kwargs.pop("path"), asin), params=kwargs)