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
@@ -15,25 +15,32 @@ class ProductTypeDefinitions(Client):
15
15
  def search_definitions_product_types(self, **kwargs) -> ApiResponse:
16
16
  """
17
17
  search_definitions_product_types(self, **kwargs) -> ApiResponse
18
-
18
+
19
19
  Search for and return a list of Amazon product types that have definitions available.
20
-
20
+
21
21
  **Usage Plans:**
22
-
23
- ====================================== ==============
24
- Rate (requests per second) Burst
25
- ====================================== ==============
26
- 5 10
27
- ====================================== ==============
28
-
29
- 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.
30
-
22
+
23
+ | Plan type | Rate (requests per second) | Burst |
24
+ | ---- | ---- | ---- |
25
+ |Default| 5 | 10 |
26
+ |Selling partner specific| Variable | Variable |
27
+
28
+ 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](doc:usage-plans-and-rate-limits-in-the-sp-api).
29
+
30
+ Examples:
31
+ literal blocks::
32
+
33
+ ProductTypeDefinitions().search_definitions_product_types()
34
+
31
35
  Args:
32
- key keywords:array | A comma-delimited list of keywords to search product types by.
33
- key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers for the request.
34
-
36
+ key keywords: object | A comma-delimited list of keywords to search product types. **Note:** Cannot be used with `itemName`.
37
+ key marketplaceIds: object | required A comma-delimited list of Amazon marketplace identifiers for the request.
38
+ key itemName: object | The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with `keywords`.
39
+ key locale: object | The locale for the display names in the response. Defaults to the primary locale of the marketplace.
40
+ key searchLocale: object | The locale used for the `keywords` and `itemName` parameters. Defaults to the primary locale of the marketplace.
41
+
35
42
  Returns:
36
- ApiResponse:
43
+ ApiResponse
37
44
  """
38
45
 
39
46
  return self._request(kwargs.pop("path"), params=kwargs)
@@ -42,31 +49,35 @@ class ProductTypeDefinitions(Client):
42
49
  def get_definitions_product_type(self, productType, **kwargs) -> ApiResponse:
43
50
  """
44
51
  get_definitions_product_type(self, productType, **kwargs) -> ApiResponse
45
-
52
+
46
53
  Retrieve an Amazon product type definition.
47
-
54
+
48
55
  **Usage Plans:**
49
-
50
-
51
- ====================================== ==============
52
- Rate (requests per second) Burst
53
- ====================================== ==============
54
- 5 10
55
- ====================================== ==============
56
-
57
- 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.
58
-
56
+
57
+ | Plan type | Rate (requests per second) | Burst |
58
+ | ---- | ---- | ---- |
59
+ |Default| 5 | 10 |
60
+ |Selling partner specific| Variable | Variable |
61
+
62
+ 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](doc:usage-plans-and-rate-limits-in-the-sp-api).
63
+
64
+ Examples:
65
+ literal blocks::
66
+
67
+ ProductTypeDefinitions().get_definitions_product_type("value")
68
+
59
69
  Args:
60
- productType:string | * REQUIRED The Amazon product type name.
61
- key sellerId:string | A selling partner identifier. When provided, seller-specific requirements and values are populated within the product type definition schema, such as brand names associated with the selling partner.
62
- key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers for the request.
63
- key productTypeVersion:string | The version of the Amazon product type to retrieve. Defaults to "LATEST",. Prerelease versions of product type definitions may be retrieved with "RELEASE_CANDIDATE". If no prerelease version is currently available, the "LATEST" live version will be provided.
64
- key requirements:string | The name of the requirements set to retrieve requirements for.
65
- key requirementsEnforced:string | Identifies if the required attributes for a requirements set are enforced by the product type definition schema. Non-enforced requirements enable structural validation of individual attributes without all the required attributes being present (such as for partial updates).
66
- key locale:string | Locale for retrieving display labels and other presentation details. Defaults to the default language of the first marketplace in the request.
67
-
70
+ productType: object | required The Amazon product type name.
71
+ key sellerId: object | A selling partner identifier. When provided, seller-specific requirements and values are populated within the product type definition schema, such as brand names associated with the selling partner.
72
+ key marketplaceIds: object | required A comma-delimited list of Amazon marketplace identifiers for the request.
73
+ Note: This parameter is limited to one marketplaceId at this time.
74
+ key productTypeVersion: object | The version of the Amazon product type to retrieve. Defaults to "LATEST",. Prerelease versions of product type definitions may be retrieved with "RELEASE_CANDIDATE". If no prerelease version is currently available, the "LATEST" live version will be provided.
75
+ key requirements: object | The name of the requirements set to retrieve requirements for.
76
+ key requirementsEnforced: object | Identifies if the required attributes for a requirements set are enforced by the product type definition schema. Non-enforced requirements enable structural validation of individual attributes without all the required attributes being present (such as for partial updates).
77
+ key locale: object | Locale for retrieving display labels and other presentation details. Defaults to the default language of the first marketplace in the request.
78
+
68
79
  Returns:
69
- ApiResponse:
80
+ ApiResponse
70
81
  """
71
82
 
72
83
  return self._request(
@@ -1,404 +1,112 @@
1
- from typing import Optional, List, Dict, Union
1
+ from __future__ import annotations
2
2
 
3
- from sp_api.base import ApiResponse, Client, fill_query_params, sp_endpoint
4
- from sp_api.api.products.products_definitions import (
5
- GetCompetitiveSummaryBatch,
6
- GetFeaturedOfferExpectedPriceBatch,
7
- GetItemOffersBatchRequest,
8
- GetListingOffersBatchRequest,
9
- )
10
- from sp_api.util import ensure_csv
3
+ import enum
4
+ from typing import Any, Literal, TYPE_CHECKING, overload
5
+ from sp_api.util.versioned_client import VersionedClientMeta
11
6
 
7
+ from sp_api.base import Client
12
8
 
13
- class Products(Client):
14
- """
15
- :links:
16
- https://github.com/amzn/selling-partner-api-docs/blob/main/references/product-pricing-api/productPricingV0.md
17
- https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-reference
18
- """
19
-
20
- @sp_endpoint("/products/pricing/v0/price", method="GET")
21
- def get_product_pricing_for_skus(
22
- self, seller_sku_list: [str], item_condition=None, offer_type=None, **kwargs
23
- ) -> ApiResponse:
24
- """
25
- get_product_pricing_for_skus(self, seller_sku_list: [str], item_condition: str = None, **kwargs) -> ApiResponse
26
- Returns pricing information for a seller's offer listings based on SKU.
27
-
28
- **Usage Plan:**
29
-
30
- ====================================== ==============
31
- Rate (requests per second) Burst
32
- ====================================== ==============
33
- .5 1
34
- ====================================== ==============
35
-
36
- Examples:
37
- literal blocks::
38
-
39
- Products().get_product_pricing_for_skus(['sku', 'sku1'], MarketplaceId="ATVPDKIKX0DER")
40
-
41
- Args:
42
- seller_sku_list: [str]
43
- item_condition: str ("New", "Used", "Collectible", "Refurbished", "Club")
44
- offer_type: str ("B2C" or "B2B") Default is B2C.
45
- **kwargs:
46
-
47
- Returns:
48
- ApiResponse:
49
- """
50
- if item_condition is not None:
51
- kwargs["ItemCondition"] = item_condition
52
- if offer_type is not None:
53
- kwargs["OfferType"] = offer_type
54
-
55
- return self._create_get_pricing_request(seller_sku_list, "Sku", **kwargs)
56
-
57
- @sp_endpoint("/products/pricing/v0/price", method="GET")
58
- def get_product_pricing_for_asins(
59
- self, asin_list: [str], item_condition=None, offer_type=None, **kwargs
60
- ) -> ApiResponse:
61
- """
62
- get_product_pricing_for_asins(self, asin_list: [str], item_condition=None, **kwargs) -> ApiResponse
63
- Returns pricing information for a seller's offer listings based on ASIN.
64
-
65
- **Usage Plan:**
66
-
67
- ====================================== ==============
68
- Rate (requests per second) Burst
69
- ====================================== ==============
70
- .5 1
71
- ====================================== ==============
72
-
73
- Examples:
74
- literal blocks::
75
-
76
- Products().get_product_pricing_for_asins(['asin1', 'asin2'], MarketplaceId="ATVPDKIKX0DER")
77
-
78
- Args:
79
- asin_list: [str]
80
- item_condition: str | ("New", "Used", "Collectible", "Refurbished", "Club") Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. Available values : New, Used, Collectible, Refurbished, Club
81
- offer_type: str ("B2C" or "B2B") Default is B2C.
82
- Returns:
83
- ApiResponse
84
- """
85
- if item_condition is not None:
86
- kwargs["ItemCondition"] = item_condition
87
- if offer_type is not None:
88
- kwargs["OfferType"] = offer_type
89
-
90
- return self._create_get_pricing_request(asin_list, "Asin", **kwargs)
91
-
92
- @sp_endpoint("/products/pricing/v0/competitivePrice", method="GET")
93
- def get_competitive_pricing_for_skus(
94
- self, seller_sku_list: [str], customer_type=None, **kwargs
95
- ) -> ApiResponse:
96
- """
97
- get_competitive_pricing_for_skus(self, seller_sku_list, **kwargs) -> ApiResponse
98
- Returns competitive pricing information for a seller's offer listings based on Seller Sku
99
-
100
- **Usage Plan:**
101
-
102
- ====================================== ==============
103
- Rate (requests per second) Burst
104
- ====================================== ==============
105
- .5 1
106
- ====================================== ==============
107
-
108
- Examples:
109
- literal blocks::
110
-
111
- Products().get_competitive_pricing_for_skus([], MarketplaceId="ATVPDKIKX0DER")
112
-
113
- Args:
114
- seller_sku_list: [str]
115
- customer_type: Optional (query) str ("Consumer" or "Business") Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
116
-
117
- Returns:
118
- ApiResponse
119
- """
120
-
121
- if customer_type is not None:
122
- kwargs["CustomerType"] = customer_type
123
-
124
- return self._create_get_pricing_request(seller_sku_list, "Sku", **kwargs)
125
-
126
- @sp_endpoint("/products/pricing/v0/competitivePrice", method="GET")
127
- def get_competitive_pricing_for_asins(
128
- self, asin_list: [str], customer_type=None, **kwargs
129
- ) -> ApiResponse:
130
- """
131
- get_competitive_pricing_for_asins(self, asin_list, **kwargs) -> ApiResponse
132
- Returns competitive pricing information for a seller's offer listings based on ASIN
133
-
134
- **Usage Plan:**
135
-
136
- ====================================== ==============
137
- Rate (requests per second) Burst
138
- ====================================== ==============
139
- .5 1
140
- ====================================== ==============
141
-
142
- Examples:
143
- literal blocks::
144
-
145
- Products().get_competitive_pricing_for_asins([], MarketplaceId="ATVPDKIKX0DER")
146
-
147
- Args:
148
- asin_list: [str]
149
- customer_type: Optional (query) str ("Consumer" or "Business") Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
150
-
151
- Returns:
152
- ApiResponse
153
-
154
- """
155
- if customer_type is not None:
156
- kwargs["CustomerType"] = customer_type
157
-
158
- return self._create_get_pricing_request(asin_list, "Asin", **kwargs)
9
+ from .products_2022_05_01 import ProductsV20220501
10
+ from .products_v0 import ProductsV0
159
11
 
160
- @sp_endpoint("/products/pricing/v0/listings/{}/offers", method="GET")
161
- def get_listings_offer(
162
- self, seller_sku: str, item_condition: str, customer_type: str = None, **kwargs
163
- ) -> ApiResponse:
164
- """
165
- get_listings_offer(self, seller_sku: str, **kwargs) -> ApiResponse
166
- Returns the lowest priced offers for a single SKU listing
167
12
 
168
- **Usage Plan:**
13
+ class ProductsVersion(str, enum.Enum):
14
+ V0 = "v0"
15
+ V_2022_05_01 = "2022-05-01"
16
+ LATEST = "2022-05-01"
169
17
 
170
- ====================================== ==============
171
- Rate (requests per second) Burst
172
- ====================================== ==============
173
- 1 2
174
- ====================================== ==============
175
18
 
176
- Args:
177
- key MarketplaceId: Required (query) str
178
- item_condition: Required (query) str | ("New", "Used", "Collectible", "Refurbished", "Club") Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. Available values : New, Used, Collectible, Refurbished, Club
179
- seller_sku: Required (path) str
180
- customer_type: Optional (query) str ("Consumer" or "Business") Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
19
+ if TYPE_CHECKING:
181
20
 
21
+ class _ProductsMeta(VersionedClientMeta):
22
+ @overload
23
+ def __call__(
24
+ cls,
25
+ *args: Any,
26
+ version: Literal[ProductsVersion.V_2022_05_01, ProductsVersion.LATEST, "2022-05-01"],
27
+ **kwargs: Any,
28
+ ) -> ProductsV20220501: ...
182
29
 
183
- Returns:
184
- ApiResponse
30
+ @overload
31
+ def __call__(
32
+ cls,
33
+ *args: Any,
34
+ version: Literal[ProductsVersion.V0, "v0"],
35
+ **kwargs: Any,
36
+ ) -> ProductsV0: ...
185
37
 
186
- """
187
- kwargs["ItemCondition"] = item_condition
38
+ @overload
39
+ def __call__(
40
+ cls,
41
+ *args: Any,
42
+ version: None = None,
43
+ **kwargs: Any,
44
+ ) -> ProductsV0: ...
188
45
 
189
- if customer_type is not None:
190
- kwargs["CustomerType"] = customer_type
46
+ @overload
47
+ def __call__(
48
+ cls,
49
+ *args: Any,
50
+ version: str | ProductsVersion,
51
+ **kwargs: Any,
52
+ ) -> Client: ...
191
53
 
192
- return self._request(
193
- fill_query_params(kwargs.pop("path"), seller_sku), params={**kwargs}
194
- )
195
54
 
196
- @sp_endpoint("/products/pricing/v0/items/{}/offers", method="GET")
197
- def get_item_offers(
198
- self, asin: str, item_condition: str, customer_type: str = None, **kwargs
199
- ) -> ApiResponse:
200
- """
201
- get_item_offers(self, asin: str, **kwargs) -> ApiResponse
202
- Returns the lowest priced offers for a single item based on ASIN
55
+ else:
56
+ _ProductsMeta = VersionedClientMeta
203
57
 
204
- **Usage Plan:**
205
58
 
206
- ====================================== ==============
207
- Rate (requests per second) Burst
208
- ====================================== ==============
209
- .5 1
210
- ====================================== ==============
59
+ class Products(Client, metaclass=_ProductsMeta):
60
+ """Product Pricing API client.
211
61
 
212
- Args:
213
- key MarketplaceId: Required (query) str
214
- item_condition: Required (query) str | ("New", "Used", "Collectible", "Refurbished", "Club") Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. Available values : New, Used, Collectible, Refurbished, Club
215
- asin: Required (path) str
216
- customer_type: Optional (query) str ("Consumer" or "Business") Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
62
+ This class dispatches to a versioned Product Pricing API client.
217
63
 
64
+ If you do not pass a version, the constructor returns the oldest supported implementation ("v0").
65
+ """
218
66
 
219
- Returns:
220
- ApiResponse
221
-
222
- """
223
- kwargs["ItemCondition"] = item_condition
224
-
225
- if customer_type is not None:
226
- kwargs["CustomerType"] = customer_type
227
-
228
- return self._request(
229
- fill_query_params(kwargs.pop("path"), asin), params={**kwargs}
230
- )
231
-
232
- @sp_endpoint("/batches/products/pricing/v0/itemOffers", method="POST")
233
- def get_item_offers_batch(
234
- self,
235
- requests_: Optional[Union[List[Dict], GetItemOffersBatchRequest]] = None,
236
- **kwargs,
237
- ) -> ApiResponse:
238
- """
239
- get_item_offers_batch(self, requests_: Optional[List[Union[Dict, ItemOffersRequest]]], **kwargs) -> ApiResponse
240
- Returns the lowest priced offers for a batch of items based on ASIN.
241
-
242
- **Usage Plan:**
243
-
244
- ====================================== ==============
245
- Rate (requests per second) Burst
246
- ====================================== ==============
247
- .5 1
248
- ====================================== ==============
249
-
250
- Args:
251
- requests_: Optional (Body) [dict] The request associated with the getItemOffersBatch API call.
252
-
253
-
254
- Returns:
255
- ApiResponse
256
-
257
- """
258
- if isinstance(requests_, GetItemOffersBatchRequest):
259
- get_item_offers_batch_request = requests_.to_dict()
260
- else:
261
- get_item_offers_batch_request = {"requests": requests_}
262
-
263
- return self._request(
264
- kwargs.pop("path"),
265
- data=get_item_offers_batch_request,
266
- params={**kwargs},
267
- add_marketplace=False,
268
- )
269
-
270
- @sp_endpoint("/batches/products/pricing/v0/listingOffers", method="POST")
271
- def get_listing_offers_batch(
272
- self,
273
- requests_: Optional[Union[List[Dict], GetListingOffersBatchRequest]] = None,
274
- **kwargs,
275
- ) -> ApiResponse:
276
- """
277
- get_listing_offers_batch(self, requests_: Optional[Union[List[Dict], GetListingOffersBatchRequest]], **kwargs) -> ApiResponse
278
- Returns the lowest priced offers for a batch of listings based on ASIN.
279
-
280
- **Usage Plan:**
281
-
282
- ====================================== ==============
283
- Rate (requests per second) Burst
284
- ====================================== ==============
285
- .5 1
286
- ====================================== ==============
287
-
288
- Args:
289
- requests_: Optional (Body) [dict] The request associated with the getListingOffersBatch API call.
290
-
291
-
292
- Returns:
293
- ApiResponse
294
-
295
- """
296
- if isinstance(requests_, GetListingOffersBatchRequest):
297
- get_listing_offers_batch_request = requests_.to_dict()
298
- else:
299
- get_listing_offers_batch_request = {"requests": requests_}
300
-
301
- return self._request(
302
- kwargs.pop("path"),
303
- data=get_listing_offers_batch_request,
304
- params={**kwargs},
305
- add_marketplace=False,
306
- )
307
-
308
- @sp_endpoint('/batches/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice', method='POST')
309
- def get_featured_offer_expected_price_batch(self, requests_: Optional[
310
- Union[List[Dict], GetFeaturedOfferExpectedPriceBatch]], **kwargs) -> ApiResponse:
311
- """
312
- get_featured_offer_expected_price_batch(self, **kwargs) -> ApiResponse
313
-
314
- Returns the set of responses that correspond to the batched list of up to 40 requests defined in the request
315
- body. The response for each successful (HTTP status code 200) request in the set includes the computed listing
316
- price at or below which a seller can expect to become the featured offer (before applicable promotions).
317
- This is called the featured offer expected price (FOEP). Featured offer is not guaranteed, because competing
318
- offers may change, and different offers may be featured based on other factors, including fulfillment
319
- capabilities to a specific customer. The response to an unsuccessful request includes the available error text.
320
-
321
- **Usage Plan:**
322
-
323
- ====================================== ==============
324
- Rate (requests per second) Burst
325
- ====================================== ==============
326
- .033 1
327
- ====================================== ==============
328
-
329
- Args:
330
- requests_: [dict] The request associated with the getFeaturedOfferExpectedPriceBatch API call.
331
-
332
- Returns:
333
- ApiResponse:
334
- """
335
- if isinstance(requests_, GetFeaturedOfferExpectedPriceBatch):
336
- get_featured_offer_expected_price_batch_request = requests_.to_dict()
337
- else:
338
- get_featured_offer_expected_price_batch_request = {"requests": requests_}
339
-
340
- return self._request(
341
- kwargs.pop('path'),
342
- data=get_featured_offer_expected_price_batch_request,
343
- params={**kwargs},
344
- add_marketplace=False
345
- )
346
-
347
- @sp_endpoint('/batches/products/pricing/2022-05-01/items/competitiveSummary', method='POST')
348
- def get_competitive_summary_batch(self, requests_: Optional[Union[List[Dict], GetCompetitiveSummaryBatch]], **kwargs) -> ApiResponse:
349
- """
350
- get_competitive_summary(self, **kwargs) -> ApiResponse
351
-
352
- Returns the competitive summary response including featured buying options for the ASIN and `marketplaceId` combination.
353
-
354
- **Usage Plan:**
355
-
356
- ====================================== ==============
357
- Rate (requests per second) Burst
358
- ====================================== ==============
359
- .033 1
360
- ====================================== ==============
361
-
362
- Args:
363
- requests_: The request associated with the getCompetitiveSummary API call.
364
-
365
- Returns:
366
- ApiResponse:
367
- """
368
- if isinstance(requests_, GetCompetitiveSummaryBatch):
369
- get_competitive_summary_batch_request = requests_.to_dict()
370
- else:
371
- get_competitive_summary_batch_request = {"requests": requests_}
372
-
373
- return self._request(
374
- kwargs.pop('path'),
375
- data=get_competitive_summary_batch_request,
376
- params={**kwargs},
377
- add_marketplace=False
378
- )
379
-
380
- def _create_get_pricing_request(self, item_list, item_type, **kwargs):
381
- items_csv = ensure_csv(item_list)
382
- return self._request(
383
- kwargs.pop("path"),
384
- params={
385
- **{f"{item_type}s": items_csv},
386
- "ItemType": item_type,
387
- **(
388
- {"ItemCondition": kwargs.pop("ItemCondition")}
389
- if "ItemCondition" in kwargs
390
- else {}
391
- ),
392
- **(
393
- {"CustomerType": kwargs.pop("CustomerType")}
394
- if "CustomerType" in kwargs
395
- else {}
396
- ),
397
- **(
398
- {"OfferType": kwargs.pop("OfferType")}
399
- if "OfferType" in kwargs
400
- else {}
401
- ),
402
- "MarketplaceId": kwargs.get("MarketplaceId", self.marketplace_id),
403
- },
404
- )
67
+ if TYPE_CHECKING:
68
+ @overload
69
+ def __new__(
70
+ cls,
71
+ *args: Any,
72
+ version: Literal[ProductsVersion.V_2022_05_01, ProductsVersion.LATEST, "2022-05-01"],
73
+ **kwargs: Any,
74
+ ) -> ProductsV20220501: ...
75
+
76
+ @overload
77
+ def __new__(
78
+ cls,
79
+ *args: Any,
80
+ version: Literal[ProductsVersion.V0, "v0"],
81
+ **kwargs: Any,
82
+ ) -> ProductsV0: ...
83
+
84
+ @overload
85
+ def __new__(
86
+ cls,
87
+ *args: Any,
88
+ version: None = None,
89
+ **kwargs: Any,
90
+ ) -> ProductsV0: ...
91
+
92
+ @overload
93
+ def __new__(
94
+ cls,
95
+ *args: Any,
96
+ version: str | ProductsVersion,
97
+ **kwargs: Any,
98
+ ) -> Client: ...
99
+
100
+ _DISPATCH = True
101
+
102
+ _DEFAULT_VERSION = "v0"
103
+
104
+ _VERSION_MAP = {
105
+ "v0": ProductsV0,
106
+ "2022-05-01": ProductsV20220501,
107
+ }
108
+
109
+ _VERSION_ALIASES = {
110
+ "v0": "v0",
111
+ "2022-05-01": "2022-05-01",
112
+ }