python-amazon-sp-api 1.9.18__py3-none-any.whl → 2.0.7__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 (167) hide show
  1. {python_amazon_sp_api-1.9.18.data → python_amazon_sp_api-2.0.7.data}/scripts/make_endpoint +2 -2
  2. {python_amazon_sp_api-1.9.18.dist-info → python_amazon_sp_api-2.0.7.dist-info}/METADATA +46 -23
  3. python_amazon_sp_api-2.0.7.dist-info/RECORD +251 -0
  4. {python_amazon_sp_api-1.9.18.dist-info → python_amazon_sp_api-2.0.7.dist-info}/WHEEL +1 -1
  5. {python_amazon_sp_api-1.9.18.dist-info → python_amazon_sp_api-2.0.7.dist-info}/top_level.txt +0 -1
  6. sp_api/__version__.py +1 -1
  7. sp_api/api/__init__.py +18 -1
  8. sp_api/api/application_integrations/application_integrations.py +118 -0
  9. sp_api/api/application_management/application_management.py +2 -1
  10. sp_api/api/catalog/catalog.py +3 -4
  11. sp_api/api/catalog_items/catalog_items.py +3 -6
  12. sp_api/api/customer_feedback/customer_feedback.py +110 -0
  13. sp_api/api/data_kiosk/data_kiosk.py +5 -6
  14. sp_api/api/easy_ship/easy_ship.py +190 -0
  15. sp_api/api/external_fulfillment/external_fulfillment.py +706 -0
  16. sp_api/api/feeds/feeds.py +11 -8
  17. sp_api/api/finances/finances.py +30 -4
  18. sp_api/api/fulfillment_inbound/fulfillment_inbound.py +35 -2
  19. sp_api/api/inventories/inventories.py +2 -7
  20. sp_api/api/listings_items/listings_items.py +3 -24
  21. sp_api/api/messaging/messaging.py +42 -0
  22. sp_api/api/orders/orders.py +7 -0
  23. sp_api/api/product_fees/product_fees.py +31 -74
  24. sp_api/api/products/products.py +80 -2
  25. sp_api/api/products/products_definitions.py +11 -85
  26. sp_api/api/reports/reports.py +65 -97
  27. sp_api/api/sales/sales.py +2 -2
  28. sp_api/asyncio/api/__init__.py +164 -0
  29. sp_api/asyncio/api/amazon_warehousing_and_distribu/__init__.py +9 -0
  30. sp_api/asyncio/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +130 -0
  31. sp_api/asyncio/api/aplus_content/__init__.py +5 -0
  32. sp_api/asyncio/api/aplus_content/aplus_content.py +330 -0
  33. sp_api/asyncio/api/application_integrations/__init__.py +5 -0
  34. sp_api/asyncio/api/application_integrations/application_integrations.py +119 -0
  35. sp_api/asyncio/api/application_management/__init__.py +5 -0
  36. sp_api/asyncio/api/application_management/application_management.py +36 -0
  37. sp_api/asyncio/api/authorization/__init__.py +5 -0
  38. sp_api/asyncio/api/authorization/authorization.py +54 -0
  39. sp_api/asyncio/api/catalog/__init__.py +5 -0
  40. sp_api/asyncio/api/catalog/catalog.py +111 -0
  41. sp_api/asyncio/api/catalog_items/__init__.py +6 -0
  42. sp_api/asyncio/api/catalog_items/catalog_items.py +93 -0
  43. sp_api/asyncio/api/clients/__init__.py +1 -0
  44. sp_api/asyncio/api/customer_feedback/__init__.py +5 -0
  45. sp_api/asyncio/api/customer_feedback/customer_feedback.py +111 -0
  46. sp_api/asyncio/api/data_kiosk/__init__.py +5 -0
  47. sp_api/asyncio/api/data_kiosk/data_kiosk.py +236 -0
  48. sp_api/asyncio/api/easy_ship/__init__.py +5 -0
  49. sp_api/asyncio/api/easy_ship/easy_ship.py +191 -0
  50. sp_api/asyncio/api/external_fulfillment/__init__.py +5 -0
  51. sp_api/asyncio/api/external_fulfillment/external_fulfillment.py +706 -0
  52. sp_api/asyncio/api/fba_inbound_eligibility/__init__.py +5 -0
  53. sp_api/asyncio/api/fba_inbound_eligibility/fba_inbound_eligibility.py +96 -0
  54. sp_api/asyncio/api/fba_small_and_light/__init__.py +5 -0
  55. sp_api/asyncio/api/fba_small_and_light/fba_small_and_light.py +213 -0
  56. sp_api/asyncio/api/feeds/feeds.py +260 -0
  57. sp_api/asyncio/api/finances/finances.py +100 -0
  58. sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound.py +1798 -0
  59. sp_api/asyncio/api/fulfillment_outbound/fulfillment_outbound.py +736 -0
  60. sp_api/asyncio/api/inventories/inventories.py +74 -0
  61. sp_api/asyncio/api/listings_items/__init__.py +0 -0
  62. sp_api/asyncio/api/listings_items/listings_items.py +170 -0
  63. sp_api/asyncio/api/listings_restrictions/__init__.py +0 -0
  64. sp_api/asyncio/api/listings_restrictions/listings_restrictions.py +36 -0
  65. sp_api/asyncio/api/merchant_fulfillment/__init__.py +0 -0
  66. sp_api/asyncio/api/merchant_fulfillment/merchant_fulfillment.py +384 -0
  67. sp_api/asyncio/api/messaging/__init__.py +0 -0
  68. sp_api/asyncio/api/messaging/messaging.py +511 -0
  69. sp_api/asyncio/api/models/__init__.py +4 -0
  70. sp_api/asyncio/api/notifications/__init__.py +0 -0
  71. sp_api/asyncio/api/notifications/notifications.py +295 -0
  72. sp_api/asyncio/api/orders/__init__.py +0 -0
  73. sp_api/asyncio/api/orders/orders.py +362 -0
  74. sp_api/asyncio/api/overrides/__init__.py +1 -0
  75. sp_api/asyncio/api/product_fees/__init__.py +0 -0
  76. sp_api/asyncio/api/product_fees/product_fees.py +194 -0
  77. sp_api/asyncio/api/product_type_definitions/__init__.py +0 -0
  78. sp_api/asyncio/api/product_type_definitions/product_type_definitions.py +75 -0
  79. sp_api/asyncio/api/products/__init__.py +0 -0
  80. sp_api/asyncio/api/products/products.py +405 -0
  81. sp_api/asyncio/api/products/products_definitions.py +11 -0
  82. sp_api/asyncio/api/replenishment/__init__.py +0 -0
  83. sp_api/asyncio/api/replenishment/replenishment.py +121 -0
  84. sp_api/asyncio/api/reports/__init__.py +0 -0
  85. sp_api/asyncio/api/reports/reports.py +439 -0
  86. sp_api/asyncio/api/sales/__init__.py +0 -0
  87. sp_api/asyncio/api/sales/sales.py +93 -0
  88. sp_api/asyncio/api/sellers/__init__.py +0 -0
  89. sp_api/asyncio/api/sellers/sellers.py +70 -0
  90. sp_api/asyncio/api/services/__init__.py +0 -0
  91. sp_api/asyncio/api/services/services.py +218 -0
  92. sp_api/asyncio/api/shipping/__init__.py +0 -0
  93. sp_api/asyncio/api/shipping/shipping.py +459 -0
  94. sp_api/asyncio/api/shipping/shippingV2.py +651 -0
  95. sp_api/asyncio/api/solicitations/__init__.py +0 -0
  96. sp_api/asyncio/api/solicitations/solicitations.py +78 -0
  97. sp_api/asyncio/api/supply_sources/__init__.py +0 -0
  98. sp_api/asyncio/api/supply_sources/supply_sources.py +138 -0
  99. sp_api/asyncio/api/tokens/__init__.py +0 -0
  100. sp_api/asyncio/api/tokens/tokens.py +65 -0
  101. sp_api/asyncio/api/upload/__init__.py +0 -0
  102. sp_api/asyncio/api/upload/upload.py +18 -0
  103. sp_api/asyncio/api/vendor_direct_fulfillment_inventory/__init__.py +0 -0
  104. sp_api/asyncio/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +64 -0
  105. sp_api/asyncio/api/vendor_direct_fulfillment_orders/__init__.py +0 -0
  106. sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +196 -0
  107. sp_api/asyncio/api/vendor_direct_fulfillment_payments/__init__.py +0 -0
  108. sp_api/asyncio/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +254 -0
  109. sp_api/asyncio/api/vendor_direct_fulfillment_shipping/__init__.py +0 -0
  110. sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +627 -0
  111. sp_api/asyncio/api/vendor_direct_fulfillment_transactions/__init__.py +0 -0
  112. sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +43 -0
  113. sp_api/asyncio/api/vendor_invoices/__init__.py +0 -0
  114. sp_api/asyncio/api/vendor_invoices/vendor_invoices.py +295 -0
  115. sp_api/asyncio/api/vendor_orders/__init__.py +0 -0
  116. sp_api/asyncio/api/vendor_orders/vendor_orders.py +210 -0
  117. sp_api/asyncio/api/vendor_shipments/__init__.py +0 -0
  118. sp_api/asyncio/api/vendor_shipments/vendor_shipments.py +118 -0
  119. sp_api/asyncio/api/vendor_transaction_status/__init__.py +0 -0
  120. sp_api/asyncio/api/vendor_transaction_status/vendor_transaction_status.py +41 -0
  121. sp_api/asyncio/auth/__init__.py +12 -0
  122. sp_api/asyncio/auth/access_token_client.py +145 -0
  123. sp_api/asyncio/auth/exceptions.py +5 -0
  124. sp_api/asyncio/base/__init__.py +53 -0
  125. sp_api/asyncio/base/_transport_httpx.py +50 -0
  126. sp_api/asyncio/base/base_client.py +8 -0
  127. sp_api/asyncio/base/client.py +169 -0
  128. sp_api/asyncio/util/__init__.py +29 -0
  129. sp_api/asyncio/util/key_maker.py +5 -0
  130. sp_api/asyncio/util/load_all_pages.py +55 -0
  131. sp_api/asyncio/util/load_date_bound.py +53 -0
  132. sp_api/asyncio/util/retry.py +88 -0
  133. sp_api/auth/_core.py +39 -0
  134. sp_api/auth/access_token_client.py +18 -29
  135. sp_api/base/ApiResponse.py +3 -2
  136. sp_api/base/_core.py +110 -0
  137. sp_api/base/_transport_httpx.py +39 -0
  138. sp_api/base/client.py +40 -63
  139. sp_api/base/helpers.py +1 -1
  140. sp_api/base/reportTypes.py +3 -2
  141. sp_api/util/__init__.py +36 -0
  142. sp_api/util/load_all_pages.py +2 -1
  143. sp_api/util/params.py +57 -0
  144. sp_api/util/product_fees.py +40 -0
  145. sp_api/util/products_definitions.py +169 -0
  146. sp_api/util/report_document.py +154 -0
  147. python_amazon_sp_api-1.9.18.dist-info/RECORD +0 -144
  148. tests/api/finances/test_finances.py +0 -19
  149. tests/api/notifications/test_notifications.py +0 -26
  150. tests/api/orders/test_orders.py +0 -122
  151. tests/api/product_fees/product_fees.py +0 -49
  152. tests/api/reports/test_reports.py +0 -127
  153. tests/client/test_auth.py +0 -59
  154. tests/client/test_base.py +0 -163
  155. tests/client/test_credential_provider.py +0 -45
  156. tests/client/test_helpers.py +0 -142
  157. {python_amazon_sp_api-1.9.18.dist-info → python_amazon_sp_api-2.0.7.dist-info/licenses}/LICENSE +0 -0
  158. {tests → sp_api/api/application_integrations}/__init__.py +0 -0
  159. {tests/api → sp_api/api/customer_feedback}/__init__.py +0 -0
  160. {tests/api/finances → sp_api/api/easy_ship}/__init__.py +0 -0
  161. {tests/api/notifications → sp_api/api/external_fulfillment}/__init__.py +0 -0
  162. {tests/api/orders → sp_api/asyncio}/__init__.py +0 -0
  163. {tests/api/product_fees → sp_api/asyncio/api/feeds}/__init__.py +0 -0
  164. {tests/api/reports → sp_api/asyncio/api/finances}/__init__.py +0 -0
  165. {tests/api/sellers → sp_api/asyncio/api/fulfillment_inbound}/__init__.py +0 -0
  166. {tests/client → sp_api/asyncio/api/fulfillment_outbound}/__init__.py +0 -0
  167. /tests/api/sellers/test_sellers.py → /sp_api/asyncio/api/inventories/__init__.py +0 -0
@@ -0,0 +1,110 @@
1
+ from sp_api.base import Client, sp_endpoint, ApiResponse, fill_query_params
2
+
3
+
4
+ class CustomerFeedback(Client):
5
+ """
6
+ The Selling Partner API for CustomerFeedback - 2024-06-01
7
+
8
+ The Selling Partner API for Customer Feedback (Customer Feedback API) provides information about customer reviews and returns at both the item and browse node level.
9
+ """
10
+
11
+ @sp_endpoint(
12
+ "/customerFeedback/2024-06-01/items/{}/reviews/topics", method="GET"
13
+ )
14
+ def get_item_review_topics(
15
+ self, asin, *args, **kwargs
16
+ ) -> ApiResponse:
17
+ """
18
+ Retrieve an item's ten most positive and ten most negative review topics.
19
+ """
20
+
21
+ return self._request(
22
+ fill_query_params(kwargs.pop('path'), asin), params=kwargs
23
+ )
24
+
25
+ @sp_endpoint("/customerFeedback/2024-06-01/items/{}/browseNode", method="GET")
26
+ def get_item_browse_node(self, asin, *args, **kwargs) -> ApiResponse:
27
+ """
28
+ This API returns the associated browse node of the requested ASIN. A browse node is a location in a browse tree that is used for navigation, product classification, and website content on the Amazon retail website.
29
+ """
30
+
31
+ return self._request(
32
+ fill_query_params(kwargs.pop('path'), asin), params=kwargs
33
+ )
34
+
35
+
36
+ @sp_endpoint(
37
+ "/customerFeedback/2024-06-01/browseNodes/{}/reviews/topics",
38
+ method="GET",
39
+ )
40
+ def get_browse_node_review_topics(
41
+ self, browseNodeId, *args, **kwargs
42
+ ) -> ApiResponse:
43
+ """
44
+ Retrieve a browse node's ten most positive and ten most negative review topics.
45
+ """
46
+
47
+ return self._request(
48
+ fill_query_params(kwargs.pop('path'), browseNodeId), params=kwargs
49
+ )
50
+
51
+
52
+ @sp_endpoint(
53
+ "/customerFeedback/2024-06-01/items/{}/reviews/trends", method="GET"
54
+ )
55
+ def get_item_review_trends(
56
+ self, asin, *args, **kwargs
57
+ ) -> ApiResponse:
58
+ """
59
+ Retrieve an item's positive and negative review trends for the past six months.
60
+ """
61
+
62
+ return self._request(
63
+ fill_query_params(kwargs.pop('path'), asin), params=kwargs
64
+ )
65
+
66
+
67
+ @sp_endpoint(
68
+ "/customerFeedback/2024-06-01/browseNodes/{}/reviews/trends",
69
+ method="GET",
70
+ )
71
+ def get_browse_node_review_trends(
72
+ self, browseNodeId, *args, **kwargs
73
+ ) -> ApiResponse:
74
+ """
75
+ Retrieve the positive and negative review trends of items in a browse node for the past six months.
76
+ """
77
+
78
+ return self._request(
79
+ fill_query_params(kwargs.pop('path'), browseNodeId), params=kwargs
80
+ )
81
+
82
+ @sp_endpoint(
83
+ "/customerFeedback/2024-06-01/browseNodes/{}/returns/topics",
84
+ method="GET",
85
+ )
86
+ def get_browse_node_return_topics(
87
+ self, browseNodeId, *args, **kwargs
88
+ ) -> ApiResponse:
89
+ """
90
+ Retrieve the topics that customers mention when they return items in a browse node.
91
+ """
92
+
93
+ return self._request(
94
+ fill_query_params(kwargs.pop('path'), browseNodeId), params=kwargs
95
+ )
96
+
97
+ @sp_endpoint(
98
+ "/customerFeedback/2024-06-01/browseNodes/{}/returns/trends",
99
+ method="GET",
100
+ )
101
+ def get_browse_node_return_trends(
102
+ self, browseNodeId, *args, **kwargs
103
+ ) -> ApiResponse:
104
+ """
105
+ Retrieve the trends of topics that customers mention when they return items in a browse node.
106
+ """
107
+
108
+ return self._request(
109
+ fill_query_params(kwargs.pop('path'), browseNodeId), params=kwargs
110
+ )
@@ -1,3 +1,4 @@
1
+ import httpx
1
2
  import urllib.parse
2
3
  from io import BytesIO, StringIO
3
4
  from typing import Union, BinaryIO, TextIO
@@ -190,14 +191,12 @@ class DataKiosk(Client):
190
191
  add_marketplace=False,
191
192
  )
192
193
  if download or file or ("decrypt" in kwargs and kwargs["decrypt"]):
193
- import requests
194
-
195
- document_response = requests.get(
196
- res.payload.get("documentUrl"),
194
+ with httpx.Client(
197
195
  proxies=self.proxies,
198
196
  verify=self.verify,
199
- )
200
- document = document_response.content
197
+ ) as client:
198
+ document_response = client.get(res.payload.get("documentUrl"))
199
+ document = document_response.content
201
200
  if download:
202
201
  res.payload.update(
203
202
  {
@@ -0,0 +1,190 @@
1
+ import urllib.parse
2
+
3
+ from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
4
+
5
+
6
+ class EasyShip(Client):
7
+ """
8
+ Easy_ SP-API Client
9
+ :link:
10
+
11
+ Use the Selling Partner API for Easy Ship to build applications for sellers to manage and ship Amazon Easy Ship orders. With this API, you can get available time slots, schedule and reschedule Easy Ship orders, and print shipping labels, invoices, and warranties. To review the differences in Easy Ship operations by marketplace, refer to [Marketplace support](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support).
12
+ """
13
+
14
+
15
+ @sp_endpoint('/easyShip/2022-03-23/timeSlot', method='POST')
16
+ def list_handover_slots(self, **kwargs) -> ApiResponse:
17
+ """
18
+ list_handover_slots(self, **kwargs) -> ApiResponse
19
+
20
+ Returns time slots available for Easy Ship orders to be scheduled based on the package weight and dimensions that the seller specifies.
21
+
22
+ This operation is available for scheduled and unscheduled orders based on marketplace support. See **Get Time Slots** in the [Marketplace Support Table](doc:easyship-api-v2022-03-23-use-case-guide#marketplace-support-table).
23
+
24
+ This operation can return time slots that have either pickup or drop-off handover methods - see **Supported Handover Methods** in the [Marketplace Support Table](doc:easyship-api-v2022-03-23-use-case-guide#marketplace-support-table).
25
+
26
+ **Usage Plan:**
27
+
28
+ | Rate (requests per second) | Burst |
29
+ | ---- | ---- |
30
+ | 1 | 5 |
31
+
32
+ The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
33
+
34
+ Args:
35
+
36
+ ListHandoverSlotsRequest: | {'description': 'The request schema for the `listHandoverSlots` operation.',
37
+ 'properties': {'amazonOrderId': {'$ref': '#/definitions/AmazonOrderId'}, 'marketplaceId': {'$ref': '#/definitions/String'}, 'packageDimensions': {'$ref': '#/definitions/Dimensions'}, 'packageWeight': {'$ref': '#/definitions/Weight'}},
38
+ 'required': ['marketplaceId', 'amazonOrderId', 'packageDimensions', 'packageWeight'],
39
+ 'type': 'object'}
40
+
41
+
42
+ Returns:
43
+ ApiResponse:
44
+ """
45
+
46
+ return self._request(kwargs.pop('path'), data=kwargs)
47
+
48
+
49
+ @sp_endpoint('/easyShip/2022-03-23/package', method='GET')
50
+ def get_scheduled_package(self, **kwargs) -> ApiResponse:
51
+ """
52
+ get_scheduled_package(self, **kwargs) -> ApiResponse
53
+
54
+ Returns information about a package, including dimensions, weight, time slot information for handover, invoice and item information, and status.
55
+
56
+ **Usage Plan:**
57
+
58
+ | Rate (requests per second) | Burst |
59
+ | ---- | ---- |
60
+ | 1 | 5 |
61
+
62
+ The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
63
+
64
+ Args:
65
+
66
+ key amazonOrderId:string | * REQUIRED An Amazon-defined order identifier. Identifies the order that the seller wants to deliver using Amazon Easy Ship.
67
+
68
+ key marketplaceId:string | * REQUIRED An identifier for the marketplace in which the seller is selling.
69
+
70
+
71
+ Returns:
72
+ ApiResponse:
73
+ """
74
+
75
+ return self._request(kwargs.pop('path'), params=kwargs)
76
+
77
+
78
+ @sp_endpoint('/easyShip/2022-03-23/package', method='POST')
79
+ def create_scheduled_package(self, **kwargs) -> ApiResponse:
80
+ """
81
+ create_scheduled_package(self, **kwargs) -> ApiResponse
82
+
83
+ Schedules an Easy Ship order and returns the scheduled package information.
84
+
85
+ This operation does the following:
86
+
87
+ * Specifies the time slot and handover method for the order to be scheduled for delivery.
88
+
89
+ * Updates the Easy Ship order status.
90
+
91
+ * Generates a shipping label and an invoice. Calling `createScheduledPackage` also generates a warranty document if you specify a `SerialNumber` value. To get these documents, see [How to get invoice, shipping label, and warranty documents](doc:easyship-api-v2022-03-23-use-case-guide).
92
+
93
+ * Shows the status of Easy Ship orders when you call the `getOrders` operation of the Selling Partner API for Orders and examine the `EasyShipShipmentStatus` property in the response body.
94
+
95
+ See the **Shipping Label**, **Invoice**, and **Warranty** columns in the [Marketplace Support Table](doc:easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which documents are supported in each marketplace.
96
+
97
+ **Usage Plan:**
98
+
99
+ | Rate (requests per second) | Burst |
100
+ | ---- | ---- |
101
+ | 1 | 5 |
102
+
103
+ The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
104
+
105
+ Args:
106
+
107
+ CreateScheduledPackageRequest: | * REQUIRED {'description': 'The request schema for the `createScheduledPackage` operation.',
108
+ 'properties': {'amazonOrderId': {'$ref': '#/definitions/AmazonOrderId'}, 'marketplaceId': {'$ref': '#/definitions/String'}, 'packageDetails': {'$ref': '#/definitions/PackageDetails'}},
109
+ 'required': ['amazonOrderId', 'marketplaceId', 'packageDetails'],
110
+ 'type': 'object'}
111
+
112
+
113
+ Returns:
114
+ ApiResponse:
115
+ """
116
+
117
+ return self._request(kwargs.pop('path'), data=kwargs)
118
+
119
+
120
+ @sp_endpoint('/easyShip/2022-03-23/package', method='PATCH')
121
+ def update_scheduled_packages(self, **kwargs) -> ApiResponse:
122
+ """
123
+ update_scheduled_packages(self, **kwargs) -> ApiResponse
124
+
125
+ Updates the time slot for handing over the package indicated by the specified `scheduledPackageId`. You can get the new `slotId` value for the time slot by calling the `listHandoverSlots` operation before making another `patch` call.
126
+
127
+ See the **Update Package** column in the [Marketplace Support Table](doc:easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which marketplaces this operation is supported in.
128
+
129
+ **Usage Plan:**
130
+
131
+ | Rate (requests per second) | Burst |
132
+ | ---- | ---- |
133
+ | 1 | 5 |
134
+
135
+ The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
136
+
137
+ Args:
138
+
139
+ UpdateScheduledPackagesRequest: | {'description': 'The request schema for the `updateScheduledPackages` operation.',
140
+ 'properties': {'marketplaceId': {'$ref': '#/definitions/String'}, 'updatePackageDetailsList': {'$ref': '#/definitions/UpdatePackageDetailsList'}},
141
+ 'required': ['marketplaceId', 'updatePackageDetailsList'],
142
+ 'type': 'object'}
143
+
144
+
145
+ Returns:
146
+ ApiResponse:
147
+ """
148
+
149
+ return self._request(kwargs.pop('path'), data=kwargs)
150
+
151
+
152
+ @sp_endpoint('/easyShip/2022-03-23/packages/bulk', method='POST')
153
+ def create_scheduled_package_bulk(self, **kwargs) -> ApiResponse:
154
+ """
155
+ create_scheduled_package_bulk(self, **kwargs) -> ApiResponse
156
+
157
+ This operation automatically schedules a time slot for all the `amazonOrderId`s given as input, generating the associated shipping labels, along with other compliance documents according to the marketplace (refer to the [marketplace document support table](doc:easyship-api-v2022-03-23-use-case-guide#marketplace-support-table)).
158
+
159
+ Developers calling this operation may optionally assign a `packageDetails` object, allowing them to input a preferred time slot for each order in their request. In this case, Amazon will try to schedule the respective packages using their optional settings. On the other hand, *i.e.*, if the time slot is not provided, Amazon will then pick the earliest time slot possible.
160
+
161
+ Regarding the shipping label's file format, external developers are able to choose between PDF or ZPL, and Amazon will create the label accordingly.
162
+
163
+ This operation returns an array composed of the scheduled packages, and a short-lived URL pointing to a zip file containing the generated shipping labels and the other documents enabled for your marketplace. If at least an order couldn't be scheduled, then Amazon adds the `rejectedOrders` list into the response, which contains an entry for each order we couldn't process. Each entry is composed of an error message describing the reason of the failure, so that sellers can take action.
164
+
165
+ The table below displays the supported request and burst maximum rates:
166
+
167
+ **Usage Plan:**
168
+
169
+ | Rate (requests per second) | Burst |
170
+ | ---- | ---- |
171
+ | 1 | 5 |
172
+
173
+ The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
174
+
175
+ Args:
176
+
177
+ CreateScheduledPackagesRequest: | * REQUIRED {'description': 'The request body for the POST /easyShip/2022-03-23/packages/bulk API.',
178
+ 'properties': {'labelFormat': {'$ref': '#/definitions/LabelFormat'},
179
+ 'marketplaceId': {'$ref': '#/definitions/String'},
180
+ 'orderScheduleDetailsList': {'description': 'An array allowing users to specify orders to be scheduled.', 'items': {'$ref': '#/definitions/OrderScheduleDetails'}, 'minItems': 1, 'type': 'array'}},
181
+ 'required': ['marketplaceId', 'orderScheduleDetailsList', 'labelFormat'],
182
+ 'type': 'object'}
183
+
184
+
185
+ Returns:
186
+ ApiResponse:
187
+ """
188
+
189
+ return self._request(kwargs.pop('path'), data=kwargs)
190
+