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