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
|
@@ -21,28 +21,31 @@ class FbaInboundEligibility(Client):
|
|
|
21
21
|
def get_item_eligibility_preview(self, **kwargs) -> ApiResponse:
|
|
22
22
|
"""
|
|
23
23
|
get_item_eligibility_preview(self, **kwargs) -> ApiResponse
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item's eligibility.
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
**Usage Plan:**
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
|
|
30
29
|
====================================== ==============
|
|
31
30
|
Rate (requests per second) Burst
|
|
32
31
|
====================================== ==============
|
|
33
32
|
1 1
|
|
34
33
|
====================================== ==============
|
|
35
|
-
|
|
34
|
+
|
|
36
35
|
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
37
|
-
|
|
36
|
+
|
|
37
|
+
Examples:
|
|
38
|
+
literal blocks::
|
|
39
|
+
|
|
40
|
+
FbaInboundEligibility().get_item_eligibility_preview()
|
|
41
|
+
|
|
38
42
|
Args:
|
|
39
|
-
key marketplaceIds:
|
|
40
|
-
key asin:
|
|
41
|
-
key program:
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
key marketplaceIds: object | The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND.
|
|
44
|
+
key asin: object | required The ASIN of the item for which you want an eligibility preview.
|
|
45
|
+
key program: object | required The program that you want to check eligibility against.
|
|
46
|
+
|
|
44
47
|
Returns:
|
|
45
|
-
ApiResponse
|
|
48
|
+
ApiResponse
|
|
46
49
|
"""
|
|
47
50
|
return self._request(kwargs.pop("path"), params=kwargs)
|
|
48
51
|
|
|
@@ -50,28 +53,31 @@ class FbaInboundEligibility(Client):
|
|
|
50
53
|
def get_item_eligibility_preview_extended(self, **kwargs) -> ApiResponse:
|
|
51
54
|
"""
|
|
52
55
|
get_item_eligibility_preview_extended(self, **kwargs) -> ApiResponse
|
|
53
|
-
|
|
56
|
+
|
|
54
57
|
This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item's eligibility.
|
|
55
|
-
|
|
58
|
+
|
|
56
59
|
**Usage Plan:**
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
|
|
59
61
|
====================================== ==============
|
|
60
62
|
Rate (requests per second) Burst
|
|
61
63
|
====================================== ==============
|
|
62
64
|
1 1
|
|
63
65
|
====================================== ==============
|
|
64
|
-
|
|
66
|
+
|
|
65
67
|
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
66
|
-
|
|
68
|
+
|
|
69
|
+
Examples:
|
|
70
|
+
literal blocks::
|
|
71
|
+
|
|
72
|
+
FbaInboundEligibility().get_item_eligibility_preview_extended()
|
|
73
|
+
|
|
67
74
|
Args:
|
|
68
|
-
key marketplaceIds:
|
|
69
|
-
key asin:
|
|
70
|
-
key program:
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
key marketplaceIds: object | The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND.
|
|
76
|
+
key asin: object | required The ASIN of the item for which you want an eligibility preview.
|
|
77
|
+
key program: object | required The program that you want to check eligibility against.
|
|
78
|
+
|
|
73
79
|
Returns:
|
|
74
|
-
ApiResponse
|
|
80
|
+
ApiResponse
|
|
75
81
|
"""
|
|
76
82
|
|
|
77
83
|
api_response = self._request(kwargs.pop("path"), params=kwargs)
|
|
@@ -22,26 +22,21 @@ class FbaSmallAndLight(Client):
|
|
|
22
22
|
self, seller_sku, **kwargs
|
|
23
23
|
) -> ApiResponse:
|
|
24
24
|
"""
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
get_small_and_light_enrollment_by_seller_sku(self, seller_sku, **kwargs) -> ApiResponse
|
|
26
|
+
|
|
27
27
|
Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
2 10
|
|
35
|
-
====================================== ==============
|
|
36
|
-
|
|
37
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
38
|
-
|
|
28
|
+
|
|
29
|
+
Examples:
|
|
30
|
+
literal blocks::
|
|
31
|
+
|
|
32
|
+
FbaSmallAndLight().get_small_and_light_enrollment_by_seller_sku("value")
|
|
33
|
+
|
|
39
34
|
Args:
|
|
40
|
-
seller_sku:
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
seller_sku: | required
|
|
36
|
+
**kwargs:
|
|
37
|
+
|
|
43
38
|
Returns:
|
|
44
|
-
ApiResponse
|
|
39
|
+
ApiResponse
|
|
45
40
|
"""
|
|
46
41
|
|
|
47
42
|
return self._request(
|
|
@@ -59,33 +54,28 @@ class FbaSmallAndLight(Client):
|
|
|
59
54
|
self, seller_sku, **kwargs
|
|
60
55
|
) -> ApiResponse:
|
|
61
56
|
"""
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
put_small_and_light_enrollment_by_seller_sku(self, seller_sku, **kwargs) -> ApiResponse
|
|
58
|
+
|
|
64
59
|
Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
====================================== ==============
|
|
72
|
-
2 5
|
|
73
|
-
====================================== ==============
|
|
74
|
-
|
|
75
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
76
|
-
|
|
60
|
+
|
|
61
|
+
Examples:
|
|
62
|
+
literal blocks::
|
|
63
|
+
|
|
64
|
+
FbaSmallAndLight().put_small_and_light_enrollment_by_seller_sku("value")
|
|
65
|
+
|
|
77
66
|
Args:
|
|
78
|
-
seller_sku:
|
|
79
|
-
|
|
80
|
-
|
|
67
|
+
seller_sku: | required
|
|
68
|
+
**kwargs:
|
|
69
|
+
|
|
81
70
|
Returns:
|
|
82
|
-
ApiResponse
|
|
71
|
+
ApiResponse
|
|
83
72
|
"""
|
|
84
73
|
|
|
85
74
|
return self._request(
|
|
86
75
|
fill_query_params(kwargs.pop("path"), seller_sku),
|
|
87
76
|
params={
|
|
88
|
-
"marketplaceIds": kwargs.get("marketplaceIds", self.marketplace_id)
|
|
77
|
+
"marketplaceIds": kwargs.get("marketplaceIds", self.marketplace_id),
|
|
78
|
+
"method": kwargs.get("method", "PUT"),
|
|
89
79
|
},
|
|
90
80
|
)
|
|
91
81
|
|
|
@@ -100,26 +90,21 @@ class FbaSmallAndLight(Client):
|
|
|
100
90
|
self, seller_sku, **kwargs
|
|
101
91
|
) -> ApiResponse:
|
|
102
92
|
"""
|
|
103
|
-
|
|
104
|
-
|
|
93
|
+
delete_small_and_light_enrollment_by_seller_sku(self, seller_sku, **kwargs) -> ApiResponse
|
|
94
|
+
|
|
105
95
|
Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
2 5
|
|
113
|
-
====================================== ==============
|
|
114
|
-
|
|
115
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
116
|
-
|
|
96
|
+
|
|
97
|
+
Examples:
|
|
98
|
+
literal blocks::
|
|
99
|
+
|
|
100
|
+
FbaSmallAndLight().delete_small_and_light_enrollment_by_seller_sku("value")
|
|
101
|
+
|
|
117
102
|
Args:
|
|
118
|
-
seller_sku:
|
|
119
|
-
|
|
120
|
-
|
|
103
|
+
seller_sku: | required
|
|
104
|
+
**kwargs:
|
|
105
|
+
|
|
121
106
|
Returns:
|
|
122
|
-
ApiResponse
|
|
107
|
+
ApiResponse
|
|
123
108
|
"""
|
|
124
109
|
|
|
125
110
|
return self._request(
|
|
@@ -137,27 +122,21 @@ class FbaSmallAndLight(Client):
|
|
|
137
122
|
self, seller_sku, **kwargs
|
|
138
123
|
) -> ApiResponse:
|
|
139
124
|
"""
|
|
140
|
-
|
|
141
|
-
|
|
125
|
+
get_small_and_light_eligibility_by_seller_sku(self, seller_sku, **kwargs) -> ApiResponse
|
|
126
|
+
|
|
142
127
|
Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
====================================== ==============
|
|
150
|
-
2 10
|
|
151
|
-
====================================== ==============
|
|
152
|
-
|
|
153
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
154
|
-
|
|
128
|
+
|
|
129
|
+
Examples:
|
|
130
|
+
literal blocks::
|
|
131
|
+
|
|
132
|
+
FbaSmallAndLight().get_small_and_light_eligibility_by_seller_sku("value")
|
|
133
|
+
|
|
155
134
|
Args:
|
|
156
|
-
seller_sku:
|
|
157
|
-
|
|
158
|
-
|
|
135
|
+
seller_sku: | required
|
|
136
|
+
**kwargs:
|
|
137
|
+
|
|
159
138
|
Returns:
|
|
160
|
-
ApiResponse
|
|
139
|
+
ApiResponse
|
|
161
140
|
"""
|
|
162
141
|
|
|
163
142
|
return self._request(
|
|
@@ -168,37 +147,19 @@ class FbaSmallAndLight(Client):
|
|
|
168
147
|
def get_small_and_light_fee_preview(self, **kwargs) -> ApiResponse:
|
|
169
148
|
"""
|
|
170
149
|
get_small_and_light_fee_preview(self, **kwargs) -> ApiResponse
|
|
171
|
-
|
|
150
|
+
|
|
172
151
|
Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
====================================== ==============
|
|
180
|
-
1 3
|
|
181
|
-
====================================== ==============
|
|
182
|
-
|
|
183
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
184
|
-
|
|
152
|
+
|
|
153
|
+
Examples:
|
|
154
|
+
literal blocks::
|
|
155
|
+
|
|
156
|
+
FbaSmallAndLight().get_small_and_light_fee_preview()
|
|
157
|
+
|
|
185
158
|
Args:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
"marketplaceId": "string",
|
|
189
|
-
"items": [
|
|
190
|
-
{
|
|
191
|
-
"asin": "string",
|
|
192
|
-
"price": {
|
|
193
|
-
"currencyCode": "string",
|
|
194
|
-
"amount": 0
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
]
|
|
198
|
-
}
|
|
199
|
-
|
|
159
|
+
**kwargs:
|
|
160
|
+
|
|
200
161
|
Returns:
|
|
201
|
-
ApiResponse
|
|
162
|
+
ApiResponse
|
|
202
163
|
"""
|
|
203
164
|
|
|
204
165
|
return self._request(kwargs.pop("path"), data=kwargs)
|
sp_api/api/feeds/feeds.py
CHANGED
|
@@ -1,262 +1,92 @@
|
|
|
1
|
-
import
|
|
1
|
+
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import enum
|
|
4
|
+
from typing import Any, Literal, TYPE_CHECKING, overload
|
|
5
|
+
from sp_api.util.versioned_client import VersionedClientMeta
|
|
4
6
|
|
|
5
|
-
from sp_api.base import Client
|
|
6
|
-
from sp_api.util import should_add_marketplace
|
|
7
|
+
from sp_api.base import Client
|
|
7
8
|
|
|
9
|
+
from .feeds_2021_06_30 import FeedsV20210630
|
|
8
10
|
|
|
9
|
-
class Feeds(Client):
|
|
10
|
-
"""
|
|
11
|
-
Feeds SP-API Client
|
|
12
|
-
:link:
|
|
13
|
-
|
|
14
|
-
The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
@sp_endpoint("/feeds/2021-06-30/feeds", method="GET")
|
|
18
|
-
def get_feeds(self, **kwargs) -> ApiResponse:
|
|
19
|
-
"""
|
|
20
|
-
get_feeds(self, **kwargs) -> ApiResponse
|
|
21
|
-
|
|
22
|
-
Returns feed details for the feeds that match the filters that you specify.
|
|
23
|
-
|
|
24
|
-
Args:
|
|
25
|
-
key feedTypes:array | A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required.
|
|
26
|
-
key marketplaceIds:array | A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify.
|
|
27
|
-
key pageSize:integer | The maximum number of feeds to return in a single call.
|
|
28
|
-
key processingStatuses:array | A list of processing statuses used to filter feeds.
|
|
29
|
-
key createdSince:string | The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days.
|
|
30
|
-
key createdUntil:string | The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
|
|
31
|
-
key nextToken:string | A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Returns:
|
|
35
|
-
ApiResponse:
|
|
36
|
-
"""
|
|
37
|
-
|
|
38
|
-
add_marketplace = should_add_marketplace(kwargs, "nextToken")
|
|
39
|
-
return self._request(
|
|
40
|
-
kwargs.pop("path"), params=kwargs, add_marketplace=add_marketplace
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
def submit_feed(
|
|
44
|
-
self, feed_type, file, content_type="text/tsv", **kwargs
|
|
45
|
-
) -> [ApiResponse, ApiResponse]:
|
|
46
|
-
"""
|
|
47
|
-
submit_feed(self, feed_type: str, file: File or File like, content_type='text/tsv', **kwargs) -> [ApiResponse, ApiResponse]
|
|
48
|
-
Combines `create_feed_document` and `create_feed`, uploads the file and sends the feed to amazon.
|
|
49
|
-
|
|
50
|
-
**Usage Plan:**
|
|
51
|
-
|
|
52
|
-
====================================== ==============
|
|
53
|
-
Rate (requests per second) Burst
|
|
54
|
-
====================================== ==============
|
|
55
|
-
0.0083 15
|
|
56
|
-
====================================== ==============
|
|
57
|
-
|
|
58
|
-
Examples:
|
|
59
|
-
literal blocks::
|
|
60
|
-
|
|
61
|
-
feed = BytesIO
|
|
62
|
-
feed.write(<your feed>)
|
|
63
|
-
feed.seek(0)
|
|
64
|
-
Feeds().submit_feed('POST_FBA_INBOUND_CARTON_CONTENTS', feed, 'text/xml')
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
Args:
|
|
68
|
-
feed_type:
|
|
69
|
-
file:
|
|
70
|
-
content_type:
|
|
71
|
-
**kwargs:
|
|
72
|
-
|
|
73
|
-
Returns:
|
|
74
|
-
[ApiResponse:, ApiResponse:]
|
|
75
|
-
"""
|
|
76
|
-
document_response = self.create_feed_document(file, content_type)
|
|
77
|
-
return document_response, self.create_feed(
|
|
78
|
-
feed_type, document_response.payload.get("feedDocumentId"), **kwargs
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
@sp_endpoint("/feeds/2021-06-30/feeds", method="POST")
|
|
82
|
-
def create_feed(self, feed_type, input_feed_document_id, **kwargs) -> ApiResponse:
|
|
83
|
-
"""
|
|
84
|
-
create_feed(self, feed_type: str, input_feed_document_id: str, **kwargs) -> ApiResponse
|
|
85
|
-
|
|
86
|
-
Creates a feed. Call `create_feed_document` to upload the feed first.
|
|
87
|
-
`submit_feed` combines both.
|
|
88
|
-
|
|
89
|
-
**Usage Plan:**
|
|
90
|
-
|
|
91
|
-
====================================== ==============
|
|
92
|
-
Rate (requests per second) Burst
|
|
93
|
-
====================================== ==============
|
|
94
|
-
0.0083 15
|
|
95
|
-
====================================== ==============
|
|
96
|
-
|
|
97
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
98
|
-
|
|
99
|
-
Examples:
|
|
100
|
-
literal blocks::
|
|
101
|
-
|
|
102
|
-
Feeds().create_feed('POST_PRODUCT_DATA', '3d4e42b5-1d6e-44e8-a89c-2abfca0625bb',
|
|
103
|
-
marketplaceIds=["ATVPDKIKX0DER", "A1F83G8C2ARO7P"])
|
|
104
|
-
|
|
105
|
-
Args:
|
|
106
|
-
feed_type: https://github.com/amzn/selling-partner-api-docs/blob/main/references/feeds-api/feedtype-values.md
|
|
107
|
-
input_feed_document_id: str
|
|
108
|
-
**kwargs:
|
|
109
|
-
|
|
110
|
-
Returns:
|
|
111
|
-
ApiResponse:
|
|
112
|
-
"""
|
|
113
|
-
data = {
|
|
114
|
-
"feedType": feed_type,
|
|
115
|
-
"inputFeedDocumentId": input_feed_document_id,
|
|
116
|
-
**kwargs,
|
|
117
|
-
}
|
|
118
|
-
return self._request(kwargs.pop("path"), data=data)
|
|
119
11
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
cancel_feed(self, feedId, **kwargs) -> ApiResponse
|
|
12
|
+
class FeedsVersion(str, enum.Enum):
|
|
13
|
+
V_2021_06_30 = "2021-06-30"
|
|
14
|
+
LATEST = "2021-06-30"
|
|
124
15
|
|
|
125
|
-
Cancels the feed that you specify. Only feeds with processingStatus=IN_QUEUE can be cancelled. Cancelled feeds are returned in subsequent calls to the getFeed and getFeeds operations.
|
|
126
16
|
|
|
127
|
-
|
|
17
|
+
if TYPE_CHECKING:
|
|
128
18
|
|
|
129
|
-
|
|
19
|
+
class _FeedsMeta(VersionedClientMeta):
|
|
20
|
+
@overload
|
|
21
|
+
def __call__(
|
|
22
|
+
cls,
|
|
23
|
+
*args: Any,
|
|
24
|
+
version: Literal[FeedsVersion.V_2021_06_30, FeedsVersion.LATEST, "2021-06-30"],
|
|
25
|
+
**kwargs: Any,
|
|
26
|
+
) -> FeedsV20210630: ...
|
|
130
27
|
|
|
28
|
+
@overload
|
|
29
|
+
def __call__(
|
|
30
|
+
cls,
|
|
31
|
+
*args: Any,
|
|
32
|
+
version: None = None,
|
|
33
|
+
**kwargs: Any,
|
|
34
|
+
) -> FeedsV20210630: ...
|
|
131
35
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
36
|
+
@overload
|
|
37
|
+
def __call__(
|
|
38
|
+
cls,
|
|
39
|
+
*args: Any,
|
|
40
|
+
version: str | FeedsVersion,
|
|
41
|
+
**kwargs: Any,
|
|
42
|
+
) -> Client: ...
|
|
135
43
|
|
|
136
|
-
return self._request(fill_query_params(kwargs.pop("path"), feedId), data=kwargs)
|
|
137
44
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"""
|
|
141
|
-
get_feed(self, feedId, **kwargs) -> ApiResponse
|
|
45
|
+
else:
|
|
46
|
+
_FeedsMeta = VersionedClientMeta
|
|
142
47
|
|
|
143
|
-
Returns feed details (including the resultDocumentId, if available) for the feed that you specify.
|
|
144
48
|
|
|
145
|
-
|
|
49
|
+
class Feeds(Client, metaclass=_FeedsMeta):
|
|
50
|
+
"""Feeds API client.
|
|
146
51
|
|
|
147
|
-
|
|
52
|
+
This class dispatches to a versioned Feeds API client.
|
|
148
53
|
|
|
54
|
+
If you do not pass a version, the constructor returns the oldest supported implementation ("2021-06-30").
|
|
55
|
+
"""
|
|
149
56
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
upload_data = upload_data.encode("iso-8859-1")
|
|
187
|
-
except AttributeError:
|
|
188
|
-
pass
|
|
189
|
-
with httpx.Client() as client:
|
|
190
|
-
upload = client.put(
|
|
191
|
-
response.payload.get("url"),
|
|
192
|
-
content=upload_data,
|
|
193
|
-
headers={"Content-Type": content_type},
|
|
194
|
-
)
|
|
195
|
-
if 200 <= upload.status_code < 300:
|
|
196
|
-
return response
|
|
197
|
-
from sp_api.base.exceptions import SellingApiException
|
|
198
|
-
|
|
199
|
-
raise SellingApiException(
|
|
200
|
-
headers=upload.headers, error=upload.json().get("errors")
|
|
201
|
-
)
|
|
202
|
-
|
|
203
|
-
@sp_endpoint("/feeds/2021-06-30/documents/{}", method="GET")
|
|
204
|
-
def get_feed_document(self, feedDocumentId, **kwargs) -> str:
|
|
205
|
-
"""
|
|
206
|
-
get_feed_document(self, feedDocumentId, **kwargs) -> ApiResponse
|
|
207
|
-
|
|
208
|
-
Returns the information required for retrieving a feed document's contents.
|
|
209
|
-
|
|
210
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
211
|
-
|
|
212
|
-
Args:
|
|
213
|
-
|
|
214
|
-
feedDocumentId:string | * REQUIRED The identifier of the feed document.
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
Returns:
|
|
218
|
-
ApiResponse:
|
|
219
|
-
"""
|
|
220
|
-
|
|
221
|
-
return self.get_feed_result_document(feedDocumentId)
|
|
222
|
-
|
|
223
|
-
@sp_endpoint("/feeds/2021-06-30/documents/{}", method="GET")
|
|
224
|
-
def get_feed_result_document(self, feedDocumentId, **kwargs) -> str:
|
|
225
|
-
"""
|
|
226
|
-
get_feed_result_document(self, feedDocumentId, **kwargs) -> str
|
|
227
|
-
|
|
228
|
-
Returns the feed result document's contents. First fetches from `getFeedDocument` endpont and then fetchs from the URL returned from it.
|
|
229
|
-
|
|
230
|
-
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
231
|
-
|
|
232
|
-
Args:
|
|
233
|
-
feedDocumentId: str
|
|
234
|
-
**kwargs:
|
|
235
|
-
|
|
236
|
-
Returns:
|
|
237
|
-
str:
|
|
238
|
-
"""
|
|
239
|
-
response = self._request(
|
|
240
|
-
fill_query_params(kwargs.pop("path"), feedDocumentId),
|
|
241
|
-
params=kwargs,
|
|
242
|
-
add_marketplace=False,
|
|
243
|
-
)
|
|
244
|
-
url = response.payload.get("url")
|
|
245
|
-
with httpx.Client() as client:
|
|
246
|
-
doc_response = client.get(url)
|
|
247
|
-
|
|
248
|
-
encoding = (
|
|
249
|
-
doc_response.encoding
|
|
250
|
-
if doc_response and doc_response.encoding
|
|
251
|
-
else "iso-8859-1"
|
|
252
|
-
)
|
|
253
|
-
if encoding.lower() == "windows-31j":
|
|
254
|
-
encoding = "cp932"
|
|
255
|
-
|
|
256
|
-
content = doc_response.content
|
|
257
|
-
if "compressionAlgorithm" in response.payload:
|
|
258
|
-
try:
|
|
259
|
-
return zlib.decompress(bytearray(content), 15 + 32).decode(encoding)
|
|
260
|
-
except Exception:
|
|
261
|
-
return content.decode(encoding)
|
|
262
|
-
return content.decode(encoding)
|
|
57
|
+
if TYPE_CHECKING:
|
|
58
|
+
@overload
|
|
59
|
+
def __new__(
|
|
60
|
+
cls,
|
|
61
|
+
*args: Any,
|
|
62
|
+
version: Literal[FeedsVersion.V_2021_06_30, FeedsVersion.LATEST, "2021-06-30"],
|
|
63
|
+
**kwargs: Any,
|
|
64
|
+
) -> FeedsV20210630: ...
|
|
65
|
+
|
|
66
|
+
@overload
|
|
67
|
+
def __new__(
|
|
68
|
+
cls,
|
|
69
|
+
*args: Any,
|
|
70
|
+
version: None = None,
|
|
71
|
+
**kwargs: Any,
|
|
72
|
+
) -> FeedsV20210630: ...
|
|
73
|
+
|
|
74
|
+
@overload
|
|
75
|
+
def __new__(
|
|
76
|
+
cls,
|
|
77
|
+
*args: Any,
|
|
78
|
+
version: str | FeedsVersion,
|
|
79
|
+
**kwargs: Any,
|
|
80
|
+
) -> Client: ...
|
|
81
|
+
|
|
82
|
+
_DISPATCH = True
|
|
83
|
+
|
|
84
|
+
_DEFAULT_VERSION = "2021-06-30"
|
|
85
|
+
|
|
86
|
+
_VERSION_MAP = {
|
|
87
|
+
"2021-06-30": FeedsV20210630,
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
_VERSION_ALIASES = {
|
|
91
|
+
"2021-06-30": "2021-06-30",
|
|
92
|
+
}
|