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
@@ -1,6 +1,6 @@
1
1
  import urllib
2
2
 
3
- from sp_api.base import Client, Marketplaces, sp_endpoint, ApiResponse
3
+ from sp_api.base import Client, Marketplaces, sp_endpoint, ApiResponse, fill_query_params
4
4
  from sp_api.asyncio.base import AsyncBaseClient
5
5
  from sp_api.base.InventoryEnums import InventoryGranularity
6
6
  from sp_api.util import normalize_csv_param
@@ -14,51 +14,25 @@ class Inventories(AsyncBaseClient):
14
14
  @sp_endpoint("/fba/inventory/v1/summaries")
15
15
  async def get_inventory_summary_marketplace(self, **kwargs) -> ApiResponse:
16
16
  """
17
- get_inventory_summary_marketplace(self, **kwargs) -> GetInventorySummariesResponse
18
-
19
-
20
- Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters:
21
-
22
- - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted.
23
- - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored.
24
- - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus.
25
-
26
- **Usage Plan:**
27
-
28
- ====================================== ==============
29
- Rate (requests per second) Burst
30
- ====================================== ==============
31
- 2 2
32
- ====================================== ==============
33
-
34
-
35
- For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
36
-
37
- All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted.
38
- When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored.
39
- When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus.
40
- Usage Plan:
41
-
17
+ get_inventory_summary_marketplace(self, **kwargs) -> ApiResponse
18
+
19
+ Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime, sellerSkus and sellerSku parameters:
20
+ - All inventory summaries with available details are returned when the startDateTime, sellerSkus and sellerSku parameters are omitted.
21
+ - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus and sellerSku parameters are ignored. Important: To avoid errors, use both startDateTime and nextToken to get the next page of inventory summaries that have changed after the date and time specified.
22
+ - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. The sellerSku parameter is ignored.
23
+ - When the sellerSku parameter is provided, the operation returns inventory summaries for only the specified sellerSku.
24
+ Note: The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).
25
+
42
26
  Examples:
43
27
  literal blocks::
44
-
45
- Inventories().get_inventory_summary_marketplace(**{
46
- "details": True,
47
- "marketplaceIds": ["ATVPDKIKX0DER"]
48
- })
49
-
28
+
29
+ await Inventories().get_inventory_summary_marketplace()
30
+
50
31
  Args:
51
- key details: bool | true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). boolean "false"
52
- key granularityType: Granularity Type | The granularity type for the inventory aggregation level. enum (GranularityType) -
53
- key granularityId: str The granularity ID for the inventory aggregation level. string -
54
- key startDateTime: datetime | A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. string (date-time) -
55
- key sellerSkus: [str] | A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs.
56
- key nextToken: str | String token returned in the response of your previous request. string -
57
- key marketplaceIds: str | The marketplace ID for the marketplace for which to return inventory summaries.
58
-
32
+ **kwargs:
33
+
59
34
  Returns:
60
- GetInventorySummariesResponse:
61
-
35
+ ApiResponse
62
36
  """
63
37
 
64
38
  kwargs.update(
@@ -72,3 +46,66 @@ class Inventories(AsyncBaseClient):
72
46
  normalize_csv_param(kwargs, "sellerSkus")
73
47
 
74
48
  return await self._request(kwargs.pop("path"), params=kwargs)
49
+
50
+
51
+ @sp_endpoint("/fba/inventory/v1/items", method="POST")
52
+ async def create_inventory_item(self, **kwargs) -> ApiResponse:
53
+ """
54
+ create_inventory_item(self, **kwargs) -> ApiResponse
55
+
56
+ Requests that Amazon create product-details in the Sandbox Inventory in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
57
+
58
+ Examples:
59
+ literal blocks::
60
+
61
+ await Inventories().create_inventory_item()
62
+
63
+ Args:
64
+ createInventoryItemRequestBody: CreateInventoryItemRequest | required CreateInventoryItem Request Body Parameter.
65
+
66
+ Returns:
67
+ ApiResponse
68
+ """
69
+ return await self._request(kwargs.pop("path"), data=kwargs)
70
+
71
+ @sp_endpoint("/fba/inventory/v1/items/{}", method="DELETE")
72
+ async def delete_inventory_item(self, sellerSku, **kwargs) -> ApiResponse:
73
+ """
74
+ delete_inventory_item(self, sellerSku, **kwargs) -> ApiResponse
75
+
76
+ Requests that Amazon Deletes an item from the Sandbox Inventory in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
77
+
78
+ Examples:
79
+ literal blocks::
80
+
81
+ await Inventories().delete_inventory_item("value")
82
+
83
+ Args:
84
+ sellerSku: object | required A single seller SKU used for querying the specified seller SKU inventory summaries.
85
+ key marketplaceId: object | required The marketplace ID for the marketplace for which the sellerSku is to be deleted.
86
+
87
+ Returns:
88
+ ApiResponse
89
+ """
90
+ return await self._request(fill_query_params(kwargs.pop("path"), sellerSku), params=kwargs)
91
+
92
+ @sp_endpoint("/fba/inventory/v1/items/inventory", method="POST")
93
+ async def add_inventory(self, **kwargs) -> ApiResponse:
94
+ """
95
+ add_inventory(self, **kwargs) -> ApiResponse
96
+
97
+ Requests that Amazon add items to the Sandbox Inventory with desired amount of quantity in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
98
+
99
+ Examples:
100
+ literal blocks::
101
+
102
+ await Inventories().add_inventory()
103
+
104
+ Args:
105
+ x-amzn-idempotency-token: object | required A unique token/requestId provided with each call to ensure idempotency.
106
+ addInventoryRequestBody: AddInventoryRequest | required List of items to add to Sandbox inventory.
107
+
108
+ Returns:
109
+ ApiResponse
110
+ """
111
+ return await self._request(kwargs.pop("path"), data=kwargs)
File without changes
@@ -0,0 +1,92 @@
1
+ from __future__ import annotations
2
+
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.asyncio.base import AsyncBaseClient
8
+
9
+ from .invoices_2024_06_19 import InvoicesV20240619
10
+
11
+
12
+ class InvoicesVersion(str, enum.Enum):
13
+ V_2024_06_19 = "2024-06-19"
14
+ LATEST = "2024-06-19"
15
+
16
+
17
+ if TYPE_CHECKING:
18
+
19
+ class _InvoicesMeta(VersionedClientMeta):
20
+ @overload
21
+ def __call__(
22
+ cls,
23
+ *args: Any,
24
+ version: Literal[InvoicesVersion.V_2024_06_19, InvoicesVersion.LATEST, "2024-06-19"],
25
+ **kwargs: Any,
26
+ ) -> InvoicesV20240619: ...
27
+
28
+ @overload
29
+ def __call__(
30
+ cls,
31
+ *args: Any,
32
+ version: None = None,
33
+ **kwargs: Any,
34
+ ) -> InvoicesV20240619: ...
35
+
36
+ @overload
37
+ def __call__(
38
+ cls,
39
+ *args: Any,
40
+ version: str | InvoicesVersion,
41
+ **kwargs: Any,
42
+ ) -> AsyncBaseClient: ...
43
+
44
+
45
+ else:
46
+ _InvoicesMeta = VersionedClientMeta
47
+
48
+
49
+ class Invoices(AsyncBaseClient, metaclass=_InvoicesMeta):
50
+ """Invoices API client.
51
+
52
+ This class dispatches to a versioned Invoices API client.
53
+
54
+ If you do not pass a version, the constructor returns the oldest supported implementation ("2024-06-19").
55
+ """
56
+
57
+ if TYPE_CHECKING:
58
+ @overload
59
+ def __new__(
60
+ cls,
61
+ *args: Any,
62
+ version: Literal[InvoicesVersion.V_2024_06_19, InvoicesVersion.LATEST, "2024-06-19"],
63
+ **kwargs: Any,
64
+ ) -> InvoicesV20240619: ...
65
+
66
+ @overload
67
+ def __new__(
68
+ cls,
69
+ *args: Any,
70
+ version: None = None,
71
+ **kwargs: Any,
72
+ ) -> InvoicesV20240619: ...
73
+
74
+ @overload
75
+ def __new__(
76
+ cls,
77
+ *args: Any,
78
+ version: str | InvoicesVersion,
79
+ **kwargs: Any,
80
+ ) -> AsyncBaseClient: ...
81
+
82
+ _DISPATCH = True
83
+
84
+ _DEFAULT_VERSION = "2024-06-19"
85
+
86
+ _VERSION_MAP = {
87
+ "2024-06-19": InvoicesV20240619,
88
+ }
89
+
90
+ _VERSION_ALIASES = {
91
+ "2024-06-19": "2024-06-19",
92
+ }
@@ -0,0 +1,345 @@
1
+ from sp_api.base import ApiResponse, sp_endpoint, fill_query_params
2
+ from sp_api.asyncio.base import AsyncBaseClient
3
+
4
+
5
+ class InvoicesV20240619(AsyncBaseClient):
6
+ """
7
+ Invoices SP-API Client
8
+ :link:
9
+
10
+ Use the Selling Partner API for Invoices to retrieve and manage invoice-related operations, which can help selling partners manage their bookkeeping processes.
11
+ """
12
+
13
+ @sp_endpoint("/tax/invoices/2024-06-19/attributes", method="GET")
14
+ async def get_invoices_attributes(self, **kwargs) -> ApiResponse:
15
+ """
16
+ get_invoices_attributes(self, **kwargs) -> ApiResponse
17
+
18
+ Returns marketplace-dependent schemas and their respective set of possible values.
19
+
20
+ **Usage Plan:**
21
+
22
+ ====================================== ==============
23
+ Rate (requests per second) Burst
24
+ ====================================== ==============
25
+ 1 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
+ await InvoicesV20240619().get_invoices_attributes()
34
+
35
+ Args:
36
+ key marketplaceId: object | required The marketplace identifier.
37
+
38
+ Returns:
39
+ ApiResponse
40
+ """
41
+ return await self._request(kwargs.pop("path"), params=kwargs, add_marketplace=False)
42
+
43
+ @sp_endpoint("/tax/invoices/2024-06-19/documents/{invoicesDocumentId}", method="GET")
44
+ async def get_invoices_document(self, invoicesDocumentId, **kwargs) -> ApiResponse:
45
+ """
46
+ get_invoices_document(self, invoicesDocumentId, **kwargs) -> ApiResponse
47
+
48
+ Returns the invoice document's ID and URL. Use the URL to download the ZIP file, which contains the invoices from the corresponding `createInvoicesExport` request.
49
+
50
+ **Usage Plan:**
51
+
52
+ ====================================== ==============
53
+ Rate (requests per second) Burst
54
+ ====================================== ==============
55
+ 0.0167 1
56
+ ====================================== ==============
57
+
58
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
59
+
60
+ Examples:
61
+ literal blocks::
62
+
63
+ await InvoicesV20240619().get_invoices_document("value")
64
+
65
+ Args:
66
+ invoicesDocumentId: object | required The export document identifier.
67
+
68
+ Returns:
69
+ ApiResponse
70
+ """
71
+ return await self._request(fill_query_params(kwargs.pop("path"), invoicesDocumentId), params=kwargs, add_marketplace=False)
72
+
73
+ @sp_endpoint("/tax/invoices/2024-06-19/exports", method="GET")
74
+ async def get_invoices_exports(self, **kwargs) -> ApiResponse:
75
+ """
76
+ get_invoices_exports(self, **kwargs) -> ApiResponse
77
+
78
+ Returns invoice exports details for exports that match the filters that you specify.
79
+
80
+ **Usage Plan:**
81
+
82
+ ====================================== ==============
83
+ Rate (requests per second) Burst
84
+ ====================================== ==============
85
+ 0.1 20
86
+ ====================================== ==============
87
+
88
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
89
+
90
+ Examples:
91
+ literal blocks::
92
+
93
+ await InvoicesV20240619().get_invoices_exports()
94
+
95
+ Args:
96
+ key marketplaceId: object | required The returned exports match the specified marketplace.
97
+ key dateStart: object | The earliest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 30 days ago.
98
+ key nextToken: object | The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
99
+ key pageSize: object | The maximum number of invoices to return in a single call.
100
+ Minimum: 1
101
+ Maximum: 100
102
+ key dateEnd: object | The latest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default value is the time of the request.
103
+ key status: object | Return exports matching the status specified.
104
+
105
+ Returns:
106
+ ApiResponse
107
+ """
108
+ return await self._request(kwargs.pop("path"), params=kwargs, add_marketplace=False)
109
+
110
+ @sp_endpoint("/tax/invoices/2024-06-19/exports", method="POST")
111
+ async def create_invoices_export(self, **kwargs) -> ApiResponse:
112
+ """
113
+ create_invoices_export(self, **kwargs) -> ApiResponse
114
+
115
+ Creates an invoice export request.
116
+
117
+ **Usage Plan:**
118
+
119
+ ====================================== ==============
120
+ Rate (requests per second) Burst
121
+ ====================================== ==============
122
+ 0.167 1
123
+ ====================================== ==============
124
+
125
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
126
+
127
+ Examples:
128
+ literal blocks::
129
+
130
+ await InvoicesV20240619().create_invoices_export()
131
+
132
+ Args:
133
+ body: ExportInvoicesRequest | required Information required to create the export request.
134
+
135
+ Returns:
136
+ ApiResponse
137
+ """
138
+ return await self._request(kwargs.pop("path"), data=kwargs, add_marketplace=False)
139
+
140
+ @sp_endpoint("/tax/invoices/2024-06-19/exports/{exportId}", method="GET")
141
+ async def get_invoices_export(self, exportId, **kwargs) -> ApiResponse:
142
+ """
143
+ get_invoices_export(self, exportId, **kwargs) -> ApiResponse
144
+
145
+ Returns invoice export details (including the `exportDocumentId`, if available) for the export that you specify.
146
+
147
+ **Usage Plan:**
148
+
149
+ ====================================== ==============
150
+ Rate (requests per second) Burst
151
+ ====================================== ==============
152
+ 2 15
153
+ ====================================== ==============
154
+
155
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
156
+
157
+ Examples:
158
+ literal blocks::
159
+
160
+ await InvoicesV20240619().get_invoices_export("value")
161
+
162
+ Args:
163
+ exportId: object | required The unique identifier for the export.
164
+
165
+ Returns:
166
+ ApiResponse
167
+ """
168
+ return await self._request(fill_query_params(kwargs.pop("path"), exportId), params=kwargs, add_marketplace=False)
169
+
170
+ @sp_endpoint("/tax/invoices/2024-06-19/governmentInvoiceRequests", method="GET")
171
+ async def get_government_invoice_status(self, **kwargs) -> ApiResponse:
172
+ """
173
+ get_government_invoice_status(self, **kwargs) -> ApiResponse
174
+
175
+ Returns the status of an invoice generation request.
176
+
177
+ **Usage Plan:**
178
+
179
+ ====================================== ==============
180
+ Rate (requests per second) Burst
181
+ ====================================== ==============
182
+ 0.0167 1
183
+ ====================================== ==============
184
+
185
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
186
+
187
+ Examples:
188
+ literal blocks::
189
+
190
+ await InvoicesV20240619().get_government_invoice_status()
191
+
192
+ Args:
193
+ key marketplaceId: object | required The invoices status will match the marketplace that you specify.
194
+ key transactionType: object | required Marketplace specific classification of the transaction type that originated the invoice. Check 'transactionType' options using 'getInvoicesAttributes' operation.
195
+ key shipmentId: object | required The unique shipment identifier to get an invoice for.
196
+ key invoiceType: object | required Marketplace specific classification of the invoice type. Check 'invoiceType' options using 'getInvoicesAttributes' operation.
197
+ key inboundPlanId: object | The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
198
+
199
+ Returns:
200
+ ApiResponse
201
+ """
202
+ return await self._request(kwargs.pop("path"), params=kwargs, add_marketplace=False)
203
+
204
+ @sp_endpoint("/tax/invoices/2024-06-19/governmentInvoiceRequests", method="POST")
205
+ async def create_government_invoice(self, **kwargs) -> ApiResponse:
206
+ """
207
+ create_government_invoice(self, **kwargs) -> ApiResponse
208
+
209
+ Submits an asynchronous government invoice creation request.
210
+
211
+ **Usage Plan:**
212
+
213
+ ====================================== ==============
214
+ Rate (requests per second) Burst
215
+ ====================================== ==============
216
+ 0.0167 1
217
+ ====================================== ==============
218
+
219
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
220
+
221
+ Examples:
222
+ literal blocks::
223
+
224
+ await InvoicesV20240619().create_government_invoice()
225
+
226
+ Args:
227
+ body: GovernmentInvoiceRequest | required Information required to create the government invoice.
228
+
229
+ Returns:
230
+ ApiResponse
231
+ """
232
+ return await self._request(kwargs.pop("path"), data=kwargs, add_marketplace=False)
233
+
234
+ @sp_endpoint("/tax/invoices/2024-06-19/governmentInvoiceRequests/{shipmentId}", method="GET")
235
+ async def get_government_invoice_document(self, shipmentId, **kwargs) -> ApiResponse:
236
+ """
237
+ get_government_invoice_document(self, shipmentId, **kwargs) -> ApiResponse
238
+
239
+ Returns an invoiceDocument object containing an invoiceDocumentUrl .
240
+
241
+ **Usage Plan:**
242
+
243
+ ====================================== ==============
244
+ Rate (requests per second) Burst
245
+ ====================================== ==============
246
+ 0.0167 1
247
+ ====================================== ==============
248
+
249
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
250
+
251
+ Examples:
252
+ literal blocks::
253
+
254
+ await InvoicesV20240619().get_government_invoice_document("value")
255
+
256
+ Args:
257
+ key marketplaceId: object | required The invoices returned will match the marketplace that you specify.
258
+ key transactionType: object | required Marketplace specific classification of the transaction type that originated the invoice. Check 'transactionType' options using 'getInvoicesAttributes' operation.
259
+ shipmentId: object | required The unique shipment identifier to get an invoice for.
260
+ key invoiceType: object | required Marketplace specific classification of the invoice type. Check 'invoiceType' options using 'getInvoicesAttributes' operation.
261
+ key inboundPlanId: object | The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
262
+ key fileFormat: object | Requested file format. Default is XML
263
+
264
+ Returns:
265
+ ApiResponse
266
+ """
267
+ return await self._request(fill_query_params(kwargs.pop("path"), shipmentId), params=kwargs, add_marketplace=False)
268
+
269
+ @sp_endpoint("/tax/invoices/2024-06-19/invoices", method="GET")
270
+ async def get_invoices(self, **kwargs) -> ApiResponse:
271
+ """
272
+ get_invoices(self, **kwargs) -> ApiResponse
273
+
274
+ Returns invoice details for the invoices that match the filters that you specify.
275
+
276
+ **Usage Plan:**
277
+
278
+ ====================================== ==============
279
+ Rate (requests per second) Burst
280
+ ====================================== ==============
281
+ 0.1 20
282
+ ====================================== ==============
283
+
284
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
285
+
286
+ Examples:
287
+ literal blocks::
288
+
289
+ await InvoicesV20240619().get_invoices()
290
+
291
+ Args:
292
+ key transactionIdentifierName: object | The name of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierId` field.Use the `getInvoicesAttributes` operation to check `transactionIdentifierName` options.
293
+ key pageSize: object | The maximum number of invoices you want to return in a single call.
294
+ Minimum: 1
295
+ Maximum: 200
296
+ key dateEnd: object | The latest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is the current date-time.
297
+ key marketplaceId: object | required The response includes only the invoices that match the specified marketplace.
298
+ key transactionType: object | The marketplace-specific classification of the transaction type for which the invoice was created. Use the `getInvoicesAttributes` operation to check `transactionType` options.
299
+ key transactionIdentifierId: object | The ID of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierName` field.
300
+ key dateStart: object | The earliest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 24 hours prior to the time of the request.
301
+ key series: object | Return invoices with the specified series number.
302
+ key nextToken: object | The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
303
+ key sortOrder: object | Sort the invoices in the response in ascending or descending order.
304
+ key invoiceType: object | The marketplace-specific classification of the invoice type. Use the `getInvoicesAttributes` operation to check `invoiceType` options.
305
+ key statuses: object | A list of statuses that you can use to filter invoices. Use the `getInvoicesAttributes` operation to check invoice status options.
306
+ Min count: 1
307
+ key externalInvoiceId: object | Return invoices that match this external ID. This is typically the Government Invoice ID.
308
+ key sortBy: object | The attribute by which you want to sort the invoices in the response.
309
+
310
+ Returns:
311
+ ApiResponse
312
+ """
313
+ return await self._request(kwargs.pop("path"), params=kwargs, add_marketplace=False)
314
+
315
+ @sp_endpoint("/tax/invoices/2024-06-19/invoices/{invoiceId}", method="GET")
316
+ async def get_invoice(self, invoiceId, **kwargs) -> ApiResponse:
317
+ """
318
+ get_invoice(self, invoiceId, **kwargs) -> ApiResponse
319
+
320
+ Returns invoice data for the specified invoice. This operation returns only a subset of the invoices data; refer to the response definition to get all the possible attributes.
321
+ To get the full invoice, use the `createInvoicesExport` operation to start an export request.
322
+
323
+ **Usage Plan:**
324
+
325
+ ====================================== ==============
326
+ Rate (requests per second) Burst
327
+ ====================================== ==============
328
+ 2 15
329
+ ====================================== ==============
330
+
331
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
332
+
333
+ Examples:
334
+ literal blocks::
335
+
336
+ await InvoicesV20240619().get_invoice("value")
337
+
338
+ Args:
339
+ key marketplaceId: object | required The marketplace from which you want the invoice.
340
+ invoiceId: object | required The invoice identifier.
341
+
342
+ Returns:
343
+ ApiResponse
344
+ """
345
+ return await self._request(fill_query_params(kwargs.pop("path"), invoiceId), params=kwargs, add_marketplace=False)