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
@@ -21,28 +21,31 @@ class FbaInboundEligibility(AsyncBaseClient):
21
21
  async def get_item_eligibility_preview(self, **kwargs) -> ApiResponse:
22
22
  """
23
23
  get_item_eligibility_preview(self, **kwargs) -> ApiResponse
24
-
24
+
25
25
  This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item's eligibility.
26
-
26
+
27
27
  **Usage Plan:**
28
-
29
-
28
+
30
29
  ====================================== ==============
31
30
  Rate (requests per second) Burst
32
31
  ====================================== ==============
33
32
  1 1
34
33
  ====================================== ==============
35
-
34
+
36
35
  For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
37
-
36
+
37
+ Examples:
38
+ literal blocks::
39
+
40
+ await FbaInboundEligibility().get_item_eligibility_preview()
41
+
38
42
  Args:
39
- key marketplaceIds:array | The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND.
40
- key asin:string | * REQUIRED The ASIN of the item for which you want an eligibility preview.
41
- key program:string | * REQUIRED The program that you want to check eligibility against.
42
-
43
-
43
+ key marketplaceIds: object | The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND.
44
+ key asin: object | required The ASIN of the item for which you want an eligibility preview.
45
+ key program: object | required The program that you want to check eligibility against.
46
+
44
47
  Returns:
45
- ApiResponse:
48
+ ApiResponse
46
49
  """
47
50
  return await self._request(kwargs.pop("path"), params=kwargs)
48
51
 
@@ -50,28 +53,31 @@ class FbaInboundEligibility(AsyncBaseClient):
50
53
  async def get_item_eligibility_preview_extended(self, **kwargs) -> ApiResponse:
51
54
  """
52
55
  get_item_eligibility_preview_extended(self, **kwargs) -> ApiResponse
53
-
56
+
54
57
  This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item's eligibility.
55
-
58
+
56
59
  **Usage Plan:**
57
-
58
-
60
+
59
61
  ====================================== ==============
60
62
  Rate (requests per second) Burst
61
63
  ====================================== ==============
62
64
  1 1
63
65
  ====================================== ==============
64
-
66
+
65
67
  For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
66
-
68
+
69
+ Examples:
70
+ literal blocks::
71
+
72
+ await FbaInboundEligibility().get_item_eligibility_preview_extended()
73
+
67
74
  Args:
68
- key marketplaceIds:array | The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND.
69
- key asin:string | * REQUIRED The ASIN of the item for which you want an eligibility preview.
70
- key program:string | * REQUIRED The program that you want to check eligibility against.
71
-
72
-
75
+ key marketplaceIds: object | The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND.
76
+ key asin: object | required The ASIN of the item for which you want an eligibility preview.
77
+ key program: object | required The program that you want to check eligibility against.
78
+
73
79
  Returns:
74
- ApiResponse:
80
+ ApiResponse
75
81
  """
76
82
 
77
83
  api_response = await self._request(kwargs.pop("path"), params=kwargs)
@@ -93,4 +99,4 @@ class FbaInboundEligibility(AsyncBaseClient):
93
99
  errors.append(error)
94
100
  api_response.payload.update({"ineligibilityReasonListMessage": errors})
95
101
 
96
- return api_response
102
+ return api_response
@@ -25,26 +25,21 @@ class FbaSmallAndLight(AsyncBaseClient):
25
25
  self, seller_sku, **kwargs
26
26
  ) -> ApiResponse:
27
27
  """
28
- get_small_and_light_enrollment_by_seller_s_k_u(self, sellerSKU, **kwargs) -> ApiResponse
29
-
28
+ get_small_and_light_enrollment_by_seller_sku(self, seller_sku, **kwargs) -> ApiResponse
29
+
30
30
  Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace.
31
-
32
- **Usage Plan:**
33
-
34
- ====================================== ==============
35
- Rate (requests per second) Burst
36
- ====================================== ==============
37
- 2 10
38
- ====================================== ==============
39
-
40
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
41
-
31
+
32
+ Examples:
33
+ literal blocks::
34
+
35
+ await FbaSmallAndLight().get_small_and_light_enrollment_by_seller_sku("value")
36
+
42
37
  Args:
43
- seller_sku:string | * REQUIRED The seller SKU that identifies the item.
44
- key marketplaceIds:array | * REQUIRED The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only.
45
-
38
+ seller_sku: | required
39
+ **kwargs:
40
+
46
41
  Returns:
47
- ApiResponse:
42
+ ApiResponse
48
43
  """
49
44
 
50
45
  return await self._request(
@@ -64,33 +59,28 @@ class FbaSmallAndLight(AsyncBaseClient):
64
59
  self, seller_sku, **kwargs
65
60
  ) -> ApiResponse:
66
61
  """
67
- put_small_and_light_enrollment_by_seller_s_k_u(self, sellerSKU, **kwargs) -> ApiResponse
68
-
62
+ put_small_and_light_enrollment_by_seller_sku(self, seller_sku, **kwargs) -> ApiResponse
63
+
69
64
  Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned.
70
-
71
- **Usage Plan:**
72
-
73
-
74
- ====================================== ==============
75
- Rate (requests per second) Burst
76
- ====================================== ==============
77
- 2 5
78
- ====================================== ==============
79
-
80
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
81
-
65
+
66
+ Examples:
67
+ literal blocks::
68
+
69
+ await FbaSmallAndLight().put_small_and_light_enrollment_by_seller_sku("value")
70
+
82
71
  Args:
83
- seller_sku:string | * REQUIRED The seller SKU that identifies the item.
84
- key marketplaceIds:array | * REQUIRED The marketplace in which to enroll the item. Note: Accepts a single marketplace only.
85
-
72
+ seller_sku: | required
73
+ **kwargs:
74
+
86
75
  Returns:
87
- ApiResponse:
76
+ ApiResponse
88
77
  """
89
78
 
90
79
  return await self._request(
91
80
  fill_query_params(kwargs.pop("path"), seller_sku),
92
81
  params={
93
- "marketplaceIds": kwargs.get("marketplaceIds", self.marketplace_id)
82
+ "marketplaceIds": kwargs.get("marketplaceIds", self.marketplace_id),
83
+ "method": kwargs.get("method", "PUT"),
94
84
  },
95
85
  )
96
86
 
@@ -107,26 +97,21 @@ class FbaSmallAndLight(AsyncBaseClient):
107
97
  self, seller_sku, **kwargs
108
98
  ) -> ApiResponse:
109
99
  """
110
- delete_small_and_light_enrollment_by_seller_s_k_u(self, sellerSKU, **kwargs) -> ApiResponse
111
-
100
+ delete_small_and_light_enrollment_by_seller_sku(self, seller_sku, **kwargs) -> ApiResponse
101
+
112
102
  Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned.
113
-
114
- **Usage Plan:**
115
-
116
- ====================================== ==============
117
- Rate (requests per second) Burst
118
- ====================================== ==============
119
- 2 5
120
- ====================================== ==============
121
-
122
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
123
-
103
+
104
+ Examples:
105
+ literal blocks::
106
+
107
+ await FbaSmallAndLight().delete_small_and_light_enrollment_by_seller_sku("value")
108
+
124
109
  Args:
125
- seller_sku:string | * REQUIRED The seller SKU that identifies the item.
126
- key marketplaceIds:array | * REQUIRED The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only.
127
-
110
+ seller_sku: | required
111
+ **kwargs:
112
+
128
113
  Returns:
129
- ApiResponse:
114
+ ApiResponse
130
115
  """
131
116
 
132
117
  return await self._request(
@@ -146,27 +131,21 @@ class FbaSmallAndLight(AsyncBaseClient):
146
131
  self, seller_sku, **kwargs
147
132
  ) -> ApiResponse:
148
133
  """
149
- get_small_and_light_eligibility_by_seller_s_k_u(self, sellerSKU, **kwargs) -> ApiResponse
150
-
134
+ get_small_and_light_eligibility_by_seller_sku(self, seller_sku, **kwargs) -> ApiResponse
135
+
151
136
  Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned.
152
-
153
- **Usage Plan:**
154
-
155
-
156
- ====================================== ==============
157
- Rate (requests per second) Burst
158
- ====================================== ==============
159
- 2 10
160
- ====================================== ==============
161
-
162
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
163
-
137
+
138
+ Examples:
139
+ literal blocks::
140
+
141
+ await FbaSmallAndLight().get_small_and_light_eligibility_by_seller_sku("value")
142
+
164
143
  Args:
165
- seller_sku:string | * REQUIRED The seller SKU that identifies the item.
166
- key marketplaceIds:array | * REQUIRED The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only.
167
-
144
+ seller_sku: | required
145
+ **kwargs:
146
+
168
147
  Returns:
169
- ApiResponse:
148
+ ApiResponse
170
149
  """
171
150
 
172
151
  return await self._request(
@@ -177,37 +156,19 @@ class FbaSmallAndLight(AsyncBaseClient):
177
156
  async def get_small_and_light_fee_preview(self, **kwargs) -> ApiResponse:
178
157
  """
179
158
  get_small_and_light_fee_preview(self, **kwargs) -> ApiResponse
180
-
159
+
181
160
  Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed.
182
-
183
- **Usage Plan:**
184
-
185
-
186
- ====================================== ==============
187
- Rate (requests per second) Burst
188
- ====================================== ==============
189
- 1 3
190
- ====================================== ==============
191
-
192
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
193
-
161
+
162
+ Examples:
163
+ literal blocks::
164
+
165
+ await FbaSmallAndLight().get_small_and_light_fee_preview()
166
+
194
167
  Args:
195
- body: REQUIRED
196
- {
197
- "marketplaceId": "string",
198
- "items": [
199
- {
200
- "asin": "string",
201
- "price": {
202
- "currencyCode": "string",
203
- "amount": 0
204
- }
205
- }
206
- ]
207
- }
208
-
168
+ **kwargs:
169
+
209
170
  Returns:
210
- ApiResponse:
171
+ ApiResponse
211
172
  """
212
173
 
213
- return await self._request(kwargs.pop("path"), data=kwargs)
174
+ return await self._request(kwargs.pop("path"), data=kwargs)
@@ -1,260 +1,92 @@
1
- import zlib
1
+ from __future__ import annotations
2
2
 
3
- from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
4
- from sp_api.asyncio.base import AsyncBaseClient
5
- from sp_api.util import should_add_marketplace
6
-
7
-
8
- class Feeds(AsyncBaseClient):
9
- """
10
- Feeds SP-API Client
11
- :link:
12
-
13
- The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
14
- """
15
-
16
- @sp_endpoint("/feeds/2021-06-30/feeds", method="GET")
17
- async def get_feeds(self, **kwargs) -> ApiResponse:
18
- """
19
- get_feeds(self, **kwargs) -> ApiResponse
20
-
21
- Returns feed details for the feeds that match the filters that you specify.
22
-
23
- Args:
24
- key feedTypes:array | A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required.
25
- key marketplaceIds:array | A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify.
26
- key pageSize:integer | The maximum number of feeds to return in a single call.
27
- key processingStatuses:array | A list of processing statuses used to filter feeds.
28
- key createdSince:string | The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days.
29
- key createdUntil:string | The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
30
- key nextToken:string | A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail.
31
-
32
-
33
- Returns:
34
- ApiResponse:
35
- """
36
-
37
- add_marketplace = should_add_marketplace(kwargs, "nextToken")
38
- return await self._request(
39
- kwargs.pop("path"), params=kwargs, add_marketplace=add_marketplace
40
- )
41
-
42
- async def submit_feed(
43
- self, feed_type, file, content_type="text/tsv", **kwargs
44
- ) -> [ApiResponse, ApiResponse]:
45
- """
46
- submit_feed(self, feed_type: str, file: File or File like, content_type='text/tsv', **kwargs) -> [ApiResponse, ApiResponse]
47
- Combines `create_feed_document` and `create_feed`, uploads the file and sends the feed to amazon.
48
-
49
- **Usage Plan:**
50
-
51
- ====================================== ==============
52
- Rate (requests per second) Burst
53
- ====================================== ==============
54
- 0.0083 15
55
- ====================================== ==============
56
-
57
- Examples:
58
- literal blocks::
59
-
60
- feed = BytesIO
61
- feed.write(<your feed>)
62
- feed.seek(0)
63
- Feeds().submit_feed('POST_FBA_INBOUND_CARTON_CONTENTS', feed, 'text/xml')
64
-
65
-
66
- Args:
67
- feed_type:
68
- file:
69
- content_type:
70
- **kwargs:
71
-
72
- Returns:
73
- [ApiResponse:, ApiResponse:]
74
- """
75
- document_response = await self.create_feed_document(file, content_type)
76
- return document_response, await self.create_feed(
77
- feed_type, document_response.payload.get("feedDocumentId"), **kwargs
78
- )
79
-
80
- @sp_endpoint("/feeds/2021-06-30/feeds", method="POST")
81
- async def create_feed(self, feed_type, input_feed_document_id, **kwargs) -> ApiResponse:
82
- """
83
- create_feed(self, feed_type: str, input_feed_document_id: str, **kwargs) -> ApiResponse
84
-
85
- Creates a feed. Call `create_feed_document` to upload the feed first.
86
- `submit_feed` combines both.
87
-
88
- **Usage Plan:**
89
-
90
- ====================================== ==============
91
- Rate (requests per second) Burst
92
- ====================================== ==============
93
- 0.0083 15
94
- ====================================== ==============
95
-
96
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
97
-
98
- Examples:
99
- literal blocks::
100
-
101
- Feeds().create_feed('POST_PRODUCT_DATA', '3d4e42b5-1d6e-44e8-a89c-2abfca0625bb',
102
- marketplaceIds=["ATVPDKIKX0DER", "A1F83G8C2ARO7P"])
3
+ import enum
4
+ from typing import Any, Literal, TYPE_CHECKING, overload
103
5
 
104
- Args:
105
- feed_type: https://github.com/amzn/selling-partner-api-docs/blob/main/references/feeds-api/feedtype-values.md
106
- input_feed_document_id: str
107
- **kwargs:
108
-
109
- Returns:
110
- ApiResponse:
111
- """
112
- data = {
113
- "feedType": feed_type,
114
- "inputFeedDocumentId": input_feed_document_id,
115
- **kwargs,
116
- }
117
- return await self._request(kwargs.pop("path"), data=data)
118
-
119
- @sp_endpoint("/feeds/2021-06-30/feeds/{}", method="DELETE")
120
- async def cancel_feed(self, feedId, **kwargs) -> ApiResponse:
121
- """
122
- cancel_feed(self, feedId, **kwargs) -> ApiResponse
123
-
124
- Cancels the feed that you specify. Only feeds with processingStatus=IN_QUEUE can be cancelled. Cancelled feeds are returned in subsequent calls to the getFeed and getFeeds operations.
125
-
126
- Args:
127
-
128
- feedId:string | * REQUIRED The identifier for the feed. This identifier is unique only in combination with a seller ID.
129
-
130
-
131
- Returns:
132
- ApiResponse:
133
- """
134
-
135
- return await self._request(fill_query_params(kwargs.pop("path"), feedId), data=kwargs)
136
-
137
- @sp_endpoint("/feeds/2021-06-30/feeds/{}", method="GET")
138
- async def get_feed(self, feedId, **kwargs) -> ApiResponse:
139
- """
140
- get_feed(self, feedId, **kwargs) -> ApiResponse
141
-
142
- Returns feed details (including the resultDocumentId, if available) for the feed that you specify.
143
-
144
- Args:
145
-
146
- feedId:string | * REQUIRED The identifier for the feed. This identifier is unique only in combination with a seller ID.
147
-
148
-
149
- Returns:
150
- ApiResponse:
151
- """
152
-
153
- return await self._request(
154
- fill_query_params(kwargs.pop("path"), feedId),
155
- params=kwargs,
156
- add_marketplace=False,
157
- )
158
-
159
- @sp_endpoint("/feeds/2021-06-30/documents", method="POST")
160
- async def create_feed_document(self, file, content_type, **kwargs) -> ApiResponse:
161
- """
162
- create_feed_document(self, **kwargs) -> ApiResponse
163
-
164
- Creates a feed document for the feed type that you specify. This operation returns a presigned URL for uploading the feed document contents. It also returns a feedDocumentId value that you can pass in with a subsequent call to the createFeed operation.
165
-
166
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
167
-
168
- Args:
169
- file: File or File like object. Setting this to None will skip the upload.
170
- content_type: str
171
- body: | * REQUIRED {'description': 'Specifies the content type for the createFeedDocument operation.', 'properties': {'contentType': {'description': 'The content type of the feed.', 'type': 'string'}}, 'required': ['contentType'], 'type': 'object'}
172
-
173
-
174
- Returns:
175
- ApiResponse:
176
- """
177
- data = {"contentType": kwargs.get("contentType", content_type)}
178
- response = await self._request(kwargs.get("path"), data={**data, **kwargs})
179
-
180
- if file is None:
181
- return response
182
-
183
- upload_data = file.read()
184
- try:
185
- upload_data = upload_data.encode("iso-8859-1")
186
- except AttributeError:
187
- pass
188
- upload = await self._transport.request(
189
- "PUT",
190
- response.payload.get("url"),
191
- content=upload_data,
192
- headers={"Content-Type": content_type},
193
- )
194
- if 200 <= upload.status_code < 300:
195
- return response
196
- from sp_api.base.exceptions import SellingApiException
197
-
198
- raise SellingApiException(
199
- headers=upload.headers, error=upload.json().get("errors")
200
- )
6
+ from sp_api.asyncio.base import AsyncBaseClient
7
+ from sp_api.util.versioned_client import VersionedClientMeta
201
8
 
202
- @sp_endpoint("/feeds/2021-06-30/documents/{}", method="GET")
203
- async def get_feed_document(self, feedDocumentId, **kwargs) -> str:
204
- """
205
- get_feed_document(self, feedDocumentId, **kwargs) -> ApiResponse
9
+ from .feeds_2021_06_30 import FeedsV20210630
206
10
 
207
- Returns the information required for retrieving a feed document's contents.
208
11
 
209
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
12
+ class FeedsVersion(str, enum.Enum):
13
+ V_2021_06_30 = "2021-06-30"
14
+ LATEST = "2021-06-30"
210
15
 
211
- Args:
212
16
 
213
- feedDocumentId:string | * REQUIRED The identifier of the feed document.
17
+ if TYPE_CHECKING:
214
18
 
19
+ class _FeedsMeta(VersionedClientMeta):
20
+ @overload
21
+ def __call__(
22
+ cls,
23
+ *args: Any,
24
+ version: Literal[FeedsVersion.V_2021_06_30, FeedsVersion.LATEST, "2021-06-30"],
25
+ **kwargs: Any,
26
+ ) -> FeedsV20210630: ...
215
27
 
216
- Returns:
217
- ApiResponse:
218
- """
28
+ @overload
29
+ def __call__(
30
+ cls,
31
+ *args: Any,
32
+ version: None = None,
33
+ **kwargs: Any,
34
+ ) -> FeedsV20210630: ...
219
35
 
220
- return await self.get_feed_result_document(feedDocumentId)
36
+ @overload
37
+ def __call__(
38
+ cls,
39
+ *args: Any,
40
+ version: str | FeedsVersion,
41
+ **kwargs: Any,
42
+ ) -> AsyncBaseClient: ...
221
43
 
222
- @sp_endpoint("/feeds/2021-06-30/documents/{}", method="GET")
223
- async def get_feed_result_document(self, feedDocumentId, **kwargs) -> str:
224
- """
225
- get_feed_result_document(self, feedDocumentId, **kwargs) -> str
226
44
 
227
- Returns the feed result document's contents. First fetches from `getFeedDocument` endpont and then fetchs from the URL returned from it.
45
+ else:
46
+ _FeedsMeta = VersionedClientMeta
228
47
 
229
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
230
48
 
231
- Args:
232
- feedDocumentId: str
233
- **kwargs:
49
+ class Feeds(AsyncBaseClient, metaclass=_FeedsMeta):
50
+ """Feeds API client.
234
51
 
235
- Returns:
236
- str:
237
- """
238
- response = await self._request(
239
- fill_query_params(kwargs.pop("path"), feedDocumentId),
240
- params=kwargs,
241
- add_marketplace=False,
242
- )
243
- url = response.payload.get("url")
244
- doc_response = await self._transport.request("GET", url)
52
+ This class dispatches to a versioned Feeds API client.
245
53
 
246
- encoding = (
247
- doc_response.encoding
248
- if doc_response and doc_response.encoding
249
- else "iso-8859-1"
250
- )
251
- if encoding.lower() == "windows-31j":
252
- encoding = "cp932"
54
+ If you do not pass a version, the constructor returns the oldest supported implementation ("2021-06-30").
55
+ """
253
56
 
254
- content = doc_response.content
255
- if "compressionAlgorithm" in response.payload:
256
- try:
257
- return zlib.decompress(bytearray(content), 15 + 32).decode(encoding)
258
- except Exception:
259
- return content.decode(encoding)
260
- return content.decode(encoding)
57
+ if TYPE_CHECKING:
58
+ @overload
59
+ def __new__(
60
+ cls,
61
+ *args: Any,
62
+ version: Literal[FeedsVersion.V_2021_06_30, FeedsVersion.LATEST, "2021-06-30"],
63
+ **kwargs: Any,
64
+ ) -> FeedsV20210630: ...
65
+
66
+ @overload
67
+ def __new__(
68
+ cls,
69
+ *args: Any,
70
+ version: None = None,
71
+ **kwargs: Any,
72
+ ) -> FeedsV20210630: ...
73
+
74
+ @overload
75
+ def __new__(
76
+ cls,
77
+ *args: Any,
78
+ version: str | FeedsVersion,
79
+ **kwargs: Any,
80
+ ) -> AsyncBaseClient: ...
81
+
82
+ _DISPATCH = True
83
+
84
+ _DEFAULT_VERSION = "2021-06-30"
85
+
86
+ _VERSION_MAP = {
87
+ "2021-06-30": FeedsV20210630,
88
+ }
89
+
90
+ _VERSION_ALIASES = {
91
+ "2021-06-30": "2021-06-30",
92
+ }