python-amazon-sp-api 1.7.5__py3-none-any.whl → 2.0.10__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.7.5.data → python_amazon_sp_api-2.0.10.data}/scripts/make_endpoint +2 -2
- {python_amazon_sp_api-1.7.5.dist-info → python_amazon_sp_api-2.0.10.dist-info}/METADATA +58 -8
- python_amazon_sp_api-2.0.10.dist-info/RECORD +253 -0
- {python_amazon_sp_api-1.7.5.dist-info → python_amazon_sp_api-2.0.10.dist-info}/WHEEL +1 -1
- {python_amazon_sp_api-1.7.5.dist-info → python_amazon_sp_api-2.0.10.dist-info}/top_level.txt +0 -1
- sp_api/__version__.py +1 -1
- sp_api/api/__init__.py +48 -41
- sp_api/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +82 -76
- sp_api/api/aplus_content/aplus_content.py +76 -45
- sp_api/api/application_integrations/application_integrations.py +118 -0
- sp_api/api/application_management/application_management.py +6 -7
- sp_api/api/authorization/authorization.py +5 -5
- sp_api/api/catalog/catalog.py +9 -10
- sp_api/api/catalog_items/catalog_items.py +10 -13
- sp_api/api/customer_feedback/customer_feedback.py +110 -0
- sp_api/api/data_kiosk/data_kiosk.py +59 -39
- sp_api/api/easy_ship/easy_ship.py +190 -0
- sp_api/api/external_fulfillment/external_fulfillment.py +706 -0
- sp_api/api/fba_inbound_eligibility/fba_inbound_eligibility.py +23 -13
- sp_api/api/fba_small_and_light/fba_small_and_light.py +46 -20
- sp_api/api/feeds/feeds.py +60 -39
- sp_api/api/finances/finances.py +40 -9
- sp_api/api/fulfillment_inbound/fulfillment_inbound.py +844 -619
- sp_api/api/fulfillment_outbound/fulfillment_outbound.py +63 -57
- sp_api/api/inventories/inventories.py +13 -11
- sp_api/api/listings_items/listings_items.py +38 -25
- sp_api/api/listings_restrictions/listings_restrictions.py +6 -7
- sp_api/api/merchant_fulfillment/merchant_fulfillment.py +49 -36
- sp_api/api/messaging/messaging.py +129 -25
- sp_api/api/notifications/notifications.py +85 -45
- sp_api/api/orders/orders.py +123 -38
- sp_api/api/orders/orders_2026_01_01.py +54 -0
- sp_api/api/product_fees/product_fees.py +75 -67
- sp_api/api/product_type_definitions/product_type_definitions.py +9 -10
- sp_api/api/products/products.py +177 -53
- sp_api/api/products/products_definitions.py +11 -82
- sp_api/api/replenishment/replenishment.py +13 -11
- sp_api/api/reports/reports.py +113 -95
- sp_api/api/sales/sales.py +23 -13
- sp_api/api/sellers/sellers.py +3 -3
- sp_api/api/services/services.py +41 -30
- sp_api/api/shipping/shipping.py +39 -37
- sp_api/api/shipping/shippingV2.py +46 -30
- sp_api/api/solicitations/solicitations.py +20 -11
- sp_api/api/supply_sources/supply_sources.py +45 -37
- sp_api/api/tokens/tokens.py +4 -6
- sp_api/api/upload/upload.py +10 -8
- sp_api/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +10 -6
- sp_api/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +12 -14
- sp_api/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +4 -6
- sp_api/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +42 -37
- sp_api/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +8 -6
- sp_api/api/vendor_invoices/vendor_invoices.py +6 -4
- sp_api/api/vendor_orders/vendor_orders.py +16 -19
- sp_api/api/vendor_shipments/vendor_shipments.py +91 -262
- sp_api/api/vendor_transaction_status/vendor_transaction_status.py +6 -6
- sp_api/asyncio/api/__init__.py +167 -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/feeds.py +260 -0
- sp_api/asyncio/api/finances/finances.py +100 -0
- sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound.py +1798 -0
- sp_api/asyncio/api/fulfillment_outbound/fulfillment_outbound.py +736 -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 +412 -0
- sp_api/asyncio/api/orders/orders_2026_01_01.py +40 -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 +194 -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 +11 -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/__init__.py +3 -3
- sp_api/auth/_core.py +39 -0
- sp_api/auth/access_token_client.py +20 -31
- sp_api/auth/access_token_response.py +4 -4
- sp_api/base/ApiResponse.py +5 -4
- sp_api/base/__init__.py +53 -42
- sp_api/base/_core.py +110 -0
- sp_api/base/_transport_httpx.py +39 -0
- sp_api/base/base_client.py +4 -4
- sp_api/base/client.py +131 -112
- sp_api/base/credential_provider.py +41 -34
- sp_api/base/exceptions.py +14 -3
- sp_api/base/feedTypes.py +44 -32
- sp_api/base/fulfillment_channel.py +2 -2
- sp_api/base/helpers.py +17 -16
- sp_api/base/identifiersType.py +8 -8
- sp_api/base/included_data.py +12 -12
- sp_api/base/marketplaces.py +5 -1
- sp_api/base/notifications.py +1 -1
- sp_api/base/processing_status.py +5 -5
- sp_api/base/reportTypes.py +198 -111
- sp_api/base/sales_enum.py +11 -13
- sp_api/util/__init__.py +42 -6
- sp_api/util/key_maker.py +4 -2
- sp_api/util/load_all_pages.py +16 -5
- sp_api/util/load_date_bound.py +28 -13
- sp_api/util/params.py +57 -0
- sp_api/util/product_fees.py +40 -0
- sp_api/util/products_definitions.py +169 -0
- sp_api/util/report_document.py +154 -0
- sp_api/util/retry.py +16 -15
- python_amazon_sp_api-1.7.5.dist-info/RECORD +0 -144
- tests/api/finances/test_finances.py +0 -19
- tests/api/notifications/test_notifications.py +0 -26
- tests/api/orders/test_orders.py +0 -122
- tests/api/product_fees/product_fees.py +0 -49
- tests/api/reports/test_reports.py +0 -127
- tests/client/test_auth.py +0 -59
- tests/client/test_base.py +0 -163
- tests/client/test_credential_provider.py +0 -45
- tests/client/test_helpers.py +0 -142
- {python_amazon_sp_api-1.7.5.dist-info → python_amazon_sp_api-2.0.10.dist-info/licenses}/LICENSE +0 -0
- {tests → sp_api/api/application_integrations}/__init__.py +0 -0
- {tests/api → sp_api/api/customer_feedback}/__init__.py +0 -0
- {tests/api/finances → sp_api/api/easy_ship}/__init__.py +0 -0
- {tests/api/notifications → sp_api/api/external_fulfillment}/__init__.py +0 -0
- {tests/api/orders → sp_api/asyncio}/__init__.py +0 -0
- {tests/api/product_fees → sp_api/asyncio/api/feeds}/__init__.py +0 -0
- {tests/api/reports → sp_api/asyncio/api/finances}/__init__.py +0 -0
- {tests/api/sellers → sp_api/asyncio/api/fulfillment_inbound}/__init__.py +0 -0
- {tests/client → sp_api/asyncio/api/fulfillment_outbound}/__init__.py +0 -0
- /tests/api/sellers/test_sellers.py → /sp_api/asyncio/api/inventories/__init__.py +0 -0
|
@@ -6,13 +6,12 @@ from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
|
|
|
6
6
|
class FulfillmentOutbound(Client):
|
|
7
7
|
"""
|
|
8
8
|
FulfillmentOutbound SP-API Client
|
|
9
|
-
:link:
|
|
9
|
+
:link:
|
|
10
10
|
|
|
11
11
|
The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
@sp_endpoint('/fba/outbound/2020-07-01/fulfillmentOrders/preview', method='POST')
|
|
14
|
+
@sp_endpoint("/fba/outbound/2020-07-01/fulfillmentOrders/preview", method="POST")
|
|
16
15
|
def get_fulfillment_preview(self, **kwargs) -> ApiResponse:
|
|
17
16
|
"""
|
|
18
17
|
get_fulfillment_preview(self, **kwargs) -> ApiResponse
|
|
@@ -108,16 +107,15 @@ class FulfillmentOutbound(Client):
|
|
|
108
107
|
}
|
|
109
108
|
]
|
|
110
109
|
}
|
|
111
|
-
|
|
110
|
+
|
|
112
111
|
|
|
113
112
|
Returns:
|
|
114
113
|
ApiResponse:
|
|
115
114
|
"""
|
|
116
|
-
|
|
117
|
-
return self._request(kwargs.pop('path'), data=kwargs)
|
|
118
|
-
|
|
119
115
|
|
|
120
|
-
|
|
116
|
+
return self._request(kwargs.pop("path"), data=kwargs)
|
|
117
|
+
|
|
118
|
+
@sp_endpoint("/fba/outbound/2020-07-01/fulfillmentOrders", method="GET")
|
|
121
119
|
def list_all_fulfillment_orders(self, **kwargs) -> ApiResponse:
|
|
122
120
|
"""
|
|
123
121
|
list_all_fulfillment_orders(self, **kwargs) -> ApiResponse
|
|
@@ -141,11 +139,10 @@ class FulfillmentOutbound(Client):
|
|
|
141
139
|
Returns:
|
|
142
140
|
ApiResponse:
|
|
143
141
|
"""
|
|
144
|
-
|
|
145
|
-
return self._request(kwargs.pop('path'), params=kwargs)
|
|
146
|
-
|
|
147
142
|
|
|
148
|
-
|
|
143
|
+
return self._request(kwargs.pop("path"), params=kwargs)
|
|
144
|
+
|
|
145
|
+
@sp_endpoint("/fba/outbound/2020-07-01/fulfillmentOrders", method="POST")
|
|
149
146
|
def create_fulfillment_order(self, **kwargs) -> ApiResponse:
|
|
150
147
|
"""
|
|
151
148
|
create_fulfillment_order(self, **kwargs) -> ApiResponse
|
|
@@ -322,16 +319,15 @@ class FulfillmentOutbound(Client):
|
|
|
322
319
|
}
|
|
323
320
|
]
|
|
324
321
|
}
|
|
325
|
-
|
|
322
|
+
|
|
326
323
|
|
|
327
324
|
Returns:
|
|
328
325
|
ApiResponse:
|
|
329
326
|
"""
|
|
330
|
-
|
|
331
|
-
return self._request(kwargs.pop('path'), data=kwargs)
|
|
332
|
-
|
|
333
327
|
|
|
334
|
-
|
|
328
|
+
return self._request(kwargs.pop("path"), data=kwargs)
|
|
329
|
+
|
|
330
|
+
@sp_endpoint("/fba/outbound/2020-07-01/tracking", method="GET")
|
|
335
331
|
def get_package_tracking_details(self, **kwargs) -> ApiResponse:
|
|
336
332
|
"""
|
|
337
333
|
get_package_tracking_details(self, **kwargs) -> ApiResponse
|
|
@@ -354,11 +350,10 @@ class FulfillmentOutbound(Client):
|
|
|
354
350
|
Returns:
|
|
355
351
|
ApiResponse:
|
|
356
352
|
"""
|
|
357
|
-
|
|
358
|
-
return self._request(kwargs.pop('path'), params=kwargs)
|
|
359
|
-
|
|
360
353
|
|
|
361
|
-
|
|
354
|
+
return self._request(kwargs.pop("path"), params=kwargs)
|
|
355
|
+
|
|
356
|
+
@sp_endpoint("/fba/outbound/2020-07-01/returnReasonCodes", method="GET")
|
|
362
357
|
def list_return_reason_codes(self, **kwargs) -> ApiResponse:
|
|
363
358
|
"""
|
|
364
359
|
list_return_reason_codes(self, **kwargs) -> ApiResponse
|
|
@@ -385,16 +380,17 @@ class FulfillmentOutbound(Client):
|
|
|
385
380
|
Returns:
|
|
386
381
|
ApiResponse:
|
|
387
382
|
"""
|
|
388
|
-
|
|
389
|
-
return self._request(kwargs.pop('path'), params=kwargs)
|
|
390
|
-
|
|
391
383
|
|
|
392
|
-
|
|
393
|
-
|
|
384
|
+
return self._request(kwargs.pop("path"), params=kwargs)
|
|
385
|
+
|
|
386
|
+
@sp_endpoint("/fba/outbound/2020-07-01/fulfillmentOrders/{}/return", method="PUT")
|
|
387
|
+
def create_fulfillment_return(
|
|
388
|
+
self, sellerFulfillmentOrderId, **kwargs
|
|
389
|
+
) -> ApiResponse:
|
|
394
390
|
"""
|
|
395
391
|
create_fulfillment_return(self, sellerFulfillmentOrderId, **kwargs) -> ApiResponse
|
|
396
392
|
|
|
397
|
-
Creates a fulfillment return.
|
|
393
|
+
Creates a fulfillment return.
|
|
398
394
|
|
|
399
395
|
**Usage Plan:**
|
|
400
396
|
|
|
@@ -440,11 +436,12 @@ class FulfillmentOutbound(Client):
|
|
|
440
436
|
Returns:
|
|
441
437
|
ApiResponse:
|
|
442
438
|
"""
|
|
443
|
-
|
|
444
|
-
return self._request(fill_query_params(kwargs.pop('path'), sellerFulfillmentOrderId), data=kwargs)
|
|
445
|
-
|
|
446
439
|
|
|
447
|
-
|
|
440
|
+
return self._request(
|
|
441
|
+
fill_query_params(kwargs.pop("path"), sellerFulfillmentOrderId), data=kwargs
|
|
442
|
+
)
|
|
443
|
+
|
|
444
|
+
@sp_endpoint("/fba/outbound/2020-07-01/fulfillmentOrders/{}", method="GET")
|
|
448
445
|
def get_fulfillment_order(self, sellerFulfillmentOrderId, **kwargs) -> ApiResponse:
|
|
449
446
|
"""
|
|
450
447
|
get_fulfillment_order(self, sellerFulfillmentOrderId, **kwargs) -> ApiResponse
|
|
@@ -467,12 +464,16 @@ class FulfillmentOutbound(Client):
|
|
|
467
464
|
Returns:
|
|
468
465
|
ApiResponse:
|
|
469
466
|
"""
|
|
470
|
-
|
|
471
|
-
return self._request(fill_query_params(kwargs.pop('path'), sellerFulfillmentOrderId), params=kwargs)
|
|
472
|
-
|
|
473
467
|
|
|
474
|
-
|
|
475
|
-
|
|
468
|
+
return self._request(
|
|
469
|
+
fill_query_params(kwargs.pop("path"), sellerFulfillmentOrderId),
|
|
470
|
+
params=kwargs,
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
@sp_endpoint("/fba/outbound/2020-07-01/fulfillmentOrders/{}", method="PUT")
|
|
474
|
+
def update_fulfillment_order(
|
|
475
|
+
self, sellerFulfillmentOrderId, **kwargs
|
|
476
|
+
) -> ApiResponse:
|
|
476
477
|
"""
|
|
477
478
|
update_fulfillment_order(self, sellerFulfillmentOrderId, **kwargs) -> ApiResponse
|
|
478
479
|
|
|
@@ -609,12 +610,15 @@ class FulfillmentOutbound(Client):
|
|
|
609
610
|
Returns:
|
|
610
611
|
ApiResponse:
|
|
611
612
|
"""
|
|
612
|
-
|
|
613
|
-
return self._request(fill_query_params(kwargs.pop('path'), sellerFulfillmentOrderId), data=kwargs)
|
|
614
|
-
|
|
615
613
|
|
|
616
|
-
|
|
617
|
-
|
|
614
|
+
return self._request(
|
|
615
|
+
fill_query_params(kwargs.pop("path"), sellerFulfillmentOrderId), data=kwargs
|
|
616
|
+
)
|
|
617
|
+
|
|
618
|
+
@sp_endpoint("/fba/outbound/2020-07-01/fulfillmentOrders/{}/cancel", method="PUT")
|
|
619
|
+
def cancel_fulfillment_order(
|
|
620
|
+
self, sellerFulfillmentOrderId, **kwargs
|
|
621
|
+
) -> ApiResponse:
|
|
618
622
|
"""
|
|
619
623
|
cancel_fulfillment_order(self, sellerFulfillmentOrderId, **kwargs) -> ApiResponse
|
|
620
624
|
|
|
@@ -632,16 +636,17 @@ class FulfillmentOutbound(Client):
|
|
|
632
636
|
|
|
633
637
|
Args:
|
|
634
638
|
sellerFulfillmentOrderId:string | * REQUIRED The identifier assigned to the item by the seller when the fulfillment order was created.
|
|
635
|
-
|
|
639
|
+
|
|
636
640
|
|
|
637
641
|
Returns:
|
|
638
642
|
ApiResponse:
|
|
639
643
|
"""
|
|
640
|
-
|
|
641
|
-
return self._request(fill_query_params(kwargs.pop('path'), sellerFulfillmentOrderId), data=kwargs)
|
|
642
|
-
|
|
643
644
|
|
|
644
|
-
|
|
645
|
+
return self._request(
|
|
646
|
+
fill_query_params(kwargs.pop("path"), sellerFulfillmentOrderId), data=kwargs
|
|
647
|
+
)
|
|
648
|
+
|
|
649
|
+
@sp_endpoint("/fba/outbound/2020-07-01/features", method="GET")
|
|
645
650
|
def get_features(self, **kwargs) -> ApiResponse:
|
|
646
651
|
"""
|
|
647
652
|
get_features(self, **kwargs) -> ApiResponse
|
|
@@ -665,11 +670,10 @@ class FulfillmentOutbound(Client):
|
|
|
665
670
|
Returns:
|
|
666
671
|
ApiResponse:
|
|
667
672
|
"""
|
|
668
|
-
|
|
669
|
-
return self._request(kwargs.pop('path'), params=kwargs)
|
|
670
|
-
|
|
671
673
|
|
|
672
|
-
|
|
674
|
+
return self._request(kwargs.pop("path"), params=kwargs)
|
|
675
|
+
|
|
676
|
+
@sp_endpoint("/fba/outbound/2020-07-01/features/inventory/{}", method="GET")
|
|
673
677
|
def get_feature_inventory(self, featureName, **kwargs) -> ApiResponse:
|
|
674
678
|
"""
|
|
675
679
|
get_feature_inventory(self, featureName, **kwargs) -> ApiResponse
|
|
@@ -694,11 +698,12 @@ class FulfillmentOutbound(Client):
|
|
|
694
698
|
Returns:
|
|
695
699
|
ApiResponse:
|
|
696
700
|
"""
|
|
697
|
-
|
|
698
|
-
return self._request(fill_query_params(kwargs.pop('path'), featureName), params=kwargs)
|
|
699
|
-
|
|
700
701
|
|
|
701
|
-
|
|
702
|
+
return self._request(
|
|
703
|
+
fill_query_params(kwargs.pop("path"), featureName), params=kwargs
|
|
704
|
+
)
|
|
705
|
+
|
|
706
|
+
@sp_endpoint("/fba/outbound/2020-07-01/features/inventory/{}", method="GET")
|
|
702
707
|
def get_feature_s_k_u(self, featureName, **kwargs) -> ApiResponse:
|
|
703
708
|
"""
|
|
704
709
|
get_feature_s_k_u(self, featureName, **kwargs) -> ApiResponse
|
|
@@ -724,6 +729,7 @@ class FulfillmentOutbound(Client):
|
|
|
724
729
|
Returns:
|
|
725
730
|
ApiResponse:
|
|
726
731
|
"""
|
|
727
|
-
|
|
728
|
-
return self._request(
|
|
729
|
-
|
|
732
|
+
|
|
733
|
+
return self._request(
|
|
734
|
+
fill_query_params(kwargs.pop("path"), featureName), params=kwargs
|
|
735
|
+
)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from collections import abc
|
|
2
1
|
import urllib
|
|
3
2
|
|
|
4
3
|
from sp_api.base import Client, Marketplaces, sp_endpoint, ApiResponse
|
|
5
4
|
from sp_api.base.InventoryEnums import InventoryGranularity
|
|
5
|
+
from sp_api.util import normalize_csv_param
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class Inventories(Client):
|
|
@@ -10,7 +10,7 @@ class Inventories(Client):
|
|
|
10
10
|
:link: https://github.com/amzn/selling-partner-api-docs/blob/main/references/fba-inventory-api/fbaInventory.md#getinventorysummaries
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
|
-
@sp_endpoint(
|
|
13
|
+
@sp_endpoint("/fba/inventory/v1/summaries")
|
|
14
14
|
def get_inventory_summary_marketplace(self, **kwargs) -> ApiResponse:
|
|
15
15
|
"""
|
|
16
16
|
get_inventory_summary_marketplace(self, **kwargs) -> GetInventorySummariesResponse
|
|
@@ -60,12 +60,14 @@ class Inventories(Client):
|
|
|
60
60
|
|
|
61
61
|
"""
|
|
62
62
|
|
|
63
|
-
kwargs.update(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
kwargs.update(
|
|
64
|
+
{
|
|
65
|
+
"granularityType": kwargs.get(
|
|
66
|
+
"granularityType", InventoryGranularity.MARKETPLACE.value
|
|
67
|
+
),
|
|
68
|
+
"granularityId": kwargs.get("granularityId", self.marketplace_id),
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
normalize_csv_param(kwargs, "sellerSkus")
|
|
72
|
+
|
|
73
|
+
return self._request(kwargs.pop("path"), params=kwargs)
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
from sp_api.base import (
|
|
2
|
+
Client,
|
|
3
|
+
sp_endpoint,
|
|
4
|
+
fill_query_params,
|
|
5
|
+
ApiResponse,
|
|
6
|
+
IncludedData,
|
|
7
|
+
)
|
|
8
|
+
from sp_api.util import normalize_included_data
|
|
4
9
|
|
|
5
10
|
|
|
6
11
|
class ListingsItems(Client):
|
|
7
12
|
"""
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
ListingsItems SP-API Client
|
|
14
|
+
:link:
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.
|
|
12
17
|
|
|
13
|
-
For more information, see the [Listings Items API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/listings-items-api-use-case-guide/listings-items-api-use-case-guide_2021-08-01.md).
|
|
18
|
+
For more information, see the [Listings Items API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/listings-items-api-use-case-guide/listings-items-api-use-case-guide_2021-08-01.md).
|
|
14
19
|
"""
|
|
15
20
|
|
|
16
|
-
@sp_endpoint(
|
|
21
|
+
@sp_endpoint("/listings/2021-08-01/items/{}/{}", method="DELETE")
|
|
17
22
|
def delete_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse:
|
|
18
23
|
"""
|
|
19
24
|
delete_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse
|
|
@@ -34,9 +39,11 @@ For more information, see the [Listings Items API Use Case Guide](https://github
|
|
|
34
39
|
ApiResponse:
|
|
35
40
|
"""
|
|
36
41
|
|
|
37
|
-
return self._request(
|
|
42
|
+
return self._request(
|
|
43
|
+
fill_query_params(kwargs.pop("path"), sellerId, sku), data=kwargs
|
|
44
|
+
)
|
|
38
45
|
|
|
39
|
-
@sp_endpoint(
|
|
46
|
+
@sp_endpoint("/listings/2021-08-01/items/{}/{}", method="GET")
|
|
40
47
|
def get_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse:
|
|
41
48
|
"""
|
|
42
49
|
get_listings_item(self, sellerId, **kwargs) -> ApiResponse
|
|
@@ -57,13 +64,13 @@ For more information, see the [Listings Items API Use Case Guide](https://github
|
|
|
57
64
|
Returns:
|
|
58
65
|
ApiResponse:
|
|
59
66
|
"""
|
|
60
|
-
|
|
61
|
-
kwargs['includedData'] = ','.join(
|
|
62
|
-
[x.value if isinstance(x, IncludedData) else x for x in kwargs['includedData']])
|
|
67
|
+
normalize_included_data(kwargs, enum_cls=IncludedData)
|
|
63
68
|
|
|
64
|
-
return self._request(
|
|
69
|
+
return self._request(
|
|
70
|
+
fill_query_params(kwargs.pop("path"), sellerId, sku), params=kwargs
|
|
71
|
+
)
|
|
65
72
|
|
|
66
|
-
@sp_endpoint(
|
|
73
|
+
@sp_endpoint("/listings/2021-08-01/items/{}", method="GET")
|
|
67
74
|
def search_listings_items(self, sellerId, **kwargs) -> ApiResponse:
|
|
68
75
|
"""
|
|
69
76
|
search_listings_items(self, sellerId, **kwargs) -> ApiResponse
|
|
@@ -83,13 +90,13 @@ For more information, see the [Listings Items API Use Case Guide](https://github
|
|
|
83
90
|
Returns:
|
|
84
91
|
ApiResponse:
|
|
85
92
|
"""
|
|
86
|
-
|
|
87
|
-
kwargs['includedData'] = ','.join(
|
|
88
|
-
[x.value if isinstance(x, IncludedData) else x for x in kwargs['includedData']])
|
|
93
|
+
normalize_included_data(kwargs, enum_cls=IncludedData)
|
|
89
94
|
|
|
90
|
-
return self._request(
|
|
95
|
+
return self._request(
|
|
96
|
+
fill_query_params(kwargs.pop("path"), sellerId), params=kwargs
|
|
97
|
+
)
|
|
91
98
|
|
|
92
|
-
@sp_endpoint(
|
|
99
|
+
@sp_endpoint("/listings/2021-08-01/items/{}/{}", method="PATCH")
|
|
93
100
|
def patch_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse:
|
|
94
101
|
"""
|
|
95
102
|
patch_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse
|
|
@@ -122,10 +129,13 @@ For more information, see the [Listings Items API Use Case Guide](https://github
|
|
|
122
129
|
Returns:
|
|
123
130
|
ApiResponse:
|
|
124
131
|
"""
|
|
125
|
-
return self._request(
|
|
126
|
-
|
|
132
|
+
return self._request(
|
|
133
|
+
fill_query_params(kwargs.pop("path"), sellerId, sku),
|
|
134
|
+
data=kwargs.pop("body"),
|
|
135
|
+
params=kwargs,
|
|
136
|
+
)
|
|
127
137
|
|
|
128
|
-
@sp_endpoint(
|
|
138
|
+
@sp_endpoint("/listings/2021-08-01/items/{}/{}", method="PUT")
|
|
129
139
|
def put_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse:
|
|
130
140
|
"""
|
|
131
141
|
put_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse
|
|
@@ -152,5 +162,8 @@ For more information, see the [Listings Items API Use Case Guide](https://github
|
|
|
152
162
|
ApiResponse:
|
|
153
163
|
"""
|
|
154
164
|
|
|
155
|
-
return self._request(
|
|
156
|
-
|
|
165
|
+
return self._request(
|
|
166
|
+
fill_query_params(kwargs.pop("path"), sellerId, sku),
|
|
167
|
+
data=kwargs.pop("body"),
|
|
168
|
+
params=kwargs,
|
|
169
|
+
)
|
|
@@ -12,25 +12,24 @@ class ListingsRestrictions(Client):
|
|
|
12
12
|
For more information, see the [Listings Restrictions API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/listings-restrictions-api-use-case-guide/listings-restrictions-api-use-case-guide_2021-08-01.md).
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
|
-
@sp_endpoint(
|
|
15
|
+
@sp_endpoint("/listings/2021-08-01/restrictions", method="GET")
|
|
16
16
|
def get_listings_restrictions(self, **kwargs) -> ApiResponse:
|
|
17
17
|
"""
|
|
18
18
|
get_listings_restrictions(self, **kwargs) -> ApiResponse
|
|
19
19
|
|
|
20
|
-
Returns listing restrictions for an item in the Amazon Catalog.
|
|
20
|
+
Returns listing restrictions for an item in the Amazon Catalog.
|
|
21
21
|
|
|
22
22
|
Args:
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
key asin:string | * REQUIRED The Amazon Standard Identification Number (ASIN) of the item.
|
|
25
25
|
key conditionType:string | The condition used to filter restrictions.
|
|
26
26
|
key sellerId:string | * REQUIRED A selling partner identifier, such as a merchant account.
|
|
27
27
|
key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
28
28
|
key reasonLocale:string | A locale for reason text localization. When not provided, the default language code of the first marketplace is used. Examples: "en_US", "fr_CA", "fr_FR". Localized messages default to "en_US" when a localization is not available in the specified locale.
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
|
|
31
31
|
Returns:
|
|
32
32
|
ApiResponse
|
|
33
33
|
"""
|
|
34
|
-
|
|
35
|
-
return self._request(kwargs.pop(
|
|
36
|
-
|
|
34
|
+
|
|
35
|
+
return self._request(kwargs.pop("path"), params=kwargs)
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
2
1
|
from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
class MerchantFulfillment(Client):
|
|
6
5
|
"""
|
|
7
|
-
|
|
6
|
+
:link: https://github.com/amzn/selling-partner-api-docs/blob/main/references/merchant-fulfillment-api/merchantFulfillmentV0.md
|
|
8
7
|
|
|
9
8
|
"""
|
|
10
9
|
|
|
11
|
-
@sp_endpoint("/mfn/v0/eligibleServices", method=
|
|
12
|
-
def get_eligible_shipment_services_old(
|
|
10
|
+
@sp_endpoint("/mfn/v0/eligibleServices", method="POST")
|
|
11
|
+
def get_eligible_shipment_services_old(
|
|
12
|
+
self, shipment_request_details: dict, **kwargs
|
|
13
|
+
) -> ApiResponse:
|
|
13
14
|
"""
|
|
14
15
|
get_eligible_shipment_services_old(self, shipment_request_details: dict, **kwargs) -> ApiResponse
|
|
15
16
|
Returns a list of shipping service offers that satisfy the specified shipment request details.
|
|
@@ -69,15 +70,14 @@ class MerchantFulfillment(Client):
|
|
|
69
70
|
GetEligibleShipmentServicesResponse:
|
|
70
71
|
"""
|
|
71
72
|
# GetEligibleShipmentServicesRequest
|
|
72
|
-
data = {
|
|
73
|
-
"ShipmentRequestDetails": shipment_request_details,
|
|
74
|
-
**kwargs
|
|
75
|
-
}
|
|
73
|
+
data = {"ShipmentRequestDetails": shipment_request_details, **kwargs}
|
|
76
74
|
|
|
77
|
-
return self._request(kwargs.pop(
|
|
75
|
+
return self._request(kwargs.pop("path"), data=data)
|
|
78
76
|
|
|
79
|
-
@sp_endpoint("/mfn/v0/eligibleShippingServices", method=
|
|
80
|
-
def get_eligible_shipment_services(
|
|
77
|
+
@sp_endpoint("/mfn/v0/eligibleShippingServices", method="POST")
|
|
78
|
+
def get_eligible_shipment_services(
|
|
79
|
+
self, shipment_request_details: dict, **kwargs
|
|
80
|
+
) -> ApiResponse:
|
|
81
81
|
"""
|
|
82
82
|
get_eligible_shipment_services(self, shipment_request_details: dict, **kwargs) -> ApiResponse
|
|
83
83
|
Returns a list of shipping service offers that satisfy the specified shipment request details.
|
|
@@ -138,12 +138,9 @@ class MerchantFulfillment(Client):
|
|
|
138
138
|
"""
|
|
139
139
|
|
|
140
140
|
# GetEligibleShipmentServicesRequest
|
|
141
|
-
data = {
|
|
142
|
-
"ShipmentRequestDetails": shipment_request_details,
|
|
143
|
-
**kwargs
|
|
144
|
-
}
|
|
141
|
+
data = {"ShipmentRequestDetails": shipment_request_details, **kwargs}
|
|
145
142
|
|
|
146
|
-
return self._request(kwargs.pop(
|
|
143
|
+
return self._request(kwargs.pop("path"), data=data)
|
|
147
144
|
|
|
148
145
|
@sp_endpoint("/mfn/v0/shipments/{}")
|
|
149
146
|
def get_shipment(self, shipment_id: str, **kwargs) -> ApiResponse:
|
|
@@ -172,9 +169,13 @@ class MerchantFulfillment(Client):
|
|
|
172
169
|
Returns:
|
|
173
170
|
GetShipmentResponse:
|
|
174
171
|
"""
|
|
175
|
-
return self._request(
|
|
172
|
+
return self._request(
|
|
173
|
+
fill_query_params(kwargs.pop("path"), shipment_id),
|
|
174
|
+
params=kwargs,
|
|
175
|
+
add_marketplace=False,
|
|
176
|
+
)
|
|
176
177
|
|
|
177
|
-
@sp_endpoint("/mfn/v0/shipments/{}", method=
|
|
178
|
+
@sp_endpoint("/mfn/v0/shipments/{}", method="DELETE")
|
|
178
179
|
def cancel_shipment(self, shipment_id: str, **kwargs) -> ApiResponse:
|
|
179
180
|
"""
|
|
180
181
|
cancel_shipment(self, shipment_id: str, **kwargs) -> ApiResponse
|
|
@@ -196,9 +197,13 @@ class MerchantFulfillment(Client):
|
|
|
196
197
|
Returns:
|
|
197
198
|
CancelShipmentResponse:
|
|
198
199
|
"""
|
|
199
|
-
return self._request(
|
|
200
|
+
return self._request(
|
|
201
|
+
fill_query_params(kwargs.pop("path"), shipment_id),
|
|
202
|
+
params=kwargs,
|
|
203
|
+
add_marketplace=False,
|
|
204
|
+
)
|
|
200
205
|
|
|
201
|
-
@sp_endpoint("/mfn/v0/shipments/{}/cancel", method=
|
|
206
|
+
@sp_endpoint("/mfn/v0/shipments/{}/cancel", method="PUT")
|
|
202
207
|
def cancel_shipment_old(self, shipment_id: str, **kwargs) -> ApiResponse:
|
|
203
208
|
"""
|
|
204
209
|
cancel_shipment_old(self, shipment_id: str, **kwargs) -> ApiResponse
|
|
@@ -220,10 +225,16 @@ class MerchantFulfillment(Client):
|
|
|
220
225
|
Returns:
|
|
221
226
|
CancelShipmentResponse:
|
|
222
227
|
"""
|
|
223
|
-
return self._request(
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
228
|
+
return self._request(
|
|
229
|
+
fill_query_params(kwargs.pop("path"), shipment_id),
|
|
230
|
+
params=kwargs,
|
|
231
|
+
add_marketplace=False,
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
@sp_endpoint("/mfn/v0/shipments", method="POST")
|
|
235
|
+
def create_shipment(
|
|
236
|
+
self, shipment_request_details: dict, shipping_service_id: str, **kwargs
|
|
237
|
+
) -> ApiResponse:
|
|
227
238
|
"""
|
|
228
239
|
create_shipment(self, shipment_request_details: dict, shipping_service_id: str, **kwargs) -> ApiResponse
|
|
229
240
|
Create a shipment with the information provided.
|
|
@@ -295,13 +306,14 @@ class MerchantFulfillment(Client):
|
|
|
295
306
|
data = {
|
|
296
307
|
"ShipmentRequestDetails": shipment_request_details,
|
|
297
308
|
"ShippingServiceId": shipping_service_id,
|
|
298
|
-
**kwargs
|
|
309
|
+
**kwargs,
|
|
299
310
|
}
|
|
300
|
-
return self._request(kwargs.pop(
|
|
311
|
+
return self._request(kwargs.pop("path"), data=data, add_marketplace=False)
|
|
301
312
|
|
|
302
|
-
@sp_endpoint("/mfn/v0/sellerInputs", method=
|
|
303
|
-
def get_additional_seller_inputs_old(
|
|
304
|
-
|
|
313
|
+
@sp_endpoint("/mfn/v0/sellerInputs", method="POST")
|
|
314
|
+
def get_additional_seller_inputs_old(
|
|
315
|
+
self, shipping_service_id: str, ship_from_address: dict, order_id: str, **kwargs
|
|
316
|
+
) -> ApiResponse:
|
|
305
317
|
"""
|
|
306
318
|
get_additional_seller_inputs_old(self, shipping_service_id: str, ship_from_address: dict, order_id: str,
|
|
307
319
|
**kwargs) -> ApiResponse
|
|
@@ -330,13 +342,14 @@ class MerchantFulfillment(Client):
|
|
|
330
342
|
data = {
|
|
331
343
|
"ShippingServiceId": shipping_service_id,
|
|
332
344
|
"ShipFromAddress": ship_from_address,
|
|
333
|
-
"OrderId": order_id
|
|
345
|
+
"OrderId": order_id,
|
|
334
346
|
}
|
|
335
|
-
return self._request(kwargs.pop(
|
|
347
|
+
return self._request(kwargs.pop("path"), data=data, add_marketplace=False)
|
|
336
348
|
|
|
337
|
-
@sp_endpoint("/mfn/v0/additionalSellerInputs", method=
|
|
338
|
-
def get_additional_seller_inputs(
|
|
339
|
-
|
|
349
|
+
@sp_endpoint("/mfn/v0/additionalSellerInputs", method="POST")
|
|
350
|
+
def get_additional_seller_inputs(
|
|
351
|
+
self, shipping_service_id: str, ship_from_address: dict, order_id: str, **kwargs
|
|
352
|
+
) -> ApiResponse:
|
|
340
353
|
"""
|
|
341
354
|
get_additional_seller_inputs(self, shipping_service_id: str, ship_from_address: dict, order_id: str,
|
|
342
355
|
**kwargs) -> ApiResponse
|
|
@@ -365,6 +378,6 @@ class MerchantFulfillment(Client):
|
|
|
365
378
|
data = {
|
|
366
379
|
"ShippingServiceId": shipping_service_id,
|
|
367
380
|
"ShipFromAddress": ship_from_address,
|
|
368
|
-
"OrderId": order_id
|
|
381
|
+
"OrderId": order_id,
|
|
369
382
|
}
|
|
370
|
-
return self._request(kwargs.pop(
|
|
383
|
+
return self._request(kwargs.pop("path"), data=data, add_marketplace=False)
|