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
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import urllib
|
|
2
|
+
|
|
3
|
+
from sp_api.base import Client, Marketplaces, sp_endpoint, ApiResponse
|
|
4
|
+
from sp_api.asyncio.base import AsyncBaseClient
|
|
5
|
+
from sp_api.base.InventoryEnums import InventoryGranularity
|
|
6
|
+
from sp_api.util import normalize_csv_param
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Inventories(AsyncBaseClient):
|
|
10
|
+
"""
|
|
11
|
+
:link: https://github.com/amzn/selling-partner-api-docs/blob/main/references/fba-inventory-api/fbaInventory.md#getinventorysummaries
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
@sp_endpoint("/fba/inventory/v1/summaries")
|
|
15
|
+
async def get_inventory_summary_marketplace(self, **kwargs) -> ApiResponse:
|
|
16
|
+
"""
|
|
17
|
+
get_inventory_summary_marketplace(self, **kwargs) -> GetInventorySummariesResponse
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters:
|
|
21
|
+
|
|
22
|
+
- All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted.
|
|
23
|
+
- When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored.
|
|
24
|
+
- When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus.
|
|
25
|
+
|
|
26
|
+
**Usage Plan:**
|
|
27
|
+
|
|
28
|
+
====================================== ==============
|
|
29
|
+
Rate (requests per second) Burst
|
|
30
|
+
====================================== ==============
|
|
31
|
+
2 2
|
|
32
|
+
====================================== ==============
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
36
|
+
|
|
37
|
+
All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted.
|
|
38
|
+
When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored.
|
|
39
|
+
When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus.
|
|
40
|
+
Usage Plan:
|
|
41
|
+
|
|
42
|
+
Examples:
|
|
43
|
+
literal blocks::
|
|
44
|
+
|
|
45
|
+
Inventories().get_inventory_summary_marketplace(**{
|
|
46
|
+
"details": True,
|
|
47
|
+
"marketplaceIds": ["ATVPDKIKX0DER"]
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
key details: bool | true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). boolean "false"
|
|
52
|
+
key granularityType: Granularity Type | The granularity type for the inventory aggregation level. enum (GranularityType) -
|
|
53
|
+
key granularityId: str The granularity ID for the inventory aggregation level. string -
|
|
54
|
+
key startDateTime: datetime | A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. string (date-time) -
|
|
55
|
+
key sellerSkus: [str] | A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs.
|
|
56
|
+
key nextToken: str | String token returned in the response of your previous request. string -
|
|
57
|
+
key marketplaceIds: str | The marketplace ID for the marketplace for which to return inventory summaries.
|
|
58
|
+
|
|
59
|
+
Returns:
|
|
60
|
+
GetInventorySummariesResponse:
|
|
61
|
+
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
kwargs.update(
|
|
65
|
+
{
|
|
66
|
+
"granularityType": kwargs.get(
|
|
67
|
+
"granularityType", InventoryGranularity.MARKETPLACE.value
|
|
68
|
+
),
|
|
69
|
+
"granularityId": kwargs.get("granularityId", self.marketplace_id),
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
normalize_csv_param(kwargs, "sellerSkus")
|
|
73
|
+
|
|
74
|
+
return await self._request(kwargs.pop("path"), params=kwargs)
|
|
File without changes
|
|
@@ -0,0 +1,170 @@
|
|
|
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
|
|
9
|
+
from sp_api.asyncio.base import AsyncBaseClient
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ListingsItems(AsyncBaseClient):
|
|
13
|
+
"""
|
|
14
|
+
ListingsItems SP-API Client
|
|
15
|
+
:link:
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
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).
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
@sp_endpoint("/listings/2021-08-01/items/{}/{}", method="DELETE")
|
|
23
|
+
async def delete_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse:
|
|
24
|
+
"""
|
|
25
|
+
delete_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse
|
|
26
|
+
Delete a listings item for a selling partner.
|
|
27
|
+
**Usage Plans:**
|
|
28
|
+
====================================== ==============
|
|
29
|
+
Rate (requests per second) Burst
|
|
30
|
+
====================================== ==============
|
|
31
|
+
5 10
|
|
32
|
+
====================================== ==============
|
|
33
|
+
The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
34
|
+
Args:
|
|
35
|
+
sellerId:string | * REQUIRED A selling partner identifier, such as a merchant account or vendor code.
|
|
36
|
+
sku:string | * REQUIRED A selling partner provided identifier for an Amazon listing.
|
|
37
|
+
key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
38
|
+
key issueLocale:string | A locale for localization of issues. 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.
|
|
39
|
+
Returns:
|
|
40
|
+
ApiResponse:
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
return await self._request(
|
|
44
|
+
fill_query_params(kwargs.pop("path"), sellerId, sku), data=kwargs
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
@sp_endpoint("/listings/2021-08-01/items/{}/{}", method="GET")
|
|
48
|
+
async def get_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse:
|
|
49
|
+
"""
|
|
50
|
+
get_listings_item(self, sellerId, **kwargs) -> ApiResponse
|
|
51
|
+
Returns details about a listings item for a selling partner.
|
|
52
|
+
**Usage Plan:**
|
|
53
|
+
====================================== ==============
|
|
54
|
+
Rate (requests per second) Burst
|
|
55
|
+
====================================== ==============
|
|
56
|
+
5 10
|
|
57
|
+
====================================== ==============
|
|
58
|
+
The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).
|
|
59
|
+
Args:
|
|
60
|
+
sellerId:string | * REQUIRED A selling partner identifier, such as a merchant account or vendor code
|
|
61
|
+
sku:string | * REQUIRED A selling partner provided identifier for an Amazon listing.
|
|
62
|
+
key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
63
|
+
key issueLocale:string | A locale for localization of issues. 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.
|
|
64
|
+
key includedData:array | A comma-delimited list of data sets to include in the response. Default: summaries.
|
|
65
|
+
Returns:
|
|
66
|
+
ApiResponse:
|
|
67
|
+
"""
|
|
68
|
+
normalize_included_data(kwargs, enum_cls=IncludedData)
|
|
69
|
+
|
|
70
|
+
return await self._request(
|
|
71
|
+
fill_query_params(kwargs.pop("path"), sellerId, sku), params=kwargs
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
@sp_endpoint("/listings/2021-08-01/items/{}", method="GET")
|
|
75
|
+
async def search_listings_items(self, sellerId, **kwargs) -> ApiResponse:
|
|
76
|
+
"""
|
|
77
|
+
search_listings_items(self, sellerId, **kwargs) -> ApiResponse
|
|
78
|
+
Search for and return list of listings items and respective details for a selling partner.
|
|
79
|
+
**Usage Plan:**
|
|
80
|
+
====================================== ==============
|
|
81
|
+
Rate (requests per second) Burst
|
|
82
|
+
====================================== ==============
|
|
83
|
+
5 5
|
|
84
|
+
====================================== ==============
|
|
85
|
+
The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).
|
|
86
|
+
Args:
|
|
87
|
+
sellerId:string | * REQUIRED A selling partner identifier, such as a merchant account or vendor code
|
|
88
|
+
key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
89
|
+
key issueLocale:string | A locale for localization of issues. 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.
|
|
90
|
+
key includedData:array | A comma-delimited list of data sets to include in the response. Default: summaries.
|
|
91
|
+
Returns:
|
|
92
|
+
ApiResponse:
|
|
93
|
+
"""
|
|
94
|
+
normalize_included_data(kwargs, enum_cls=IncludedData)
|
|
95
|
+
|
|
96
|
+
return await self._request(
|
|
97
|
+
fill_query_params(kwargs.pop("path"), sellerId), params=kwargs
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
@sp_endpoint("/listings/2021-08-01/items/{}/{}", method="PATCH")
|
|
101
|
+
async def patch_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse:
|
|
102
|
+
"""
|
|
103
|
+
patch_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse
|
|
104
|
+
Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported.
|
|
105
|
+
**Usage Plans:**
|
|
106
|
+
====================================== ==============
|
|
107
|
+
Rate (requests per second) Burst
|
|
108
|
+
====================================== ==============
|
|
109
|
+
5 10
|
|
110
|
+
====================================== ==============
|
|
111
|
+
The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
112
|
+
Args:
|
|
113
|
+
sellerId:string | * REQUIRED A selling partner identifier, such as a merchant account or vendor code.
|
|
114
|
+
sku:string | * REQUIRED A selling partner provided identifier for an Amazon listing.
|
|
115
|
+
key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
116
|
+
key issueLocale:string | A locale for localization of issues. 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.
|
|
117
|
+
body: {
|
|
118
|
+
"productType": "string",
|
|
119
|
+
"patches": [
|
|
120
|
+
{
|
|
121
|
+
"op": "add",
|
|
122
|
+
"path": "string",
|
|
123
|
+
"value": [
|
|
124
|
+
{}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
ApiResponse:
|
|
132
|
+
"""
|
|
133
|
+
return await self._request(
|
|
134
|
+
fill_query_params(kwargs.pop("path"), sellerId, sku),
|
|
135
|
+
data=kwargs.pop("body"),
|
|
136
|
+
params=kwargs,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
@sp_endpoint("/listings/2021-08-01/items/{}/{}", method="PUT")
|
|
140
|
+
async def put_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse:
|
|
141
|
+
"""
|
|
142
|
+
put_listings_item(self, sellerId, sku, **kwargs) -> ApiResponse
|
|
143
|
+
Creates a new or fully-updates an existing listings item for a selling partner.
|
|
144
|
+
**Usage Plans:**
|
|
145
|
+
====================================== ==============
|
|
146
|
+
Rate (requests per second) Burst
|
|
147
|
+
====================================== ==============
|
|
148
|
+
5 10
|
|
149
|
+
====================================== ==============
|
|
150
|
+
The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
151
|
+
Args:
|
|
152
|
+
sellerId:string | * REQUIRED A selling partner identifier, such as a merchant account or vendor code.
|
|
153
|
+
sku:string | * REQUIRED A selling partner provided identifier for an Amazon listing.
|
|
154
|
+
key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
155
|
+
key issueLocale:string | A locale for localization of issues. 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.
|
|
156
|
+
body: {
|
|
157
|
+
"productType": "string",
|
|
158
|
+
"requirements": "LISTING",
|
|
159
|
+
"attributes": {}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
Returns:
|
|
163
|
+
ApiResponse:
|
|
164
|
+
"""
|
|
165
|
+
|
|
166
|
+
return await self._request(
|
|
167
|
+
fill_query_params(kwargs.pop("path"), sellerId, sku),
|
|
168
|
+
data=kwargs.pop("body"),
|
|
169
|
+
params=kwargs,
|
|
170
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import urllib.parse
|
|
2
|
+
|
|
3
|
+
from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
|
|
4
|
+
from sp_api.asyncio.base import AsyncBaseClient
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ListingsRestrictions(AsyncBaseClient):
|
|
8
|
+
"""
|
|
9
|
+
ListingsRestrictions SP-API Client
|
|
10
|
+
|
|
11
|
+
The Selling Partner API for Listings Restrictions provides programmatic access to restrictions on Amazon catalog listings.
|
|
12
|
+
|
|
13
|
+
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).
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
@sp_endpoint("/listings/2021-08-01/restrictions", method="GET")
|
|
17
|
+
async def get_listings_restrictions(self, **kwargs) -> ApiResponse:
|
|
18
|
+
"""
|
|
19
|
+
get_listings_restrictions(self, **kwargs) -> ApiResponse
|
|
20
|
+
|
|
21
|
+
Returns listing restrictions for an item in the Amazon Catalog.
|
|
22
|
+
|
|
23
|
+
Args:
|
|
24
|
+
|
|
25
|
+
key asin:string | * REQUIRED The Amazon Standard Identification Number (ASIN) of the item.
|
|
26
|
+
key conditionType:string | The condition used to filter restrictions.
|
|
27
|
+
key sellerId:string | * REQUIRED A selling partner identifier, such as a merchant account.
|
|
28
|
+
key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
29
|
+
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.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
ApiResponse
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
return await self._request(kwargs.pop("path"), params=kwargs)
|
|
File without changes
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
|
|
2
|
+
from sp_api.asyncio.base import AsyncBaseClient
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class MerchantFulfillment(AsyncBaseClient):
|
|
6
|
+
"""
|
|
7
|
+
:link: https://github.com/amzn/selling-partner-api-docs/blob/main/references/merchant-fulfillment-api/merchantFulfillmentV0.md
|
|
8
|
+
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
@sp_endpoint("/mfn/v0/eligibleServices", method="POST")
|
|
12
|
+
async def get_eligible_shipment_services_old(
|
|
13
|
+
self, shipment_request_details: dict, **kwargs
|
|
14
|
+
) -> ApiResponse:
|
|
15
|
+
"""
|
|
16
|
+
get_eligible_shipment_services_old(self, shipment_request_details: dict, **kwargs) -> ApiResponse
|
|
17
|
+
Returns a list of shipping service offers that satisfy the specified shipment request details.
|
|
18
|
+
|
|
19
|
+
**Usage Plan:**
|
|
20
|
+
|
|
21
|
+
====================================== ==============
|
|
22
|
+
Rate (requests per second) Burst
|
|
23
|
+
====================================== ==============
|
|
24
|
+
1 1
|
|
25
|
+
====================================== ==============
|
|
26
|
+
|
|
27
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
28
|
+
|
|
29
|
+
Examples:
|
|
30
|
+
literal blocks::
|
|
31
|
+
|
|
32
|
+
MerchantFulfillment().get_eligible_shipment_services_old({
|
|
33
|
+
"AmazonOrderId": "903-5563053-5647845",
|
|
34
|
+
"ItemList": [
|
|
35
|
+
{
|
|
36
|
+
"OrderItemId": "52986411826454",
|
|
37
|
+
"Quantity": 1
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"ShipFromAddress": {
|
|
41
|
+
"Name": "John Doe",
|
|
42
|
+
"AddressLine1": "300 Turnbull Ave",
|
|
43
|
+
"Email": "jdoeasdfllkj@yahoo.com",
|
|
44
|
+
"City": "Detroit",
|
|
45
|
+
"StateOrProvinceCode": "MI",
|
|
46
|
+
"PostalCode": "48123",
|
|
47
|
+
"CountryCode": "US",
|
|
48
|
+
"Phone": "7132341234"
|
|
49
|
+
},
|
|
50
|
+
"PackageDimensions": {
|
|
51
|
+
"Length": 10,
|
|
52
|
+
"Width": 10,
|
|
53
|
+
"Height": 10,
|
|
54
|
+
"Unit": "inches"
|
|
55
|
+
},
|
|
56
|
+
"Weight": {
|
|
57
|
+
"Value": 10,
|
|
58
|
+
"Unit": "oz"
|
|
59
|
+
},
|
|
60
|
+
"ShippingServiceOptions": {
|
|
61
|
+
"DeliveryExperience": "NoTracking",
|
|
62
|
+
"CarrierWillPickUp": False,
|
|
63
|
+
"CarrierWillPickUpOption": "ShipperWillDropOff"
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
Args:
|
|
68
|
+
shipment_request_details: dict:
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
GetEligibleShipmentServicesResponse:
|
|
72
|
+
"""
|
|
73
|
+
# GetEligibleShipmentServicesRequest
|
|
74
|
+
data = {"ShipmentRequestDetails": shipment_request_details, **kwargs}
|
|
75
|
+
|
|
76
|
+
return await self._request(kwargs.pop("path"), data=data)
|
|
77
|
+
|
|
78
|
+
@sp_endpoint("/mfn/v0/eligibleShippingServices", method="POST")
|
|
79
|
+
async def get_eligible_shipment_services(
|
|
80
|
+
self, shipment_request_details: dict, **kwargs
|
|
81
|
+
) -> ApiResponse:
|
|
82
|
+
"""
|
|
83
|
+
get_eligible_shipment_services(self, shipment_request_details: dict, **kwargs) -> ApiResponse
|
|
84
|
+
Returns a list of shipping service offers that satisfy the specified shipment request details.
|
|
85
|
+
|
|
86
|
+
**Usage Plan:**
|
|
87
|
+
|
|
88
|
+
====================================== ==============
|
|
89
|
+
Rate (requests per second) Burst
|
|
90
|
+
====================================== ==============
|
|
91
|
+
1 1
|
|
92
|
+
====================================== ==============
|
|
93
|
+
|
|
94
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
95
|
+
|
|
96
|
+
Examples:
|
|
97
|
+
literal blocks::
|
|
98
|
+
|
|
99
|
+
MerchantFulfillment().get_eligible_shipment_services({
|
|
100
|
+
"AmazonOrderId": "903-5563053-5647845",
|
|
101
|
+
"ItemList": [
|
|
102
|
+
{
|
|
103
|
+
"OrderItemId": "52986411826454",
|
|
104
|
+
"Quantity": 1
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"ShipFromAddress": {
|
|
108
|
+
"Name": "John Doe",
|
|
109
|
+
"AddressLine1": "300 Turnbull Ave",
|
|
110
|
+
"Email": "jdoeasdfllkj@yahoo.com",
|
|
111
|
+
"City": "Detroit",
|
|
112
|
+
"StateOrProvinceCode": "MI",
|
|
113
|
+
"PostalCode": "48123",
|
|
114
|
+
"CountryCode": "US",
|
|
115
|
+
"Phone": "7132341234"
|
|
116
|
+
},
|
|
117
|
+
"PackageDimensions": {
|
|
118
|
+
"Length": 10,
|
|
119
|
+
"Width": 10,
|
|
120
|
+
"Height": 10,
|
|
121
|
+
"Unit": "inches"
|
|
122
|
+
},
|
|
123
|
+
"Weight": {
|
|
124
|
+
"Value": 10,
|
|
125
|
+
"Unit": "oz"
|
|
126
|
+
},
|
|
127
|
+
"ShippingServiceOptions": {
|
|
128
|
+
"DeliveryExperience": "NoTracking",
|
|
129
|
+
"CarrierWillPickUp": False,
|
|
130
|
+
"CarrierWillPickUpOption": "ShipperWillDropOff"
|
|
131
|
+
}
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
shipment_request_details: dict:
|
|
136
|
+
|
|
137
|
+
Returns:
|
|
138
|
+
GetEligibleShipmentServicesResponse:
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
# GetEligibleShipmentServicesRequest
|
|
142
|
+
data = {"ShipmentRequestDetails": shipment_request_details, **kwargs}
|
|
143
|
+
|
|
144
|
+
return await self._request(kwargs.pop("path"), data=data)
|
|
145
|
+
|
|
146
|
+
@sp_endpoint("/mfn/v0/shipments/{}")
|
|
147
|
+
async def get_shipment(self, shipment_id: str, **kwargs) -> ApiResponse:
|
|
148
|
+
"""
|
|
149
|
+
get_shipment(self, shipmentId:str) -> ApiResponse
|
|
150
|
+
Returns a specified item and its attributes.
|
|
151
|
+
|
|
152
|
+
**Usage Plan:**
|
|
153
|
+
|
|
154
|
+
====================================== ==============
|
|
155
|
+
Rate (requests per second) Burst
|
|
156
|
+
====================================== ==============
|
|
157
|
+
1 1
|
|
158
|
+
====================================== ==============
|
|
159
|
+
|
|
160
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
161
|
+
|
|
162
|
+
Examples:
|
|
163
|
+
literal blocks::
|
|
164
|
+
|
|
165
|
+
MerchantFulfillment().get_shipment("abcddcba-00c3-4f6f-a63a-639f76ee9253")
|
|
166
|
+
|
|
167
|
+
Args:
|
|
168
|
+
shipment_id: str:
|
|
169
|
+
|
|
170
|
+
Returns:
|
|
171
|
+
GetShipmentResponse:
|
|
172
|
+
"""
|
|
173
|
+
return await self._request(
|
|
174
|
+
fill_query_params(kwargs.pop("path"), shipment_id),
|
|
175
|
+
params=kwargs,
|
|
176
|
+
add_marketplace=False,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
@sp_endpoint("/mfn/v0/shipments/{}", method="DELETE")
|
|
180
|
+
async def cancel_shipment(self, shipment_id: str, **kwargs) -> ApiResponse:
|
|
181
|
+
"""
|
|
182
|
+
cancel_shipment(self, shipment_id: str, **kwargs) -> ApiResponse
|
|
183
|
+
Cancel the shipment indicated by the specified shipment identifier.
|
|
184
|
+
|
|
185
|
+
**Usage Plan:**
|
|
186
|
+
|
|
187
|
+
====================================== ==============
|
|
188
|
+
Rate (requests per second) Burst
|
|
189
|
+
====================================== ==============
|
|
190
|
+
1 1
|
|
191
|
+
====================================== ==============
|
|
192
|
+
|
|
193
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
194
|
+
|
|
195
|
+
Args:
|
|
196
|
+
shipment_id: str:
|
|
197
|
+
|
|
198
|
+
Returns:
|
|
199
|
+
CancelShipmentResponse:
|
|
200
|
+
"""
|
|
201
|
+
return await self._request(
|
|
202
|
+
fill_query_params(kwargs.pop("path"), shipment_id),
|
|
203
|
+
params=kwargs,
|
|
204
|
+
add_marketplace=False,
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
@sp_endpoint("/mfn/v0/shipments/{}/cancel", method="PUT")
|
|
208
|
+
async def cancel_shipment_old(self, shipment_id: str, **kwargs) -> ApiResponse:
|
|
209
|
+
"""
|
|
210
|
+
cancel_shipment_old(self, shipment_id: str, **kwargs) -> ApiResponse
|
|
211
|
+
Cancel the shipment indicated by the specified shipment identifer.
|
|
212
|
+
|
|
213
|
+
**Usage Plan:**
|
|
214
|
+
|
|
215
|
+
====================================== ==============
|
|
216
|
+
Rate (requests per second) Burst
|
|
217
|
+
====================================== ==============
|
|
218
|
+
1 1
|
|
219
|
+
====================================== ==============
|
|
220
|
+
|
|
221
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
222
|
+
|
|
223
|
+
Args:
|
|
224
|
+
shipment_id: str:
|
|
225
|
+
|
|
226
|
+
Returns:
|
|
227
|
+
CancelShipmentResponse:
|
|
228
|
+
"""
|
|
229
|
+
return await self._request(
|
|
230
|
+
fill_query_params(kwargs.pop("path"), shipment_id),
|
|
231
|
+
params=kwargs,
|
|
232
|
+
add_marketplace=False,
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
@sp_endpoint("/mfn/v0/shipments", method="POST")
|
|
236
|
+
async def create_shipment(
|
|
237
|
+
self, shipment_request_details: dict, shipping_service_id: str, **kwargs
|
|
238
|
+
) -> ApiResponse:
|
|
239
|
+
"""
|
|
240
|
+
create_shipment(self, shipment_request_details: dict, shipping_service_id: str, **kwargs) -> ApiResponse
|
|
241
|
+
Create a shipment with the information provided.
|
|
242
|
+
|
|
243
|
+
**Usage Plan:**
|
|
244
|
+
|
|
245
|
+
====================================== ==============
|
|
246
|
+
Rate (requests per second) Burst
|
|
247
|
+
====================================== ==============
|
|
248
|
+
1 1
|
|
249
|
+
====================================== ==============
|
|
250
|
+
|
|
251
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
252
|
+
|
|
253
|
+
Examples:
|
|
254
|
+
literal blocks::
|
|
255
|
+
|
|
256
|
+
MerchantFulfillment().create_shipment(
|
|
257
|
+
shipment_request_details={
|
|
258
|
+
"AmazonOrderId": "903-5563053-5647845",
|
|
259
|
+
"ItemList": [
|
|
260
|
+
{
|
|
261
|
+
"OrderItemId": "52986411826454",
|
|
262
|
+
"Quantity": 1
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
"ShipFromAddress": {
|
|
266
|
+
"Name": "John Doe",
|
|
267
|
+
"AddressLine1": "300 Turnbull Ave",
|
|
268
|
+
"Email": "jdoeasdfllkj@yahoo.com",
|
|
269
|
+
"City": "Detroit",
|
|
270
|
+
"StateOrProvinceCode": "MI",
|
|
271
|
+
"PostalCode": "48123",
|
|
272
|
+
"CountryCode": "US",
|
|
273
|
+
"Phone": "7132341234"
|
|
274
|
+
},
|
|
275
|
+
"PackageDimensions": {
|
|
276
|
+
"Length": 10,
|
|
277
|
+
"Width": 10,
|
|
278
|
+
"Height": 10,
|
|
279
|
+
"Unit": "inches"
|
|
280
|
+
},
|
|
281
|
+
"Weight": {
|
|
282
|
+
"Value": 10,
|
|
283
|
+
"Unit": "oz"
|
|
284
|
+
},
|
|
285
|
+
"ShippingServiceOptions": {
|
|
286
|
+
"DeliveryExperience": "NoTracking",
|
|
287
|
+
"CarrierWillPickUp": False,
|
|
288
|
+
"CarrierWillPickUpOption": "ShipperWillDropOff"
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
shipping_service_id="UPS_PTP_2ND_DAY_AIR",
|
|
292
|
+
ShippingServiceOfferId="WHgxtyn6qjGGaCzOCog1azF5HLHje5Pz3Lc2Fmt5eKoZAReW8oJ1SMumuBS8lA/Hjuglhyiu0"
|
|
293
|
+
"+KRLvyJxFV0PB9YFMDhygs3VyTL0WGYkGxiuRkmuEvpqldUn9rrkWVodqnR4vx2VtXvtER"
|
|
294
|
+
"/Ju6RqYoddJZGy6RS2KLzzhQ2NclN0NYXMZVqpOe5RsRBddXaGuJr7oza3M52"
|
|
295
|
+
"+JzChocAHzcurIhCRynpbxfmNLzZMQEbgnpGLzuaoSMzfxg90/NaXFR/Ou01du/uKd5AbfMW"
|
|
296
|
+
"/AxAKP9ht6Oi9lDHq6WkGqvjkVLW0/jj/fBgblIwcs+t"
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
Args:
|
|
300
|
+
shipment_request_details: dict
|
|
301
|
+
shipping_service_id: str:
|
|
302
|
+
Returns:
|
|
303
|
+
CreateShipmentResponse:
|
|
304
|
+
"""
|
|
305
|
+
|
|
306
|
+
# CreateShipmentRequest
|
|
307
|
+
data = {
|
|
308
|
+
"ShipmentRequestDetails": shipment_request_details,
|
|
309
|
+
"ShippingServiceId": shipping_service_id,
|
|
310
|
+
**kwargs,
|
|
311
|
+
}
|
|
312
|
+
return await self._request(kwargs.pop("path"), data=data, add_marketplace=False)
|
|
313
|
+
|
|
314
|
+
@sp_endpoint("/mfn/v0/sellerInputs", method="POST")
|
|
315
|
+
async def get_additional_seller_inputs_old(
|
|
316
|
+
self, shipping_service_id: str, ship_from_address: dict, order_id: str, **kwargs
|
|
317
|
+
) -> ApiResponse:
|
|
318
|
+
"""
|
|
319
|
+
get_additional_seller_inputs_old(self, shipping_service_id: str, ship_from_address: dict, order_id: str,
|
|
320
|
+
**kwargs) -> ApiResponse
|
|
321
|
+
Get a list of additional seller inputs required for a ship method. This is generally
|
|
322
|
+
used for international shipping.
|
|
323
|
+
|
|
324
|
+
**Usage Plan:**
|
|
325
|
+
|
|
326
|
+
====================================== ==============
|
|
327
|
+
Rate (requests per second) Burst
|
|
328
|
+
====================================== ==============
|
|
329
|
+
1 1
|
|
330
|
+
====================================== ==============
|
|
331
|
+
|
|
332
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
333
|
+
|
|
334
|
+
Args:
|
|
335
|
+
shipping_service_id: str
|
|
336
|
+
ship_from_address: dict
|
|
337
|
+
order_id: str:
|
|
338
|
+
Returns:
|
|
339
|
+
GetAdditionalSellerInputsResponse:
|
|
340
|
+
"""
|
|
341
|
+
|
|
342
|
+
# GetAdditionalSellerInputsRequest
|
|
343
|
+
data = {
|
|
344
|
+
"ShippingServiceId": shipping_service_id,
|
|
345
|
+
"ShipFromAddress": ship_from_address,
|
|
346
|
+
"OrderId": order_id,
|
|
347
|
+
}
|
|
348
|
+
return await self._request(kwargs.pop("path"), data=data, add_marketplace=False)
|
|
349
|
+
|
|
350
|
+
@sp_endpoint("/mfn/v0/additionalSellerInputs", method="POST")
|
|
351
|
+
async def get_additional_seller_inputs(
|
|
352
|
+
self, shipping_service_id: str, ship_from_address: dict, order_id: str, **kwargs
|
|
353
|
+
) -> ApiResponse:
|
|
354
|
+
"""
|
|
355
|
+
get_additional_seller_inputs(self, shipping_service_id: str, ship_from_address: dict, order_id: str,
|
|
356
|
+
**kwargs) -> ApiResponse
|
|
357
|
+
Gets a list of additional seller inputs required for a ship method. This is
|
|
358
|
+
generally used for international shipping.
|
|
359
|
+
|
|
360
|
+
**Usage Plan:**
|
|
361
|
+
|
|
362
|
+
====================================== ==============
|
|
363
|
+
Rate (requests per second) Burst
|
|
364
|
+
====================================== ==============
|
|
365
|
+
1 1
|
|
366
|
+
====================================== ==============
|
|
367
|
+
|
|
368
|
+
For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
|
|
369
|
+
|
|
370
|
+
Args:
|
|
371
|
+
shipping_service_id: str
|
|
372
|
+
ship_from_address: dict
|
|
373
|
+
order_id: str:
|
|
374
|
+
Returns:
|
|
375
|
+
GetAdditionalSellerInputsResponse:
|
|
376
|
+
"""
|
|
377
|
+
|
|
378
|
+
# GetAdditionalSellerInputsRequest
|
|
379
|
+
data = {
|
|
380
|
+
"ShippingServiceId": shipping_service_id,
|
|
381
|
+
"ShipFromAddress": ship_from_address,
|
|
382
|
+
"OrderId": order_id,
|
|
383
|
+
}
|
|
384
|
+
return await self._request(kwargs.pop("path"), data=data, add_marketplace=False)
|