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.
- {python_amazon_sp_api-2.0.15.dist-info → python_amazon_sp_api-2.1.3.dist-info}/METADATA +7 -7
- python_amazon_sp_api-2.1.3.dist-info/RECORD +350 -0
- sp_api/__version__.py +1 -1
- sp_api/api/__init__.py +160 -4
- sp_api/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +85 -110
- sp_api/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu_2024_05_09.py +456 -0
- sp_api/api/aplus_content/aplus_content.py +176 -125
- sp_api/api/application_integrations/application_integrations.py +59 -68
- sp_api/api/application_management/application_management.py +20 -13
- sp_api/api/authorization/authorization.py +8 -26
- sp_api/api/catalog/catalog.py +27 -61
- sp_api/api/catalog_items/catalog_items.py +108 -78
- sp_api/api/catalog_items/catalog_items_2020_12_01.py +86 -0
- sp_api/api/catalog_items/catalog_items_2022_04_01.py +89 -0
- sp_api/api/customer_feedback/customer_feedback.py +100 -0
- sp_api/api/data_kiosk/data_kiosk.py +80 -75
- sp_api/api/delivery_by_amazon/__init__.py +0 -0
- sp_api/api/delivery_by_amazon/delivery_by_amazon.py +92 -0
- sp_api/api/delivery_by_amazon/delivery_by_amazon_2022_07_01.py +81 -0
- sp_api/api/easy_ship/easy_ship.py +121 -111
- sp_api/api/external_fulfillment/external_fulfillment.py +211 -434
- sp_api/api/external_fulfillment/inventory.py +120 -0
- sp_api/api/external_fulfillment/inventory_2021_01_06.py +71 -0
- sp_api/api/external_fulfillment/inventory_2024_09_11.py +96 -0
- sp_api/api/external_fulfillment/returns.py +120 -0
- sp_api/api/external_fulfillment/returns_2021_08_19.py +88 -0
- sp_api/api/external_fulfillment/returns_2024_09_11.py +141 -0
- sp_api/api/external_fulfillment/shipping.py +120 -0
- sp_api/api/external_fulfillment/shipping_2021_01_06.py +256 -0
- sp_api/api/external_fulfillment/shipping_2024_09_11.py +233 -0
- sp_api/api/fba_inbound_eligibility/fba_inbound_eligibility.py +30 -24
- sp_api/api/fba_small_and_light/fba_small_and_light.py +60 -99
- sp_api/api/feeds/feeds.py +75 -245
- sp_api/api/feeds/feeds_2021_06_30.py +320 -0
- sp_api/api/finances/finances.py +123 -90
- sp_api/api/finances/finances_2024_06_01.py +71 -0
- sp_api/api/finances/finances_2024_06_19.py +114 -0
- sp_api/api/finances/finances_v0.py +116 -0
- sp_api/api/fulfillment_inbound/fulfillment_inbound.py +107 -1784
- sp_api/api/fulfillment_inbound/fulfillment_inbound_2024_03_20.py +1722 -0
- sp_api/api/fulfillment_inbound/fulfillment_inbound_v0.py +1384 -0
- sp_api/api/fulfillment_outbound/fulfillment_outbound.py +256 -480
- sp_api/api/inventories/inventories.py +79 -42
- sp_api/api/invoices/__init__.py +0 -0
- sp_api/api/invoices/invoices.py +92 -0
- sp_api/api/invoices/invoices_2024_06_19.py +344 -0
- sp_api/api/listings_items/listings_items.py +110 -163
- sp_api/api/listings_items/listings_items_2020_09_01.py +189 -0
- sp_api/api/listings_items/listings_items_2021_08_01.py +233 -0
- sp_api/api/listings_restrictions/listings_restrictions.py +23 -10
- sp_api/api/merchant_fulfillment/merchant_fulfillment.py +107 -222
- sp_api/api/messaging/messaging.py +184 -198
- sp_api/api/notifications/notifications.py +144 -106
- sp_api/api/orders/orders.py +9 -46
- sp_api/api/orders/orders_2026_01_01.py +19 -65
- sp_api/api/orders/orders_v0.py +152 -184
- sp_api/api/product_fees/product_fees.py +101 -75
- sp_api/api/product_type_definitions/product_type_definitions.py +47 -36
- sp_api/api/products/products.py +94 -386
- sp_api/api/products/products_2022_05_01.py +96 -0
- sp_api/api/products/products_v0.py +389 -0
- sp_api/api/replenishment/replenishment.py +58 -69
- sp_api/api/reports/reports.py +124 -157
- sp_api/api/sales/sales.py +22 -39
- sp_api/api/seller_wallet/__init__.py +0 -0
- sp_api/api/seller_wallet/seller_wallet.py +92 -0
- sp_api/api/seller_wallet/seller_wallet_2024_03_01.py +300 -0
- sp_api/api/sellers/sellers.py +15 -35
- sp_api/api/services/services.py +479 -82
- sp_api/api/shipment_invoicing/__init__.py +0 -0
- sp_api/api/shipment_invoicing/shipment_invoicing.py +92 -0
- sp_api/api/shipment_invoicing/shipment_invoicing_v0.py +101 -0
- sp_api/api/shipping/shipping.py +94 -440
- sp_api/api/shipping/shippingV2.py +183 -474
- sp_api/api/shipping/shipping_v1.py +330 -0
- sp_api/api/shipping/shipping_v2.py +723 -0
- sp_api/api/solicitations/solicitations.py +28 -18
- sp_api/api/supply_sources/supply_sources.py +67 -57
- sp_api/api/tokens/tokens.py +14 -35
- sp_api/api/vehicles/__init__.py +0 -0
- sp_api/api/vehicles/vehicles.py +92 -0
- sp_api/api/vehicles/vehicles_2024_11_01.py +33 -0
- sp_api/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +16 -29
- sp_api/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +116 -189
- sp_api/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders_2021_12_28.py +114 -0
- sp_api/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders_v1.py +114 -0
- sp_api/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +15 -225
- sp_api/api/vendor_direct_fulfillment_sandbox_test_data/__init__.py +0 -0
- sp_api/api/vendor_direct_fulfillment_sandbox_test_data/vendor_direct_fulfillment_sandbox_test_data.py +92 -0
- sp_api/api/vendor_direct_fulfillment_sandbox_test_data/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.py +50 -0
- sp_api/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +122 -624
- sp_api/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping_2021_12_28.py +390 -0
- sp_api/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping_v1.py +320 -0
- sp_api/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +113 -29
- sp_api/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions_2021_12_28.py +47 -0
- sp_api/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions_v1.py +47 -0
- sp_api/api/vendor_invoices/vendor_invoices.py +15 -264
- sp_api/api/vendor_orders/vendor_orders.py +83 -131
- sp_api/api/vendor_shipments/vendor_shipments.py +149 -68
- sp_api/api/vendor_transaction_status/vendor_transaction_status.py +16 -11
- sp_api/asyncio/api/__init__.py +159 -4
- sp_api/asyncio/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +84 -110
- sp_api/asyncio/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu_2024_05_09.py +457 -0
- sp_api/asyncio/api/aplus_content/aplus_content.py +176 -125
- sp_api/asyncio/api/application_integrations/application_integrations.py +59 -68
- sp_api/asyncio/api/application_management/application_management.py +20 -13
- sp_api/asyncio/api/authorization/authorization.py +8 -26
- sp_api/asyncio/api/catalog/catalog.py +27 -61
- sp_api/asyncio/api/catalog_items/catalog_items.py +94 -71
- sp_api/asyncio/api/catalog_items/catalog_items_2020_12_01.py +87 -0
- sp_api/asyncio/api/catalog_items/catalog_items_2022_04_01.py +90 -0
- sp_api/asyncio/api/customer_feedback/customer_feedback.py +100 -0
- sp_api/asyncio/api/data_kiosk/data_kiosk.py +80 -75
- sp_api/asyncio/api/delivery_by_amazon/__init__.py +0 -0
- sp_api/asyncio/api/delivery_by_amazon/delivery_by_amazon.py +92 -0
- sp_api/asyncio/api/delivery_by_amazon/delivery_by_amazon_2022_07_01.py +82 -0
- sp_api/asyncio/api/easy_ship/easy_ship.py +121 -111
- sp_api/asyncio/api/external_fulfillment/external_fulfillment.py +212 -435
- sp_api/asyncio/api/external_fulfillment/inventory.py +126 -0
- sp_api/asyncio/api/external_fulfillment/inventory_2021_01_06.py +73 -0
- sp_api/asyncio/api/external_fulfillment/inventory_2024_09_11.py +98 -0
- sp_api/asyncio/api/external_fulfillment/returns.py +124 -0
- sp_api/asyncio/api/external_fulfillment/returns_2021_08_19.py +90 -0
- sp_api/asyncio/api/external_fulfillment/returns_2024_09_11.py +143 -0
- sp_api/asyncio/api/external_fulfillment/shipping.py +124 -0
- sp_api/asyncio/api/external_fulfillment/shipping_2021_01_06.py +258 -0
- sp_api/asyncio/api/external_fulfillment/shipping_2024_09_11.py +235 -0
- sp_api/asyncio/api/fba_inbound_eligibility/fba_inbound_eligibility.py +31 -25
- sp_api/asyncio/api/fba_small_and_light/fba_small_and_light.py +61 -100
- sp_api/asyncio/api/feeds/feeds.py +75 -243
- sp_api/asyncio/api/feeds/feeds_2021_06_30.py +318 -0
- sp_api/asyncio/api/finances/finances.py +123 -91
- sp_api/asyncio/api/finances/finances_2024_06_01.py +72 -0
- sp_api/asyncio/api/finances/finances_2024_06_19.py +115 -0
- sp_api/asyncio/api/finances/finances_v0.py +117 -0
- sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound.py +107 -1785
- sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound_2024_03_20.py +1723 -0
- sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound_v0.py +1385 -0
- sp_api/asyncio/api/fulfillment_outbound/fulfillment_outbound.py +257 -481
- sp_api/asyncio/api/inventories/inventories.py +79 -42
- sp_api/asyncio/api/invoices/__init__.py +0 -0
- sp_api/asyncio/api/invoices/invoices.py +92 -0
- sp_api/asyncio/api/invoices/invoices_2024_06_19.py +345 -0
- sp_api/asyncio/api/listings_items/listings_items.py +109 -163
- sp_api/asyncio/api/listings_items/listings_items_2020_09_01.py +190 -0
- sp_api/asyncio/api/listings_items/listings_items_2021_08_01.py +233 -0
- sp_api/asyncio/api/listings_restrictions/listings_restrictions.py +23 -10
- sp_api/asyncio/api/merchant_fulfillment/merchant_fulfillment.py +110 -222
- sp_api/asyncio/api/messaging/messaging.py +185 -199
- sp_api/asyncio/api/notifications/notifications.py +145 -107
- sp_api/asyncio/api/orders/orders.py +9 -46
- sp_api/asyncio/api/orders/orders_2026_01_01.py +19 -65
- sp_api/asyncio/api/orders/orders_v0.py +152 -184
- sp_api/asyncio/api/product_fees/product_fees.py +101 -75
- sp_api/asyncio/api/product_type_definitions/product_type_definitions.py +47 -36
- sp_api/asyncio/api/products/products.py +94 -387
- sp_api/asyncio/api/products/products_2022_05_01.py +109 -0
- sp_api/asyncio/api/products/products_v0.py +388 -0
- sp_api/asyncio/api/replenishment/replenishment.py +59 -70
- sp_api/asyncio/api/reports/reports.py +124 -157
- sp_api/asyncio/api/sales/sales.py +22 -39
- sp_api/asyncio/api/seller_wallet/__init__.py +0 -0
- sp_api/asyncio/api/seller_wallet/seller_wallet.py +92 -0
- sp_api/asyncio/api/seller_wallet/seller_wallet_2024_03_01.py +301 -0
- sp_api/asyncio/api/sellers/sellers.py +16 -36
- sp_api/asyncio/api/services/services.py +479 -82
- sp_api/asyncio/api/shipment_invoicing/__init__.py +0 -0
- sp_api/asyncio/api/shipment_invoicing/shipment_invoicing.py +92 -0
- sp_api/asyncio/api/shipment_invoicing/shipment_invoicing_v0.py +102 -0
- sp_api/asyncio/api/shipping/shipping.py +94 -441
- sp_api/asyncio/api/shipping/shippingV2.py +181 -472
- sp_api/asyncio/api/shipping/shipping_v1.py +331 -0
- sp_api/asyncio/api/shipping/shipping_v2.py +717 -0
- sp_api/asyncio/api/solicitations/solicitations.py +29 -19
- sp_api/asyncio/api/supply_sources/supply_sources.py +67 -57
- sp_api/asyncio/api/tokens/tokens.py +14 -35
- sp_api/asyncio/api/vehicles/__init__.py +0 -0
- sp_api/asyncio/api/vehicles/vehicles.py +92 -0
- sp_api/asyncio/api/vehicles/vehicles_2024_11_01.py +34 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +16 -29
- sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +120 -192
- sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders_2021_12_28.py +116 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders_v1.py +115 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +15 -225
- sp_api/asyncio/api/vendor_direct_fulfillment_sandbox_test_data/__init__.py +0 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_sandbox_test_data/vendor_direct_fulfillment_sandbox_test_data.py +92 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_sandbox_test_data/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.py +51 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +120 -623
- sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping_2021_12_28.py +392 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping_v1.py +321 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +112 -29
- sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions_2021_12_28.py +49 -0
- sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions_v1.py +48 -0
- sp_api/asyncio/api/vendor_invoices/vendor_invoices.py +16 -265
- sp_api/asyncio/api/vendor_orders/vendor_orders.py +84 -132
- sp_api/asyncio/api/vendor_shipments/vendor_shipments.py +150 -69
- sp_api/asyncio/api/vendor_transaction_status/vendor_transaction_status.py +17 -12
- sp_api/asyncio/base/client.py +2 -2
- sp_api/asyncio/util/load_date_bound.py +1 -1
- sp_api/base/__init__.py +10 -0
- sp_api/base/_core.py +2 -2
- sp_api/base/client.py +3 -3
- sp_api/base/helpers.py +12 -1
- sp_api/base/marketplaces.py +6 -3
- sp_api/util/__init__.py +2 -0
- sp_api/util/load_date_bound.py +1 -1
- sp_api/util/versioned_client.py +45 -0
- python_amazon_sp_api-2.0.15.dist-info/RECORD +0 -255
- sp_api/asyncio/api/models/__init__.py +0 -4
- sp_api/asyncio/api/overrides/__init__.py +0 -1
- {python_amazon_sp_api-2.0.15.data → python_amazon_sp_api-2.1.3.data}/scripts/make_endpoint +0 -0
- {python_amazon_sp_api-2.0.15.dist-info → python_amazon_sp_api-2.1.3.dist-info}/WHEEL +0 -0
- {python_amazon_sp_api-2.0.15.dist-info → python_amazon_sp_api-2.1.3.dist-info}/licenses/LICENSE +0 -0
- {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,330 @@
|
|
|
1
|
+
import urllib.parse
|
|
2
|
+
|
|
3
|
+
from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ShippingV1(Client):
|
|
7
|
+
"""
|
|
8
|
+
Shipping SP-API Client
|
|
9
|
+
:link:
|
|
10
|
+
|
|
11
|
+
Provides programmatic access to Amazon Shipping APIs.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
@sp_endpoint("/shipping/v1/shipments", method="POST")
|
|
15
|
+
def create_shipment(self, **kwargs) -> ApiResponse:
|
|
16
|
+
"""
|
|
17
|
+
create_shipment(self, **kwargs) -> ApiResponse
|
|
18
|
+
|
|
19
|
+
Create a new shipment.
|
|
20
|
+
|
|
21
|
+
**Usage Plan:**
|
|
22
|
+
|
|
23
|
+
====================================== ==============
|
|
24
|
+
Rate (requests per second) Burst
|
|
25
|
+
====================================== ==============
|
|
26
|
+
5 15
|
|
27
|
+
====================================== ==============
|
|
28
|
+
|
|
29
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
30
|
+
|
|
31
|
+
Examples:
|
|
32
|
+
literal blocks::
|
|
33
|
+
|
|
34
|
+
ShippingV1().create_shipment()
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
body: CreateShipmentRequest | required CreateShipmentRequest Body
|
|
38
|
+
|
|
39
|
+
Returns:
|
|
40
|
+
ApiResponse
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
return self._request(kwargs.pop("path"), data=kwargs)
|
|
44
|
+
|
|
45
|
+
@sp_endpoint("/shipping/v1/shipments/{}", method="GET")
|
|
46
|
+
def get_shipment(self, shipmentId, **kwargs) -> ApiResponse:
|
|
47
|
+
"""
|
|
48
|
+
get_shipment(self, shipmentId, **kwargs) -> ApiResponse
|
|
49
|
+
|
|
50
|
+
Return the entire shipment object for the shipmentId.
|
|
51
|
+
|
|
52
|
+
**Usage Plan:**
|
|
53
|
+
|
|
54
|
+
====================================== ==============
|
|
55
|
+
Rate (requests per second) Burst
|
|
56
|
+
====================================== ==============
|
|
57
|
+
5 15
|
|
58
|
+
====================================== ==============
|
|
59
|
+
|
|
60
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
61
|
+
|
|
62
|
+
Examples:
|
|
63
|
+
literal blocks::
|
|
64
|
+
|
|
65
|
+
ShippingV1().get_shipment("value")
|
|
66
|
+
|
|
67
|
+
Args:
|
|
68
|
+
shipmentId: object | required Shipment id to return the entire shipment object
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
ApiResponse
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
return self._request(
|
|
75
|
+
fill_query_params(kwargs.pop("path"), shipmentId), params=kwargs
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
@sp_endpoint("/shipping/v1/shipments/{}/cancel", method="POST")
|
|
79
|
+
def cancel_shipment(self, shipmentId, **kwargs) -> ApiResponse:
|
|
80
|
+
"""
|
|
81
|
+
cancel_shipment(self, shipmentId, **kwargs) -> ApiResponse
|
|
82
|
+
|
|
83
|
+
Cancel a shipment by the given shipmentId.
|
|
84
|
+
|
|
85
|
+
**Usage Plan:**
|
|
86
|
+
|
|
87
|
+
====================================== ==============
|
|
88
|
+
Rate (requests per second) Burst
|
|
89
|
+
====================================== ==============
|
|
90
|
+
5 15
|
|
91
|
+
====================================== ==============
|
|
92
|
+
|
|
93
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
94
|
+
|
|
95
|
+
Examples:
|
|
96
|
+
literal blocks::
|
|
97
|
+
|
|
98
|
+
ShippingV1().cancel_shipment("value")
|
|
99
|
+
|
|
100
|
+
Args:
|
|
101
|
+
shipmentId: object | required Shipment Id to cancel a shipment
|
|
102
|
+
|
|
103
|
+
Returns:
|
|
104
|
+
ApiResponse
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
return self._request(
|
|
108
|
+
fill_query_params(kwargs.pop("path"), shipmentId), data=kwargs
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
@sp_endpoint("/shipping/v1/shipments/{}/purchaseLabels", method="POST")
|
|
112
|
+
def purchase_labels(self, shipmentId, **kwargs) -> ApiResponse:
|
|
113
|
+
"""
|
|
114
|
+
purchase_labels(self, shipmentId, **kwargs) -> ApiResponse
|
|
115
|
+
|
|
116
|
+
Purchase shipping labels based on a given rate.
|
|
117
|
+
|
|
118
|
+
**Usage Plan:**
|
|
119
|
+
|
|
120
|
+
====================================== ==============
|
|
121
|
+
Rate (requests per second) Burst
|
|
122
|
+
====================================== ==============
|
|
123
|
+
5 15
|
|
124
|
+
====================================== ==============
|
|
125
|
+
|
|
126
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
127
|
+
|
|
128
|
+
Examples:
|
|
129
|
+
literal blocks::
|
|
130
|
+
|
|
131
|
+
ShippingV1().purchase_labels("value")
|
|
132
|
+
|
|
133
|
+
Args:
|
|
134
|
+
shipmentId: object | required Shipment id for purchase shipping label
|
|
135
|
+
body: PurchaseLabelsRequest | required PurchaseShippingLabelRequest body
|
|
136
|
+
|
|
137
|
+
Returns:
|
|
138
|
+
ApiResponse
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
return self._request(
|
|
142
|
+
fill_query_params(kwargs.pop("path"), shipmentId), data=kwargs
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
@sp_endpoint("/shipping/v1/shipments/{}/label", method="POST")
|
|
146
|
+
def retrieve_shipping_label(self, shipmentId, **kwargs) -> ApiResponse:
|
|
147
|
+
"""
|
|
148
|
+
retrieve_shipping_label(self, shipmentId, **kwargs) -> ApiResponse
|
|
149
|
+
|
|
150
|
+
Retrieve shipping label based on the shipment id and tracking id.
|
|
151
|
+
|
|
152
|
+
Examples:
|
|
153
|
+
literal blocks::
|
|
154
|
+
|
|
155
|
+
ShippingV1().retrieve_shipping_label("value")
|
|
156
|
+
|
|
157
|
+
Args:
|
|
158
|
+
shipmentId: | required
|
|
159
|
+
**kwargs:
|
|
160
|
+
|
|
161
|
+
Returns:
|
|
162
|
+
ApiResponse
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
return self._request(
|
|
166
|
+
fill_query_params(kwargs.pop("path"), shipmentId), data=kwargs
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
@sp_endpoint("/shipping/v1/shipments/{}/containers/{}/label", method="POST")
|
|
170
|
+
def retrieve_shipping_label_for_container(
|
|
171
|
+
self, shipmentId, trackingId, **kwargs
|
|
172
|
+
) -> ApiResponse:
|
|
173
|
+
"""
|
|
174
|
+
retrieve_shipping_label_for_container(self, shipmentId, trackingId, **kwargs) -> ApiResponse
|
|
175
|
+
|
|
176
|
+
Retrieve shipping label based on the shipment id and tracking id.
|
|
177
|
+
|
|
178
|
+
**Usage Plan:**
|
|
179
|
+
|
|
180
|
+
====================================== ==============
|
|
181
|
+
Rate (requests per second) Burst
|
|
182
|
+
====================================== ==============
|
|
183
|
+
5 15
|
|
184
|
+
====================================== ==============
|
|
185
|
+
|
|
186
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
187
|
+
|
|
188
|
+
Examples:
|
|
189
|
+
literal blocks::
|
|
190
|
+
|
|
191
|
+
ShippingV1().retrieve_shipping_label_for_container("value", "value")
|
|
192
|
+
|
|
193
|
+
Args:
|
|
194
|
+
shipmentId: object | required Shipment Id to retreive label
|
|
195
|
+
trackingId: object | required Tracking Id
|
|
196
|
+
body: RetrieveShippingLabelRequest | required RetrieveShippingLabelRequest body
|
|
197
|
+
|
|
198
|
+
Returns:
|
|
199
|
+
ApiResponse
|
|
200
|
+
"""
|
|
201
|
+
|
|
202
|
+
return self._request(
|
|
203
|
+
fill_query_params(kwargs.pop("path"), shipmentId, trackingId), data=kwargs
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
@sp_endpoint("/shipping/v1/purchaseShipment", method="POST")
|
|
207
|
+
def purchase_shipment(self, **kwargs) -> ApiResponse:
|
|
208
|
+
"""
|
|
209
|
+
purchase_shipment(self, **kwargs) -> ApiResponse
|
|
210
|
+
|
|
211
|
+
Purchase shipping labels.
|
|
212
|
+
|
|
213
|
+
**Usage Plan:**
|
|
214
|
+
|
|
215
|
+
====================================== ==============
|
|
216
|
+
Rate (requests per second) Burst
|
|
217
|
+
====================================== ==============
|
|
218
|
+
5 15
|
|
219
|
+
====================================== ==============
|
|
220
|
+
|
|
221
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
222
|
+
|
|
223
|
+
Examples:
|
|
224
|
+
literal blocks::
|
|
225
|
+
|
|
226
|
+
ShippingV1().purchase_shipment()
|
|
227
|
+
|
|
228
|
+
Args:
|
|
229
|
+
body: PurchaseShipmentRequest | required PurchaseShipmentRequest body
|
|
230
|
+
|
|
231
|
+
Returns:
|
|
232
|
+
ApiResponse
|
|
233
|
+
"""
|
|
234
|
+
|
|
235
|
+
return self._request(kwargs.pop("path"), data=kwargs)
|
|
236
|
+
|
|
237
|
+
@sp_endpoint("/shipping/v1/rates", method="POST")
|
|
238
|
+
def get_rates(self, **kwargs) -> ApiResponse:
|
|
239
|
+
"""
|
|
240
|
+
get_rates(self, **kwargs) -> ApiResponse
|
|
241
|
+
|
|
242
|
+
Get service rates.
|
|
243
|
+
|
|
244
|
+
**Usage Plan:**
|
|
245
|
+
|
|
246
|
+
====================================== ==============
|
|
247
|
+
Rate (requests per second) Burst
|
|
248
|
+
====================================== ==============
|
|
249
|
+
5 15
|
|
250
|
+
====================================== ==============
|
|
251
|
+
|
|
252
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
253
|
+
|
|
254
|
+
Examples:
|
|
255
|
+
literal blocks::
|
|
256
|
+
|
|
257
|
+
ShippingV1().get_rates()
|
|
258
|
+
|
|
259
|
+
Args:
|
|
260
|
+
body: GetRatesRequest | required GetRatesRequest body
|
|
261
|
+
|
|
262
|
+
Returns:
|
|
263
|
+
ApiResponse
|
|
264
|
+
"""
|
|
265
|
+
|
|
266
|
+
return self._request(kwargs.pop("path"), data=kwargs)
|
|
267
|
+
|
|
268
|
+
@sp_endpoint("/shipping/v1/account", method="GET")
|
|
269
|
+
def get_account(self, **kwargs) -> ApiResponse:
|
|
270
|
+
"""
|
|
271
|
+
get_account(self, **kwargs) -> ApiResponse
|
|
272
|
+
|
|
273
|
+
Verify if the current account is valid.
|
|
274
|
+
|
|
275
|
+
**Usage Plan:**
|
|
276
|
+
|
|
277
|
+
====================================== ==============
|
|
278
|
+
Rate (requests per second) Burst
|
|
279
|
+
====================================== ==============
|
|
280
|
+
5 15
|
|
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
|
+
ShippingV1().get_account()
|
|
289
|
+
|
|
290
|
+
Args:
|
|
291
|
+
**kwargs:
|
|
292
|
+
|
|
293
|
+
Returns:
|
|
294
|
+
ApiResponse
|
|
295
|
+
"""
|
|
296
|
+
|
|
297
|
+
return self._request(kwargs.pop("path"), params=kwargs)
|
|
298
|
+
|
|
299
|
+
@sp_endpoint("/shipping/v1/tracking/{}", method="GET")
|
|
300
|
+
def get_tracking_information(self, trackingId, **kwargs) -> ApiResponse:
|
|
301
|
+
"""
|
|
302
|
+
get_tracking_information(self, trackingId, **kwargs) -> ApiResponse
|
|
303
|
+
|
|
304
|
+
Return the tracking information of a shipment.
|
|
305
|
+
|
|
306
|
+
**Usage Plan:**
|
|
307
|
+
|
|
308
|
+
====================================== ==============
|
|
309
|
+
Rate (requests per second) Burst
|
|
310
|
+
====================================== ==============
|
|
311
|
+
1 1
|
|
312
|
+
====================================== ==============
|
|
313
|
+
|
|
314
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
315
|
+
|
|
316
|
+
Examples:
|
|
317
|
+
literal blocks::
|
|
318
|
+
|
|
319
|
+
ShippingV1().get_tracking_information("value")
|
|
320
|
+
|
|
321
|
+
Args:
|
|
322
|
+
trackingId: object | required Tracking Id
|
|
323
|
+
|
|
324
|
+
Returns:
|
|
325
|
+
ApiResponse
|
|
326
|
+
"""
|
|
327
|
+
|
|
328
|
+
return self._request(
|
|
329
|
+
fill_query_params(kwargs.pop("path"), trackingId), params=kwargs
|
|
330
|
+
)
|