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
@@ -0,0 +1,723 @@
1
+ import enum
2
+ import os
3
+ import urllib.parse
4
+ from datetime import datetime, timezone
5
+
6
+ from sp_api.base import (
7
+ Client,
8
+ sp_endpoint,
9
+ fill_query_params,
10
+ ApiResponse,
11
+ Marketplaces,
12
+ )
13
+
14
+
15
+ class AmznShippingBusiness(str, enum.Enum):
16
+ US = "AmazonShipping_US"
17
+ IN = "AmazonShipping_IN"
18
+ UK = "AmazonShipping_UK"
19
+ AE = "AmazonShipping_UAE"
20
+ SA = "AmazonShipping_SA"
21
+ IT = "AmazonShipping_IT"
22
+ EG = "AmazonShipping_EG"
23
+ ES = "AmazonShipping_ES"
24
+ FR = "AmazonShipping_FR"
25
+ JP = "AmazonShipping_JP"
26
+
27
+ @classmethod
28
+ def has_key(cls, name):
29
+ return name in cls.__members__
30
+
31
+
32
+ class ShippingV2(Client):
33
+ """
34
+ Shipping V2 SP-API Client
35
+ :link:
36
+
37
+ Provides programmatic access to Amazon Shipping APIs.
38
+ """
39
+
40
+ amzn_shipping_business: AmznShippingBusiness = AmznShippingBusiness.US
41
+
42
+ def __init__(self, *args, **kwargs):
43
+ if "amzn_shipping_business" in kwargs:
44
+ self.amzn_shipping_business = kwargs.pop(
45
+ "amzn_shipping_business", AmznShippingBusiness.US
46
+ )
47
+ else:
48
+ marketplace = args[0] if len(args) > 0 else Marketplaces.US
49
+ if os.environ.get("SP_API_DEFAULT_MARKETPLACE", None):
50
+ marketplace = Marketplaces[os.environ.get("SP_API_DEFAULT_MARKETPLACE")]
51
+
52
+ if AmznShippingBusiness.has_key(marketplace.name):
53
+ self.amzn_shipping_business = AmznShippingBusiness[marketplace.name]
54
+
55
+ super().__init__(*args, **kwargs)
56
+
57
+ @property
58
+ def headers(self):
59
+ return {
60
+ "host": self.endpoint[8:],
61
+ "user-agent": self.user_agent,
62
+ "x-amz-access-token": self.restricted_data_token or self.auth.access_token,
63
+ "x-amz-date": datetime.now(timezone.utc).strftime("%Y%m%dT%H%M%SZ"),
64
+ "content-type": "application/json",
65
+ "x-amzn-shipping-business-id": self.amzn_shipping_business.value,
66
+ }
67
+
68
+ @sp_endpoint("/shipping/v2/shipments/rates", method="POST")
69
+ def get_rates(self, **kwargs) -> ApiResponse:
70
+ """
71
+ get_rates(self, **kwargs) -> ApiResponse
72
+
73
+ Returns the available shipping service offerings.
74
+
75
+ **Usage Plan:**
76
+
77
+ ====================================== ==============
78
+ Rate (requests per second) Burst
79
+ ====================================== ==============
80
+ 80 100
81
+ ====================================== ==============
82
+
83
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
84
+
85
+ Examples:
86
+ literal blocks::
87
+
88
+ ShippingV2().get_rates()
89
+
90
+ Args:
91
+ body: GetRatesRequest | required GetRatesRequest body
92
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
93
+
94
+ Returns:
95
+ ApiResponse
96
+ """
97
+
98
+ return self._request(kwargs.pop("path"), data=kwargs, add_marketplace=False)
99
+
100
+ @sp_endpoint("/shipping/v2/shipments", method="POST")
101
+ def purchase_shipment(self, **kwargs) -> ApiResponse:
102
+ """
103
+ purchase_shipment(self, **kwargs) -> ApiResponse
104
+
105
+ Purchases a shipping service and returns purchase related details and documents.
106
+
107
+ Note: You must complete the purchase within 10 minutes of rate creation by the shipping service provider. If you make the request after the 10 minutes have expired, you will receive an error response with the error code equal to "TOKEN_EXPIRED". If you receive this error response, you must get the rates for the shipment again.
108
+
109
+ **Usage Plan:**
110
+
111
+ ====================================== ==============
112
+ Rate (requests per second) Burst
113
+ ====================================== ==============
114
+ 80 100
115
+ ====================================== ==============
116
+
117
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
118
+
119
+ Examples:
120
+ literal blocks::
121
+
122
+ ShippingV2().purchase_shipment()
123
+
124
+ Args:
125
+ body: PurchaseShipmentRequest | required PurchaseShipmentRequest body
126
+ x-amzn-IdempotencyKey: object | A unique value which the server uses to recognize subsequent retries of the same request.
127
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
128
+
129
+ Returns:
130
+ ApiResponse
131
+ """
132
+ return self._request(kwargs.pop("path"), data=kwargs, add_marketplace=False)
133
+
134
+ @sp_endpoint("/shipping/v2/oneClickShipment", method="POST")
135
+ def one_click_shipment(self, **kwargs) -> ApiResponse:
136
+ """
137
+ one_click_shipment(self, **kwargs) -> ApiResponse
138
+
139
+ Purchases a shipping service identifier and returns purchase-related details and documents.
140
+
141
+ **Usage Plan:**
142
+
143
+ ====================================== ==============
144
+ Rate (requests per second) Burst
145
+ ====================================== ==============
146
+ 80 100
147
+ ====================================== ==============
148
+
149
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
150
+
151
+ Examples:
152
+ literal blocks::
153
+
154
+ ShippingV2().one_click_shipment()
155
+
156
+ Args:
157
+ body: OneClickShipmentRequest | required OneClickShipmentRequest body
158
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
159
+
160
+ Returns:
161
+ ApiResponse
162
+ """
163
+ return self._request(kwargs.pop("path"), data=kwargs, add_marketplace=False)
164
+
165
+ @sp_endpoint("/shipping/v2/tracking", method="GET")
166
+ def get_tracking(self, **kwargs) -> ApiResponse:
167
+ """
168
+ get_tracking(self, **kwargs) -> ApiResponse
169
+
170
+ Returns tracking information for a purchased shipment.
171
+
172
+ **Usage Plan:**
173
+
174
+ ====================================== ==============
175
+ Rate (requests per second) Burst
176
+ ====================================== ==============
177
+ 80 100
178
+ ====================================== ==============
179
+
180
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
181
+
182
+ Examples:
183
+ literal blocks::
184
+
185
+ ShippingV2().get_tracking()
186
+
187
+ Args:
188
+ key trackingId: object | required A carrier-generated tracking identifier originally returned by the purchaseShipment operation.
189
+ key carrierId: object | required A carrier identifier originally returned by the getRates operation for the selected rate.
190
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
191
+
192
+ Returns:
193
+ ApiResponse
194
+ """
195
+ return self._request(kwargs.pop("path"), params=kwargs, add_marketplace=False)
196
+
197
+ @sp_endpoint("/shipping/v2/shipments/{}/documents", method="GET")
198
+ def get_shipment_documents(self, shipmentId, **kwargs) -> ApiResponse:
199
+ """
200
+ get_shipment_documents(self, shipmentId, **kwargs) -> ApiResponse
201
+
202
+ Returns the shipping documents associated with a package in a shipment.
203
+
204
+ **Usage Plan:**
205
+
206
+ ====================================== ==============
207
+ Rate (requests per second) Burst
208
+ ====================================== ==============
209
+ 80 100
210
+ ====================================== ==============
211
+
212
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
213
+
214
+ Examples:
215
+ literal blocks::
216
+
217
+ ShippingV2().get_shipment_documents("value")
218
+
219
+ Args:
220
+ shipmentId: object | required The shipment identifier originally returned by the purchaseShipment operation.
221
+ key packageClientReferenceId: object | required The package client reference identifier originally provided in the request body parameter for the getRates operation.
222
+ key format: object | The file format of the document. Must be one of the supported formats returned by the getRates operation.
223
+ key dpi: object | The resolution of the document (for example, 300 means 300 dots per inch). Must be one of the supported resolutions returned in the response to the getRates operation.
224
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
225
+
226
+ Returns:
227
+ ApiResponse
228
+ """
229
+
230
+ return self._request(
231
+ fill_query_params(kwargs.pop("path"), shipmentId),
232
+ params=kwargs,
233
+ add_marketplace=False,
234
+ )
235
+
236
+ @sp_endpoint("/shipping/v2/shipments/{}/cancel", method="PUT")
237
+ def cancel_shipment(self, shipmentId, **kwargs) -> ApiResponse:
238
+ """
239
+ cancel_shipment(self, shipmentId, **kwargs) -> ApiResponse
240
+
241
+ Cancels a purchased shipment. Returns an empty object if the shipment is successfully cancelled.
242
+
243
+ **Usage Plan:**
244
+
245
+ ====================================== ==============
246
+ Rate (requests per second) Burst
247
+ ====================================== ==============
248
+ 80 100
249
+ ====================================== ==============
250
+
251
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
252
+
253
+ Examples:
254
+ literal blocks::
255
+
256
+ ShippingV2().cancel_shipment("value")
257
+
258
+ Args:
259
+ shipmentId: object | required The shipment identifier originally returned by the purchaseShipment operation.
260
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
261
+
262
+ Returns:
263
+ ApiResponse
264
+ """
265
+ return self._request(
266
+ fill_query_params(kwargs.pop("path"), shipmentId),
267
+ data=kwargs,
268
+ add_marketplace=False,
269
+ )
270
+
271
+ @sp_endpoint("/shipping/v2/accessPoints", method="GET")
272
+ def get_access_points(self, **kwargs) -> ApiResponse:
273
+ """
274
+ get_access_points(self, **kwargs) -> ApiResponse
275
+
276
+ Returns a list of access points in proximity of input postal code.
277
+
278
+ **Usage Plan:**
279
+
280
+ ====================================== ==============
281
+ Rate (requests per second) Burst
282
+ ====================================== ==============
283
+ 80 100
284
+ ====================================== ==============
285
+
286
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
287
+
288
+ Examples:
289
+ literal blocks::
290
+
291
+ ShippingV2().get_access_points()
292
+
293
+ Args:
294
+ key accessPointTypes: object | required Access point types
295
+ key countryCode: object | required Country code for access point
296
+ key postalCode: object | required postal code for access point
297
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
298
+
299
+ Returns:
300
+ ApiResponse
301
+ """
302
+ return self._request(kwargs.pop("path"), params=kwargs, add_marketplace=False)
303
+
304
+ @sp_endpoint("/shipping/v2/ndrFeedback", method="POST")
305
+ def submit_ndr_feedback(self, **kwargs) -> ApiResponse:
306
+ """
307
+ submit_ndr_feedback(self, **kwargs) -> ApiResponse
308
+
309
+ This API submits the NDR (Non-delivery Report) Feedback for any eligible shipment.
310
+
311
+ **Usage Plan:**
312
+
313
+ ====================================== ==============
314
+ Rate (requests per second) Burst
315
+ ====================================== ==============
316
+ 80 100
317
+ ====================================== ==============
318
+
319
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
320
+
321
+ Examples:
322
+ literal blocks::
323
+
324
+ ShippingV2().submit_ndr_feedback()
325
+
326
+ Args:
327
+ body: SubmitNdrFeedbackRequest | required Request body for ndrFeedback operation
328
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
329
+
330
+ Returns:
331
+ ApiResponse
332
+ """
333
+ return self._request(kwargs.pop("path"), data=kwargs, add_marketplace=False)
334
+
335
+ @sp_endpoint("/shipping/v2/shipments/additionalInputs/schema", method="GET")
336
+ def get_additional_inputs(self, **kwargs) -> ApiResponse:
337
+ """
338
+ get_additional_inputs(self, **kwargs) -> ApiResponse
339
+
340
+ Returns the JSON schema to use for providing additional inputs when needed to purchase a shipping offering. Call the getAdditionalInputs operation when the response to a previous call to the getRates operation indicates that additional inputs are required for the rate (shipping offering) that you want to purchase.
341
+
342
+ **Usage Plan:**
343
+
344
+ ====================================== ==============
345
+ Rate (requests per second) Burst
346
+ ====================================== ==============
347
+ 80 100
348
+ ====================================== ==============
349
+
350
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
351
+
352
+ Examples:
353
+ literal blocks::
354
+
355
+ ShippingV2().get_additional_inputs()
356
+
357
+ Args:
358
+ key requestToken: object | required The request token returned in the response to the getRates operation.
359
+ key rateId: object | required The rate identifier for the shipping offering (rate) returned in the response to the getRates operation.
360
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
361
+
362
+ Returns:
363
+ ApiResponse
364
+ """
365
+ return self._request(kwargs.pop("path"), params=kwargs, add_marketplace=False)
366
+
367
+
368
+ @sp_endpoint("/shipping/v2/shipments/directPurchase", method="POST")
369
+ def direct_purchase_shipment(self, **kwargs) -> ApiResponse:
370
+ """
371
+ direct_purchase_shipment(self, **kwargs) -> ApiResponse
372
+
373
+ Purchases the shipping service for a shipment using the best fit service offering. Returns purchase related details and documents.
374
+
375
+ **Usage Plan:**
376
+
377
+ ====================================== ==============
378
+ Rate (requests per second) Burst
379
+ ====================================== ==============
380
+ 80 100
381
+ ====================================== ==============
382
+
383
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
384
+
385
+ Examples:
386
+ literal blocks::
387
+
388
+ ShippingV2().direct_purchase_shipment()
389
+
390
+ Args:
391
+ body: DirectPurchaseRequest | required DirectPurchaseRequest body
392
+ x-amzn-IdempotencyKey: object | A unique value which the server uses to recognize subsequent retries of the same request.
393
+ locale: object | The IETF Language Tag. Note that this only supports the primary language subtag with one secondary language subtag (i.e. en-US, fr-CA).
394
+ The secondary language subtag is almost always a regional designation.
395
+ This does not support additional subtags beyond the primary and secondary language subtags.
396
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
397
+
398
+ Returns:
399
+ ApiResponse
400
+ """
401
+ return self._request(kwargs.pop("path"), data=kwargs)
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+ @sp_endpoint("/shipping/v2/carrierAccountFormInputs", method="GET")
410
+ def get_carrier_account_form_inputs(self, **kwargs) -> ApiResponse:
411
+ """
412
+ get_carrier_account_form_inputs(self, **kwargs) -> ApiResponse
413
+
414
+ This API will return a list of input schema required to register a shipper account with the carrier.
415
+
416
+ **Usage Plan:**
417
+
418
+ ====================================== ==============
419
+ Rate (requests per second) Burst
420
+ ====================================== ==============
421
+ 80 100
422
+ ====================================== ==============
423
+
424
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
425
+
426
+ Examples:
427
+ literal blocks::
428
+
429
+ ShippingV2().get_carrier_account_form_inputs()
430
+
431
+ Args:
432
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
433
+
434
+ Returns:
435
+ ApiResponse
436
+ """
437
+ return self._request(kwargs.pop("path"), params=kwargs)
438
+
439
+ @sp_endpoint("/shipping/v2/carrierAccounts", method="PUT")
440
+ def get_carrier_accounts(self, **kwargs) -> ApiResponse:
441
+ """
442
+ get_carrier_accounts(self, **kwargs) -> ApiResponse
443
+
444
+ This API will return Get all carrier accounts for a merchant.
445
+
446
+ **Usage Plan:**
447
+
448
+ ====================================== ==============
449
+ Rate (requests per second) Burst
450
+ ====================================== ==============
451
+ 80 100
452
+ ====================================== ==============
453
+
454
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
455
+
456
+ Examples:
457
+ literal blocks::
458
+
459
+ ShippingV2().get_carrier_accounts()
460
+
461
+ Args:
462
+ body: GetCarrierAccountsRequest | required GetCarrierAccountsRequest body
463
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
464
+
465
+ Returns:
466
+ ApiResponse
467
+ """
468
+ return self._request(kwargs.pop("path"), data=kwargs)
469
+
470
+ @sp_endpoint("/shipping/v2/carrierAccounts/{}", method="PUT")
471
+ def link_carrier_account(self, carrierId, **kwargs) -> ApiResponse:
472
+ """
473
+ link_carrier_account(self, carrierId, **kwargs) -> ApiResponse
474
+
475
+ This API associates/links the specified carrier account with the merchant.
476
+
477
+ **Usage Plan:**
478
+
479
+ ====================================== ==============
480
+ Rate (requests per second) Burst
481
+ ====================================== ==============
482
+ 80 100
483
+ ====================================== ==============
484
+
485
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
486
+
487
+ Examples:
488
+ literal blocks::
489
+
490
+ ShippingV2().link_carrier_account("value")
491
+
492
+ Args:
493
+ carrierId: object | required An identifier for the carrier with which the seller's account is being linked.
494
+ body: LinkCarrierAccountRequest | required LinkCarrierAccountRequest body
495
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
496
+
497
+ Returns:
498
+ ApiResponse
499
+ """
500
+ return self._request(fill_query_params(kwargs.pop("path"), carrierId), data=kwargs)
501
+
502
+ @sp_endpoint("/shipping/v2/carrierAccounts/{}", method="POST")
503
+ def link_carrier_account_post(self, carrierId, **kwargs) -> ApiResponse:
504
+ """
505
+ link_carrier_account_post(self, carrierId, **kwargs) -> ApiResponse
506
+
507
+ This API associates/links the specified carrier account with the merchant.
508
+
509
+ **Usage Plan:**
510
+
511
+ ====================================== ==============
512
+ Rate (requests per second) Burst
513
+ ====================================== ==============
514
+ 5 10
515
+ ====================================== ==============
516
+
517
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
518
+
519
+ Examples:
520
+ literal blocks::
521
+
522
+ ShippingV2().link_carrier_account_post("value")
523
+
524
+ Args:
525
+ carrierId: object | required An identifier for the carrier with which the seller's account is being linked.
526
+ body: LinkCarrierAccountRequest | required LinkCarrierAccountRequest body
527
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
528
+
529
+ Returns:
530
+ ApiResponse
531
+ """
532
+ return self._request(fill_query_params(kwargs.pop("path"), carrierId), data=kwargs)
533
+
534
+ @sp_endpoint("/shipping/v2/carrierAccounts/{}/unlink", method="PUT")
535
+ def unlink_carrier_account(self, carrierId, **kwargs) -> ApiResponse:
536
+ """
537
+ unlink_carrier_account(self, carrierId, **kwargs) -> ApiResponse
538
+
539
+ This API Unlink the specified carrier account with the merchant.
540
+
541
+ **Usage Plan:**
542
+
543
+ ====================================== ==============
544
+ Rate (requests per second) Burst
545
+ ====================================== ==============
546
+ 80 100
547
+ ====================================== ==============
548
+
549
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
550
+
551
+ Examples:
552
+ literal blocks::
553
+
554
+ ShippingV2().unlink_carrier_account("value")
555
+
556
+ Args:
557
+ carrierId: object | required carrier Id to unlink with merchant.
558
+ body: UnlinkCarrierAccountRequest | required UnlinkCarrierAccountRequest body
559
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
560
+
561
+ Returns:
562
+ ApiResponse
563
+ """
564
+ return self._request(fill_query_params(kwargs.pop("path"), carrierId), data=kwargs)
565
+
566
+ @sp_endpoint("/shipping/v2/collectionForms", method="POST")
567
+ def generate_collection_form(self, **kwargs) -> ApiResponse:
568
+ """
569
+ generate_collection_form(self, **kwargs) -> ApiResponse
570
+
571
+ This API Call to generate the collection form.
572
+
573
+ **Usage Plan:**
574
+
575
+ ====================================== ==============
576
+ Rate (requests per second) Burst
577
+ ====================================== ==============
578
+ 80 100
579
+ ====================================== ==============
580
+
581
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
582
+
583
+ Examples:
584
+ literal blocks::
585
+
586
+ ShippingV2().generate_collection_form()
587
+
588
+ Args:
589
+ body: GenerateCollectionFormRequest | required GenerateCollectionFormRequest body
590
+ x-amzn-IdempotencyKey: object | A unique value which the server uses to recognize subsequent retries of the same request.
591
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
592
+
593
+ Returns:
594
+ ApiResponse
595
+ """
596
+ return self._request(kwargs.pop("path"), data=kwargs)
597
+
598
+ @sp_endpoint("/shipping/v2/collectionForms/history", method="PUT")
599
+ def get_collection_form_history(self, **kwargs) -> ApiResponse:
600
+ """
601
+ get_collection_form_history(self, **kwargs) -> ApiResponse
602
+
603
+ This API Call to get the history of the previously generated collection forms.
604
+
605
+ **Usage Plan:**
606
+
607
+ ====================================== ==============
608
+ Rate (requests per second) Burst
609
+ ====================================== ==============
610
+ 80 100
611
+ ====================================== ==============
612
+
613
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
614
+
615
+ Examples:
616
+ literal blocks::
617
+
618
+ ShippingV2().get_collection_form_history()
619
+
620
+ Args:
621
+ body: GetCollectionFormHistoryRequest | required GetCollectionFormHistoryRequest body
622
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
623
+
624
+ Returns:
625
+ ApiResponse
626
+ """
627
+ return self._request(kwargs.pop("path"), data=kwargs)
628
+
629
+ @sp_endpoint("/shipping/v2/unmanifestedShipments", method="PUT")
630
+ def get_unmanifested_shipments(self, **kwargs) -> ApiResponse:
631
+ """
632
+ get_unmanifested_shipments(self, **kwargs) -> ApiResponse
633
+
634
+ This API Get all unmanifested carriers with shipment locations. Any locations which has unmanifested shipments
635
+ with an eligible carrier for manifesting shall be returned.
636
+
637
+ **Usage Plan:**
638
+
639
+ ====================================== ==============
640
+ Rate (requests per second) Burst
641
+ ====================================== ==============
642
+ 80 100
643
+ ====================================== ==============
644
+
645
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
646
+
647
+ Examples:
648
+ literal blocks::
649
+
650
+ ShippingV2().get_unmanifested_shipments()
651
+
652
+ Args:
653
+ body: GetUnmanifestedShipmentsRequest | required GetUmanifestedShipmentsRequest body
654
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
655
+
656
+ Returns:
657
+ ApiResponse
658
+ """
659
+ return self._request(kwargs.pop("path"), data=kwargs)
660
+
661
+ @sp_endpoint("/shipping/v2/collectionForms/{}", method="GET")
662
+ def get_collection_form(self, collectionFormId, **kwargs) -> ApiResponse:
663
+ """
664
+ get_collection_form(self, collectionFormId, **kwargs) -> ApiResponse
665
+
666
+ This API reprint a collection form.
667
+
668
+ **Usage Plan:**
669
+
670
+ ====================================== ==============
671
+ Rate (requests per second) Burst
672
+ ====================================== ==============
673
+ 80 100
674
+ ====================================== ==============
675
+
676
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
677
+
678
+ Examples:
679
+ literal blocks::
680
+
681
+ ShippingV2().get_collection_form("value")
682
+
683
+ Args:
684
+ collectionFormId: object | required collection form Id to reprint a collection.
685
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
686
+
687
+ Returns:
688
+ ApiResponse
689
+ """
690
+ return self._request(fill_query_params(kwargs.pop("path"), collectionFormId), params=kwargs)
691
+
692
+
693
+
694
+ @sp_endpoint("/shipping/v2/claims", method="POST")
695
+ def create_claim(self, **kwargs) -> ApiResponse:
696
+ """
697
+ create_claim(self, **kwargs) -> ApiResponse
698
+
699
+ This API will be used to create claim for single eligible shipment.
700
+
701
+ **Usage Plan:**
702
+
703
+ ====================================== ==============
704
+ Rate (requests per second) Burst
705
+ ====================================== ==============
706
+ 80 100
707
+ ====================================== ==============
708
+
709
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
710
+
711
+ Examples:
712
+ literal blocks::
713
+
714
+ ShippingV2().create_claim()
715
+
716
+ Args:
717
+ body: CreateClaimRequest | required Request body for the createClaim operation
718
+ x-amzn-shipping-business-id: object | Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
719
+
720
+ Returns:
721
+ ApiResponse
722
+ """
723
+ return self._request(kwargs.pop("path"), data=kwargs)