python-amazon-sp-api 1.9.60__py3-none-any.whl → 2.0.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.
- {python_amazon_sp_api-1.9.60.dist-info → python_amazon_sp_api-2.0.3.dist-info}/METADATA +41 -14
- python_amazon_sp_api-2.0.3.dist-info/RECORD +249 -0
- sp_api/__version__.py +1 -1
- sp_api/api/catalog/catalog.py +3 -4
- sp_api/api/catalog_items/catalog_items.py +3 -6
- sp_api/api/data_kiosk/data_kiosk.py +5 -6
- sp_api/api/feeds/feeds.py +11 -8
- sp_api/api/fulfillment_inbound/fulfillment_inbound.py +2 -2
- sp_api/api/inventories/inventories.py +2 -7
- sp_api/api/listings_items/listings_items.py +3 -24
- sp_api/api/products/products.py +3 -1
- sp_api/api/reports/reports.py +61 -97
- sp_api/api/sales/sales.py +2 -2
- sp_api/asyncio/__init__.py +0 -0
- sp_api/asyncio/api/__init__.py +164 -0
- sp_api/asyncio/api/amazon_warehousing_and_distribu/__init__.py +9 -0
- sp_api/asyncio/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +130 -0
- sp_api/asyncio/api/aplus_content/__init__.py +5 -0
- sp_api/asyncio/api/aplus_content/aplus_content.py +330 -0
- sp_api/asyncio/api/application_integrations/__init__.py +5 -0
- sp_api/asyncio/api/application_integrations/application_integrations.py +119 -0
- sp_api/asyncio/api/application_management/__init__.py +5 -0
- sp_api/asyncio/api/application_management/application_management.py +36 -0
- sp_api/asyncio/api/authorization/__init__.py +5 -0
- sp_api/asyncio/api/authorization/authorization.py +54 -0
- sp_api/asyncio/api/catalog/__init__.py +5 -0
- sp_api/asyncio/api/catalog/catalog.py +111 -0
- sp_api/asyncio/api/catalog_items/__init__.py +6 -0
- sp_api/asyncio/api/catalog_items/catalog_items.py +93 -0
- sp_api/asyncio/api/clients/__init__.py +1 -0
- sp_api/asyncio/api/customer_feedback/__init__.py +5 -0
- sp_api/asyncio/api/customer_feedback/customer_feedback.py +111 -0
- sp_api/asyncio/api/data_kiosk/__init__.py +5 -0
- sp_api/asyncio/api/data_kiosk/data_kiosk.py +236 -0
- sp_api/asyncio/api/easy_ship/__init__.py +5 -0
- sp_api/asyncio/api/easy_ship/easy_ship.py +191 -0
- sp_api/asyncio/api/external_fulfillment/__init__.py +5 -0
- sp_api/asyncio/api/external_fulfillment/external_fulfillment.py +706 -0
- sp_api/asyncio/api/fba_inbound_eligibility/__init__.py +5 -0
- sp_api/asyncio/api/fba_inbound_eligibility/fba_inbound_eligibility.py +96 -0
- sp_api/asyncio/api/fba_small_and_light/__init__.py +5 -0
- sp_api/asyncio/api/fba_small_and_light/fba_small_and_light.py +213 -0
- sp_api/asyncio/api/feeds/__init__.py +0 -0
- sp_api/asyncio/api/feeds/feeds.py +260 -0
- sp_api/asyncio/api/finances/__init__.py +0 -0
- sp_api/asyncio/api/finances/finances.py +100 -0
- sp_api/asyncio/api/fulfillment_inbound/__init__.py +0 -0
- sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound.py +1798 -0
- sp_api/asyncio/api/fulfillment_outbound/__init__.py +0 -0
- sp_api/asyncio/api/fulfillment_outbound/fulfillment_outbound.py +736 -0
- sp_api/asyncio/api/inventories/__init__.py +0 -0
- sp_api/asyncio/api/inventories/inventories.py +74 -0
- sp_api/asyncio/api/listings_items/__init__.py +0 -0
- sp_api/asyncio/api/listings_items/listings_items.py +170 -0
- sp_api/asyncio/api/listings_restrictions/__init__.py +0 -0
- sp_api/asyncio/api/listings_restrictions/listings_restrictions.py +36 -0
- sp_api/asyncio/api/merchant_fulfillment/__init__.py +0 -0
- sp_api/asyncio/api/merchant_fulfillment/merchant_fulfillment.py +384 -0
- sp_api/asyncio/api/messaging/__init__.py +0 -0
- sp_api/asyncio/api/messaging/messaging.py +511 -0
- sp_api/asyncio/api/models/__init__.py +4 -0
- sp_api/asyncio/api/notifications/__init__.py +0 -0
- sp_api/asyncio/api/notifications/notifications.py +295 -0
- sp_api/asyncio/api/orders/__init__.py +0 -0
- sp_api/asyncio/api/orders/orders.py +356 -0
- sp_api/asyncio/api/overrides/__init__.py +1 -0
- sp_api/asyncio/api/product_fees/__init__.py +0 -0
- sp_api/asyncio/api/product_fees/product_fees.py +237 -0
- sp_api/asyncio/api/product_type_definitions/__init__.py +0 -0
- sp_api/asyncio/api/product_type_definitions/product_type_definitions.py +75 -0
- sp_api/asyncio/api/products/__init__.py +0 -0
- sp_api/asyncio/api/products/products.py +405 -0
- sp_api/asyncio/api/products/products_definitions.py +170 -0
- sp_api/asyncio/api/replenishment/__init__.py +0 -0
- sp_api/asyncio/api/replenishment/replenishment.py +121 -0
- sp_api/asyncio/api/reports/__init__.py +0 -0
- sp_api/asyncio/api/reports/reports.py +439 -0
- sp_api/asyncio/api/sales/__init__.py +0 -0
- sp_api/asyncio/api/sales/sales.py +93 -0
- sp_api/asyncio/api/sellers/__init__.py +0 -0
- sp_api/asyncio/api/sellers/sellers.py +70 -0
- sp_api/asyncio/api/services/__init__.py +0 -0
- sp_api/asyncio/api/services/services.py +218 -0
- sp_api/asyncio/api/shipping/__init__.py +0 -0
- sp_api/asyncio/api/shipping/shipping.py +459 -0
- sp_api/asyncio/api/shipping/shippingV2.py +651 -0
- sp_api/asyncio/api/solicitations/__init__.py +0 -0
- sp_api/asyncio/api/solicitations/solicitations.py +78 -0
- sp_api/asyncio/api/supply_sources/__init__.py +0 -0
- sp_api/asyncio/api/supply_sources/supply_sources.py +138 -0
- sp_api/asyncio/api/tokens/__init__.py +0 -0
- sp_api/asyncio/api/tokens/tokens.py +65 -0
- sp_api/asyncio/api/upload/__init__.py +0 -0
- sp_api/asyncio/api/upload/upload.py +18 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_inventory/__init__.py +0 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +64 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_orders/__init__.py +0 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +196 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_payments/__init__.py +0 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +254 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_shipping/__init__.py +0 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +627 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_transactions/__init__.py +0 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +43 -0
- sp_api/asyncio/api/vendor_invoices/__init__.py +0 -0
- sp_api/asyncio/api/vendor_invoices/vendor_invoices.py +295 -0
- sp_api/asyncio/api/vendor_orders/__init__.py +0 -0
- sp_api/asyncio/api/vendor_orders/vendor_orders.py +210 -0
- sp_api/asyncio/api/vendor_shipments/__init__.py +0 -0
- sp_api/asyncio/api/vendor_shipments/vendor_shipments.py +118 -0
- sp_api/asyncio/api/vendor_transaction_status/__init__.py +0 -0
- sp_api/asyncio/api/vendor_transaction_status/vendor_transaction_status.py +41 -0
- sp_api/asyncio/auth/__init__.py +12 -0
- sp_api/asyncio/auth/access_token_client.py +145 -0
- sp_api/asyncio/auth/exceptions.py +5 -0
- sp_api/asyncio/base/__init__.py +53 -0
- sp_api/asyncio/base/_transport_httpx.py +50 -0
- sp_api/asyncio/base/base_client.py +8 -0
- sp_api/asyncio/base/client.py +169 -0
- sp_api/asyncio/util/__init__.py +29 -0
- sp_api/asyncio/util/key_maker.py +5 -0
- sp_api/asyncio/util/load_all_pages.py +55 -0
- sp_api/asyncio/util/load_date_bound.py +53 -0
- sp_api/asyncio/util/retry.py +88 -0
- sp_api/auth/_core.py +39 -0
- sp_api/auth/access_token_client.py +18 -30
- sp_api/base/_core.py +110 -0
- sp_api/base/_transport_httpx.py +39 -0
- sp_api/base/client.py +40 -63
- sp_api/util/__init__.py +16 -0
- sp_api/util/params.py +57 -0
- sp_api/util/report_document.py +154 -0
- python_amazon_sp_api-1.9.60.dist-info/RECORD +0 -133
- {python_amazon_sp_api-1.9.60.data → python_amazon_sp_api-2.0.3.data}/scripts/make_endpoint +0 -0
- {python_amazon_sp_api-1.9.60.dist-info → python_amazon_sp_api-2.0.3.dist-info}/WHEEL +0 -0
- {python_amazon_sp_api-1.9.60.dist-info → python_amazon_sp_api-2.0.3.dist-info}/licenses/LICENSE +0 -0
- {python_amazon_sp_api-1.9.60.dist-info → python_amazon_sp_api-2.0.3.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
import urllib.parse
|
|
2
|
+
|
|
3
|
+
from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
|
|
4
|
+
from sp_api.asyncio.base import AsyncBaseClient
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Shipping(AsyncBaseClient):
|
|
8
|
+
"""
|
|
9
|
+
Shipping SP-API Client
|
|
10
|
+
:link:
|
|
11
|
+
|
|
12
|
+
Provides programmatic access to Amazon Shipping APIs.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
@sp_endpoint("/shipping/v1/shipments", method="POST")
|
|
16
|
+
async def create_shipment(self, **kwargs) -> ApiResponse:
|
|
17
|
+
"""
|
|
18
|
+
create_shipment(self, **kwargs) -> ApiResponse
|
|
19
|
+
|
|
20
|
+
Create a new shipment.
|
|
21
|
+
|
|
22
|
+
**Usage Plan:**
|
|
23
|
+
|
|
24
|
+
====================================== ==============
|
|
25
|
+
Rate (requests per second) Burst
|
|
26
|
+
====================================== ==============
|
|
27
|
+
5 15
|
|
28
|
+
====================================== ==============
|
|
29
|
+
|
|
30
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
31
|
+
|
|
32
|
+
Args:
|
|
33
|
+
body: {
|
|
34
|
+
"clientReferenceId": "string",
|
|
35
|
+
"shipTo": {
|
|
36
|
+
"name": "string",
|
|
37
|
+
"addressLine1": "string",
|
|
38
|
+
"addressLine2": "string",
|
|
39
|
+
"addressLine3": "string",
|
|
40
|
+
"stateOrRegion": "string",
|
|
41
|
+
"city": "string",
|
|
42
|
+
"countryCode": "st",
|
|
43
|
+
"postalCode": "string",
|
|
44
|
+
"email": "string",
|
|
45
|
+
"copyEmails": [
|
|
46
|
+
"string"
|
|
47
|
+
],
|
|
48
|
+
"phoneNumber": "string"
|
|
49
|
+
},
|
|
50
|
+
"shipFrom": {
|
|
51
|
+
"name": "string",
|
|
52
|
+
"addressLine1": "string",
|
|
53
|
+
"addressLine2": "string",
|
|
54
|
+
"addressLine3": "string",
|
|
55
|
+
"stateOrRegion": "string",
|
|
56
|
+
"city": "string",
|
|
57
|
+
"countryCode": "st",
|
|
58
|
+
"postalCode": "string",
|
|
59
|
+
"email": "string",
|
|
60
|
+
"copyEmails": [
|
|
61
|
+
"string"
|
|
62
|
+
],
|
|
63
|
+
"phoneNumber": "string"
|
|
64
|
+
},
|
|
65
|
+
"containers": [
|
|
66
|
+
{
|
|
67
|
+
"containerType": "PACKAGE",
|
|
68
|
+
"containerReferenceId": "string",
|
|
69
|
+
"value": {
|
|
70
|
+
"value": 0,
|
|
71
|
+
"unit": "str"
|
|
72
|
+
},
|
|
73
|
+
"dimensions": {
|
|
74
|
+
"length": 0,
|
|
75
|
+
"width": 0,
|
|
76
|
+
"height": 0,
|
|
77
|
+
"unit": "IN"
|
|
78
|
+
},
|
|
79
|
+
"items": [
|
|
80
|
+
{
|
|
81
|
+
"quantity": 0,
|
|
82
|
+
"unitPrice": {
|
|
83
|
+
"value": 0,
|
|
84
|
+
"unit": "str"
|
|
85
|
+
},
|
|
86
|
+
"unitWeight": {
|
|
87
|
+
"unit": "g",
|
|
88
|
+
"value": 0
|
|
89
|
+
},
|
|
90
|
+
"title": "string"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"weight": {
|
|
94
|
+
"unit": "g",
|
|
95
|
+
"value": 0
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
ApiResponse:
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
return await self._request(kwargs.pop("path"), data=kwargs)
|
|
106
|
+
|
|
107
|
+
@sp_endpoint("/shipping/v1/shipments/{}", method="GET")
|
|
108
|
+
async def get_shipment(self, shipmentId, **kwargs) -> ApiResponse:
|
|
109
|
+
"""
|
|
110
|
+
get_shipment(self, shipmentId, **kwargs) -> ApiResponse
|
|
111
|
+
|
|
112
|
+
Return the entire shipment object for the shipmentId.
|
|
113
|
+
|
|
114
|
+
**Usage Plan:**
|
|
115
|
+
|
|
116
|
+
====================================== ==============
|
|
117
|
+
Rate (requests per second) Burst
|
|
118
|
+
====================================== ==============
|
|
119
|
+
5 15
|
|
120
|
+
====================================== ==============
|
|
121
|
+
|
|
122
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
123
|
+
|
|
124
|
+
Args:
|
|
125
|
+
shipmentId:string | * REQUIRED
|
|
126
|
+
|
|
127
|
+
Returns:
|
|
128
|
+
ApiResponse:
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
return await self._request(
|
|
132
|
+
fill_query_params(kwargs.pop("path"), shipmentId), params=kwargs
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
@sp_endpoint("/shipping/v1/shipments/{}/cancel", method="POST")
|
|
136
|
+
async def cancel_shipment(self, shipmentId, **kwargs) -> ApiResponse:
|
|
137
|
+
"""
|
|
138
|
+
cancel_shipment(self, shipmentId, **kwargs) -> ApiResponse
|
|
139
|
+
|
|
140
|
+
Cancel a shipment by the given shipmentId.
|
|
141
|
+
|
|
142
|
+
**Usage Plan:**
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
====================================== ==============
|
|
146
|
+
Rate (requests per second) Burst
|
|
147
|
+
====================================== ==============
|
|
148
|
+
5 15
|
|
149
|
+
====================================== ==============
|
|
150
|
+
|
|
151
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
152
|
+
|
|
153
|
+
Args:
|
|
154
|
+
shipmentId:string | * REQUIRED
|
|
155
|
+
|
|
156
|
+
Returns:
|
|
157
|
+
ApiResponse:
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
return await self._request(
|
|
161
|
+
fill_query_params(kwargs.pop("path"), shipmentId), data=kwargs
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
@sp_endpoint("/shipping/v1/shipments/{}/purchaseLabels", method="POST")
|
|
165
|
+
async def purchase_labels(self, shipmentId, **kwargs) -> ApiResponse:
|
|
166
|
+
"""
|
|
167
|
+
purchase_labels(self, shipmentId, **kwargs) -> ApiResponse
|
|
168
|
+
|
|
169
|
+
Purchase shipping labels based on a given rate.
|
|
170
|
+
|
|
171
|
+
**Usage Plan:**
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
====================================== ==============
|
|
175
|
+
Rate (requests per second) Burst
|
|
176
|
+
====================================== ==============
|
|
177
|
+
5 15
|
|
178
|
+
====================================== ==============
|
|
179
|
+
|
|
180
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
181
|
+
|
|
182
|
+
Args:
|
|
183
|
+
shipmentId:string | * REQUIRED
|
|
184
|
+
body: {
|
|
185
|
+
"rateId": "string",
|
|
186
|
+
"labelSpecification": {
|
|
187
|
+
"labelFormat": "PNG",
|
|
188
|
+
"labelStockSize": "4x6"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
Returns:
|
|
194
|
+
ApiResponse:
|
|
195
|
+
"""
|
|
196
|
+
|
|
197
|
+
return await self._request(
|
|
198
|
+
fill_query_params(kwargs.pop("path"), shipmentId), data=kwargs
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
@sp_endpoint("/shipping/v1/shipments/{}/label", method="POST")
|
|
202
|
+
async def retrieve_shipping_label(self, shipmentId, **kwargs) -> ApiResponse:
|
|
203
|
+
"""
|
|
204
|
+
retrieve_shipping_label(self, shipmentId, **kwargs) -> ApiResponse
|
|
205
|
+
|
|
206
|
+
Retrieve shipping label based on the shipment id and tracking id.
|
|
207
|
+
|
|
208
|
+
**Usage Plan:**
|
|
209
|
+
|
|
210
|
+
====================================== ==============
|
|
211
|
+
Rate (requests per second) Burst
|
|
212
|
+
====================================== ==============
|
|
213
|
+
5 15
|
|
214
|
+
====================================== ==============
|
|
215
|
+
|
|
216
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
217
|
+
|
|
218
|
+
Args:
|
|
219
|
+
shipmentId:string | * REQUIRED
|
|
220
|
+
trackingId:string | * REQUIRED
|
|
221
|
+
body: {
|
|
222
|
+
"labelSpecification": {
|
|
223
|
+
"labelFormat": "PNG",
|
|
224
|
+
"labelStockSize": "4x6"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
Returns:
|
|
229
|
+
ApiResponse:
|
|
230
|
+
"""
|
|
231
|
+
|
|
232
|
+
return await self._request(
|
|
233
|
+
fill_query_params(kwargs.pop("path"), shipmentId), data=kwargs
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
@sp_endpoint("/shipping/v1/purchaseShipment", method="POST")
|
|
237
|
+
async def purchase_shipment(self, **kwargs) -> ApiResponse:
|
|
238
|
+
"""
|
|
239
|
+
purchase_shipment(self, **kwargs) -> ApiResponse
|
|
240
|
+
|
|
241
|
+
Purchase shipping labels.
|
|
242
|
+
|
|
243
|
+
**Usage Plan:**
|
|
244
|
+
|
|
245
|
+
====================================== ==============
|
|
246
|
+
Rate (requests per second) Burst
|
|
247
|
+
====================================== ==============
|
|
248
|
+
5 15
|
|
249
|
+
====================================== ==============
|
|
250
|
+
|
|
251
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
252
|
+
|
|
253
|
+
Args:
|
|
254
|
+
body: {
|
|
255
|
+
"clientReferenceId": "string",
|
|
256
|
+
"shipTo": {
|
|
257
|
+
"name": "string",
|
|
258
|
+
"addressLine1": "string",
|
|
259
|
+
"addressLine2": "string",
|
|
260
|
+
"addressLine3": "string",
|
|
261
|
+
"stateOrRegion": "string",
|
|
262
|
+
"city": "string",
|
|
263
|
+
"countryCode": "st",
|
|
264
|
+
"postalCode": "string",
|
|
265
|
+
"email": "string",
|
|
266
|
+
"copyEmails": [
|
|
267
|
+
"string"
|
|
268
|
+
],
|
|
269
|
+
"phoneNumber": "string"
|
|
270
|
+
},
|
|
271
|
+
"shipFrom": {
|
|
272
|
+
"name": "string",
|
|
273
|
+
"addressLine1": "string",
|
|
274
|
+
"addressLine2": "string",
|
|
275
|
+
"addressLine3": "string",
|
|
276
|
+
"stateOrRegion": "string",
|
|
277
|
+
"city": "string",
|
|
278
|
+
"countryCode": "st",
|
|
279
|
+
"postalCode": "string",
|
|
280
|
+
"email": "string",
|
|
281
|
+
"copyEmails": [
|
|
282
|
+
"string"
|
|
283
|
+
],
|
|
284
|
+
"phoneNumber": "string"
|
|
285
|
+
},
|
|
286
|
+
"shipDate": "2019-08-24T14:15:22Z",
|
|
287
|
+
"serviceType": "Amazon Shipping Ground",
|
|
288
|
+
"containers": [
|
|
289
|
+
{
|
|
290
|
+
"containerType": "PACKAGE",
|
|
291
|
+
"containerReferenceId": "string",
|
|
292
|
+
"value": {
|
|
293
|
+
"value": 0,
|
|
294
|
+
"unit": "str"
|
|
295
|
+
},
|
|
296
|
+
"dimensions": {
|
|
297
|
+
"length": 0,
|
|
298
|
+
"width": 0,
|
|
299
|
+
"height": 0,
|
|
300
|
+
"unit": "IN"
|
|
301
|
+
},
|
|
302
|
+
"items": [
|
|
303
|
+
{
|
|
304
|
+
"quantity": 0,
|
|
305
|
+
"unitPrice": {
|
|
306
|
+
"value": 0,
|
|
307
|
+
"unit": "str"
|
|
308
|
+
},
|
|
309
|
+
"unitWeight": {
|
|
310
|
+
"unit": "g",
|
|
311
|
+
"value": 0
|
|
312
|
+
},
|
|
313
|
+
"title": "string"
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
"weight": {
|
|
317
|
+
"unit": "g",
|
|
318
|
+
"value": 0
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"labelSpecification": {
|
|
323
|
+
"labelFormat": "PNG",
|
|
324
|
+
"labelStockSize": "4x6"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
Returns:
|
|
329
|
+
ApiResponse:
|
|
330
|
+
"""
|
|
331
|
+
|
|
332
|
+
return await self._request(kwargs.pop("path"), data=kwargs)
|
|
333
|
+
|
|
334
|
+
@sp_endpoint("/shipping/v1/rates", method="POST")
|
|
335
|
+
async def get_rates(self, **kwargs) -> ApiResponse:
|
|
336
|
+
"""
|
|
337
|
+
get_rates(self, **kwargs) -> ApiResponse
|
|
338
|
+
|
|
339
|
+
Get service rates.
|
|
340
|
+
|
|
341
|
+
**Usage Plan:**
|
|
342
|
+
|
|
343
|
+
====================================== ==============
|
|
344
|
+
Rate (requests per second) Burst
|
|
345
|
+
====================================== ==============
|
|
346
|
+
5 15
|
|
347
|
+
====================================== ==============
|
|
348
|
+
|
|
349
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
350
|
+
|
|
351
|
+
Args:
|
|
352
|
+
body:{
|
|
353
|
+
"shipTo": {
|
|
354
|
+
"name": "string",
|
|
355
|
+
"addressLine1": "string",
|
|
356
|
+
"addressLine2": "string",
|
|
357
|
+
"addressLine3": "string",
|
|
358
|
+
"stateOrRegion": "string",
|
|
359
|
+
"city": "string",
|
|
360
|
+
"countryCode": "st",
|
|
361
|
+
"postalCode": "string",
|
|
362
|
+
"email": "string",
|
|
363
|
+
"copyEmails": [
|
|
364
|
+
"string"
|
|
365
|
+
],
|
|
366
|
+
"phoneNumber": "string"
|
|
367
|
+
},
|
|
368
|
+
"shipFrom": {
|
|
369
|
+
"name": "string",
|
|
370
|
+
"addressLine1": "string",
|
|
371
|
+
"addressLine2": "string",
|
|
372
|
+
"addressLine3": "string",
|
|
373
|
+
"stateOrRegion": "string",
|
|
374
|
+
"city": "string",
|
|
375
|
+
"countryCode": "st",
|
|
376
|
+
"postalCode": "string",
|
|
377
|
+
"email": "string",
|
|
378
|
+
"copyEmails": [
|
|
379
|
+
"string"
|
|
380
|
+
],
|
|
381
|
+
"phoneNumber": "string"
|
|
382
|
+
},
|
|
383
|
+
"serviceTypes": [
|
|
384
|
+
"Amazon Shipping Ground"
|
|
385
|
+
],
|
|
386
|
+
"shipDate": "2019-08-24T14:15:22Z",
|
|
387
|
+
"containerSpecifications": [
|
|
388
|
+
{
|
|
389
|
+
"dimensions": {
|
|
390
|
+
"length": 0,
|
|
391
|
+
"width": 0,
|
|
392
|
+
"height": 0,
|
|
393
|
+
"unit": "IN"
|
|
394
|
+
},
|
|
395
|
+
"weight": {
|
|
396
|
+
"unit": "g",
|
|
397
|
+
"value": 0
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
]
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
Returns:
|
|
404
|
+
ApiResponse:
|
|
405
|
+
"""
|
|
406
|
+
|
|
407
|
+
return await self._request(kwargs.pop("path"), data=kwargs)
|
|
408
|
+
|
|
409
|
+
@sp_endpoint("/shipping/v1/account", method="GET")
|
|
410
|
+
async def get_account(self, **kwargs) -> ApiResponse:
|
|
411
|
+
"""
|
|
412
|
+
get_account(self, **kwargs) -> ApiResponse
|
|
413
|
+
|
|
414
|
+
Verify if the current account is valid.
|
|
415
|
+
|
|
416
|
+
**Usage Plan:**
|
|
417
|
+
|
|
418
|
+
====================================== ==============
|
|
419
|
+
Rate (requests per second) Burst
|
|
420
|
+
====================================== ==============
|
|
421
|
+
5 15
|
|
422
|
+
====================================== ==============
|
|
423
|
+
|
|
424
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
425
|
+
|
|
426
|
+
Returns:
|
|
427
|
+
ApiResponse:
|
|
428
|
+
"""
|
|
429
|
+
|
|
430
|
+
return await self._request(kwargs.pop("path"), params=kwargs)
|
|
431
|
+
|
|
432
|
+
@sp_endpoint("/shipping/v1/tracking/{}", method="GET")
|
|
433
|
+
async def get_tracking_information(self, trackingId, **kwargs) -> ApiResponse:
|
|
434
|
+
"""
|
|
435
|
+
get_tracking_information(self, trackingId, **kwargs) -> ApiResponse
|
|
436
|
+
|
|
437
|
+
Return the tracking information of a shipment.
|
|
438
|
+
|
|
439
|
+
**Usage Plan:**
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
====================================== ==============
|
|
443
|
+
Rate (requests per second) Burst
|
|
444
|
+
====================================== ==============
|
|
445
|
+
1 1
|
|
446
|
+
====================================== ==============
|
|
447
|
+
|
|
448
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
449
|
+
|
|
450
|
+
Args:
|
|
451
|
+
trackingId:string | * REQUIRED
|
|
452
|
+
|
|
453
|
+
Returns:
|
|
454
|
+
ApiResponse:
|
|
455
|
+
"""
|
|
456
|
+
|
|
457
|
+
return await self._request(
|
|
458
|
+
fill_query_params(kwargs.pop("path"), trackingId), params=kwargs
|
|
459
|
+
)
|