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
|
@@ -12,112 +12,118 @@ class AmazonWarehousingAndDistributionVersion(str, enum.Enum):
|
|
|
12
12
|
class AmazonWarehousingAndDistribution(Client):
|
|
13
13
|
"""
|
|
14
14
|
AmazonWarehousingAndDistribu SP-API Client
|
|
15
|
-
:link:
|
|
15
|
+
:link:
|
|
16
16
|
|
|
17
17
|
The Selling Partner API for Amazon Warehousing and Distribution (AWD).
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
version: AmazonWarehousingAndDistributionVersion =
|
|
20
|
+
version: AmazonWarehousingAndDistributionVersion = (
|
|
21
|
+
AmazonWarehousingAndDistributionVersion.V_2024_05_09
|
|
22
|
+
)
|
|
21
23
|
|
|
22
24
|
def __init__(self, *args, **kwargs):
|
|
23
|
-
if
|
|
24
|
-
self.version = kwargs.get(
|
|
25
|
-
|
|
25
|
+
if "version" in kwargs:
|
|
26
|
+
self.version = kwargs.get(
|
|
27
|
+
"version", AmazonWarehousingAndDistributionVersion.V_2024_05_09
|
|
28
|
+
)
|
|
29
|
+
super().__init__(*args, **{**kwargs, "version": self.version})
|
|
26
30
|
|
|
27
|
-
@sp_endpoint(
|
|
31
|
+
@sp_endpoint("/awd/<version>/inboundShipments/{}", method="GET")
|
|
28
32
|
def get_inbound_shipment(self, shipmentId, **kwargs) -> ApiResponse:
|
|
29
33
|
"""
|
|
30
|
-
|
|
34
|
+
get_inbound_shipment(self, shipmentId, **kwargs) -> ApiResponse
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
Retrieves an AWD inbound shipment.
|
|
33
37
|
|
|
34
|
-
**Usage Plan:**
|
|
38
|
+
**Usage Plan:**
|
|
35
39
|
|
|
36
|
-
| Rate (requests per second) | Burst |
|
|
37
|
-
| ---- | ---- |
|
|
38
|
-
| 2 | 2 |
|
|
40
|
+
| Rate (requests per second) | Burst |
|
|
41
|
+
| ---- | ---- |
|
|
42
|
+
| 2 | 2 |
|
|
39
43
|
|
|
40
|
-
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 than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api)
|
|
44
|
+
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 than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api)
|
|
41
45
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
shipmentId:string | * REQUIRED ID for the shipment. A shipment contains the cases being inbounded.
|
|
45
|
-
|
|
46
|
+
Args:
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
shipmentId:string | * REQUIRED ID for the shipment. A shipment contains the cases being inbounded.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
ApiResponse:
|
|
49
53
|
"""
|
|
50
54
|
|
|
51
|
-
return self._request(
|
|
55
|
+
return self._request(
|
|
56
|
+
fill_query_params(kwargs.pop("path"), shipmentId), params=kwargs
|
|
57
|
+
)
|
|
52
58
|
|
|
53
|
-
@sp_endpoint(
|
|
59
|
+
@sp_endpoint("/awd/<version>/inboundShipments", method="GET")
|
|
54
60
|
def list_inbound_shipments(self, **kwargs) -> ApiResponse:
|
|
55
61
|
"""
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
**Usage Plan:**
|
|
61
|
-
|
|
62
|
-
| Rate (requests per second) | Burst |
|
|
63
|
-
| ---- | ---- |
|
|
64
|
-
| 1 | 1 |
|
|
65
|
-
|
|
66
|
-
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 than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
62
|
+
list_inbound_shipments(self, **kwargs) -> ApiResponse
|
|
63
|
+
|
|
64
|
+
Retrieves a summary for all the inbound AWD shipments associated with a merchant, with the ability to apply optional filters.
|
|
65
|
+
|
|
66
|
+
**Usage Plan:**
|
|
67
|
+
|
|
68
|
+
| Rate (requests per second) | Burst |
|
|
69
|
+
| ---- | ---- |
|
|
70
|
+
| 1 | 1 |
|
|
71
|
+
|
|
72
|
+
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 than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
|
|
76
|
+
key sortBy:string | Field to sort results by. Required if `sortOrder` is provided.
|
|
77
|
+
|
|
78
|
+
key sortOrder:string | Sort the response in `ASCENDING` or `DESCENDING` order.
|
|
79
|
+
|
|
80
|
+
key shipmentStatus:string | Filter by inbound shipment status.
|
|
81
|
+
|
|
82
|
+
key updatedAfter:string | List the inbound shipments that were updated after a certain time (inclusive). The date must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
83
|
+
|
|
84
|
+
key updatedBefore:string | List the inbound shipments that were updated before a certain time (inclusive). The date must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
85
|
+
|
|
86
|
+
key maxResults:integer | Maximum number of results to return.
|
|
87
|
+
|
|
88
|
+
key nextToken:string | Token to retrieve the next set of paginated results.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
Returns:
|
|
92
|
+
ApiResponse:
|
|
87
93
|
"""
|
|
88
94
|
|
|
89
|
-
return self._request(kwargs.pop(
|
|
95
|
+
return self._request(kwargs.pop("path"), params=kwargs)
|
|
90
96
|
|
|
91
|
-
@sp_endpoint(
|
|
97
|
+
@sp_endpoint("/awd/<version>/inventory", method="GET")
|
|
92
98
|
def list_inventory(self, **kwargs) -> ApiResponse:
|
|
93
99
|
"""
|
|
94
|
-
|
|
100
|
+
list_inventory(self, **kwargs) -> ApiResponse
|
|
101
|
+
|
|
102
|
+
Lists AWD inventory associated with a merchant with the ability to apply optional filters.
|
|
103
|
+
|
|
104
|
+
**Usage Plan:**
|
|
105
|
+
|
|
106
|
+
| Rate (requests per second) | Burst |
|
|
107
|
+
| ---- | ---- |
|
|
108
|
+
| 2 | 2 |
|
|
109
|
+
|
|
110
|
+
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 than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
111
|
+
|
|
112
|
+
Args:
|
|
113
|
+
|
|
114
|
+
key sku:string | Filter by seller or merchant SKU for the item.
|
|
95
115
|
|
|
96
|
-
|
|
116
|
+
key sortOrder:string | Sort the response in `ASCENDING` or `DESCENDING` order.
|
|
97
117
|
|
|
98
|
-
|
|
118
|
+
key details:string | Set to `SHOW` to return summaries with additional inventory details. Defaults to `HIDE,` which returns only inventory summary totals.
|
|
99
119
|
|
|
100
|
-
|
|
|
101
|
-
| ---- | ---- |
|
|
102
|
-
| 2 | 2 |
|
|
120
|
+
key nextToken:string | Token to retrieve the next set of paginated results.
|
|
103
121
|
|
|
104
|
-
|
|
122
|
+
key maxResults:integer | Maximum number of results to return.
|
|
105
123
|
|
|
106
|
-
Args:
|
|
107
|
-
|
|
108
|
-
key sku:string | Filter by seller or merchant SKU for the item.
|
|
109
|
-
|
|
110
|
-
key sortOrder:string | Sort the response in `ASCENDING` or `DESCENDING` order.
|
|
111
|
-
|
|
112
|
-
key details:string | Set to `SHOW` to return summaries with additional inventory details. Defaults to `HIDE,` which returns only inventory summary totals.
|
|
113
|
-
|
|
114
|
-
key nextToken:string | Token to retrieve the next set of paginated results.
|
|
115
|
-
|
|
116
|
-
key maxResults:integer | Maximum number of results to return.
|
|
117
|
-
|
|
118
124
|
|
|
119
|
-
|
|
120
|
-
|
|
125
|
+
Returns:
|
|
126
|
+
ApiResponse:
|
|
121
127
|
"""
|
|
122
128
|
|
|
123
|
-
return self._request(kwargs.pop(
|
|
129
|
+
return self._request(kwargs.pop("path"), params=kwargs)
|
|
@@ -5,13 +5,12 @@ from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
|
|
|
5
5
|
class AplusContent(Client):
|
|
6
6
|
"""
|
|
7
7
|
AplusContent SP-API Client
|
|
8
|
-
:link:
|
|
8
|
+
:link:
|
|
9
9
|
|
|
10
10
|
With the A+ Content API, you can build applications that help selling partners add rich marketing content to their Amazon product detail pages. A+ content helps selling partners share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners assemble content by choosing from content modules and adding images and text.
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
@sp_endpoint('/aplus/2020-11-01/contentDocuments', method='GET')
|
|
13
|
+
@sp_endpoint("/aplus/2020-11-01/contentDocuments", method="GET")
|
|
15
14
|
def search_content_documents(self, **kwargs) -> ApiResponse:
|
|
16
15
|
"""
|
|
17
16
|
search_content_documents(self, **kwargs) -> ApiResponse
|
|
@@ -36,11 +35,10 @@ class AplusContent(Client):
|
|
|
36
35
|
Returns:
|
|
37
36
|
ApiResponse:
|
|
38
37
|
"""
|
|
39
|
-
|
|
40
|
-
return self._request(kwargs.pop('path'), params=kwargs)
|
|
41
|
-
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
return self._request(kwargs.pop("path"), params=kwargs)
|
|
40
|
+
|
|
41
|
+
@sp_endpoint("/aplus/2020-11-01/contentDocuments", method="POST")
|
|
44
42
|
def create_content_document(self, **kwargs) -> ApiResponse:
|
|
45
43
|
"""
|
|
46
44
|
create_content_document(self, **kwargs) -> ApiResponse
|
|
@@ -61,16 +59,20 @@ class AplusContent(Client):
|
|
|
61
59
|
Args:
|
|
62
60
|
key marketplaceId:string | * REQUIRED The identifier for the marketplace where the A+ Content is published.
|
|
63
61
|
postContentDocumentRequest: | * REQUIRED {'properties': {'contentDocument': {'$ref': '#/definitions/ContentDocument'}}, 'required': ['contentDocument'], 'type': 'object'}
|
|
64
|
-
|
|
62
|
+
|
|
65
63
|
|
|
66
64
|
Returns:
|
|
67
65
|
ApiResponse:
|
|
68
66
|
"""
|
|
69
67
|
|
|
70
|
-
return self._request(
|
|
71
|
-
|
|
68
|
+
return self._request(
|
|
69
|
+
kwargs.pop("path"),
|
|
70
|
+
data=kwargs.pop("body"),
|
|
71
|
+
params=kwargs,
|
|
72
|
+
add_marketplace=False,
|
|
73
|
+
)
|
|
72
74
|
|
|
73
|
-
@sp_endpoint(
|
|
75
|
+
@sp_endpoint("/aplus/2020-11-01/contentDocuments/{}", method="GET")
|
|
74
76
|
def get_content_document(self, contentReferenceKey, **kwargs) -> ApiResponse:
|
|
75
77
|
"""
|
|
76
78
|
get_content_document(self, contentReferenceKey, **kwargs) -> ApiResponse
|
|
@@ -92,15 +94,17 @@ class AplusContent(Client):
|
|
|
92
94
|
contentReferenceKey:string | * REQUIRED The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.
|
|
93
95
|
key marketplaceId:string | * REQUIRED The identifier for the marketplace where the A+ Content is published.
|
|
94
96
|
key includedDataSet:array | * REQUIRED The set of A+ Content data types to include in the response.
|
|
95
|
-
|
|
97
|
+
|
|
96
98
|
|
|
97
99
|
Returns:
|
|
98
100
|
ApiResponse:
|
|
99
101
|
"""
|
|
100
|
-
|
|
101
|
-
return self._request(fill_query_params(kwargs.pop('path'), contentReferenceKey), params=kwargs)
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
return self._request(
|
|
104
|
+
fill_query_params(kwargs.pop("path"), contentReferenceKey), params=kwargs
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
@sp_endpoint("/aplus/2020-11-01/contentDocuments/{}", method="POST")
|
|
104
108
|
def update_content_document(self, contentReferenceKey, **kwargs) -> ApiResponse:
|
|
105
109
|
"""
|
|
106
110
|
update_content_document(self, contentReferenceKey, **kwargs) -> ApiResponse
|
|
@@ -124,12 +128,18 @@ class AplusContent(Client):
|
|
|
124
128
|
Returns:
|
|
125
129
|
ApiResponse:
|
|
126
130
|
"""
|
|
127
|
-
|
|
128
|
-
return self._request(fill_query_params(kwargs.pop('path'), contentReferenceKey), data=kwargs.pop("body"), params=kwargs, add_marketplace=False)
|
|
129
|
-
|
|
130
131
|
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
return self._request(
|
|
133
|
+
fill_query_params(kwargs.pop("path"), contentReferenceKey),
|
|
134
|
+
data=kwargs.pop("body"),
|
|
135
|
+
params=kwargs,
|
|
136
|
+
add_marketplace=False,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
@sp_endpoint("/aplus/2020-11-01/contentDocuments/{}/asins", method="GET")
|
|
140
|
+
def list_content_document_asin_relations(
|
|
141
|
+
self, contentReferenceKey, **kwargs
|
|
142
|
+
) -> ApiResponse:
|
|
133
143
|
"""
|
|
134
144
|
list_content_document_asin_relations(self, contentReferenceKey, **kwargs) -> ApiResponse
|
|
135
145
|
|
|
@@ -154,12 +164,15 @@ class AplusContent(Client):
|
|
|
154
164
|
Returns:
|
|
155
165
|
ApiResponse:
|
|
156
166
|
"""
|
|
157
|
-
|
|
158
|
-
return self._request(fill_query_params(kwargs.pop('path'), contentReferenceKey), params=kwargs)
|
|
159
|
-
|
|
160
167
|
|
|
161
|
-
|
|
162
|
-
|
|
168
|
+
return self._request(
|
|
169
|
+
fill_query_params(kwargs.pop("path"), contentReferenceKey), params=kwargs
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
@sp_endpoint("/aplus/2020-11-01/contentDocuments/{}/asins", method="POST")
|
|
173
|
+
def post_content_document_asin_relations(
|
|
174
|
+
self, contentReferenceKey, **kwargs
|
|
175
|
+
) -> ApiResponse:
|
|
163
176
|
"""
|
|
164
177
|
post_content_document_asin_relations(self, contentReferenceKey, **kwargs) -> ApiResponse
|
|
165
178
|
|
|
@@ -182,11 +195,15 @@ class AplusContent(Client):
|
|
|
182
195
|
Returns:
|
|
183
196
|
ApiResponse:
|
|
184
197
|
"""
|
|
185
|
-
|
|
186
|
-
return self._request(fill_query_params(kwargs.pop('path'), contentReferenceKey), data=kwargs.pop("body"), params=kwargs, add_marketplace=False)
|
|
187
|
-
|
|
188
198
|
|
|
189
|
-
|
|
199
|
+
return self._request(
|
|
200
|
+
fill_query_params(kwargs.pop("path"), contentReferenceKey),
|
|
201
|
+
data=kwargs.pop("body"),
|
|
202
|
+
params=kwargs,
|
|
203
|
+
add_marketplace=False,
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
@sp_endpoint("/aplus/2020-11-01/contentAsinValidations", method="POST")
|
|
190
207
|
def validate_content_document_asin_relations(self, **kwargs) -> ApiResponse:
|
|
191
208
|
"""
|
|
192
209
|
validate_content_document_asin_relations(self, **kwargs) -> ApiResponse
|
|
@@ -206,16 +223,20 @@ class AplusContent(Client):
|
|
|
206
223
|
key marketplaceId:string | * REQUIRED The identifier for the marketplace where the A+ Content is published.
|
|
207
224
|
key asinSet:array | The set of ASINs.
|
|
208
225
|
postContentDocumentRequest: | * REQUIRED {'properties': {'contentDocument': {'$ref': '#/definitions/ContentDocument'}}, 'required': ['contentDocument'], 'type': 'object'}
|
|
209
|
-
|
|
226
|
+
|
|
210
227
|
|
|
211
228
|
Returns:
|
|
212
229
|
ApiResponse:
|
|
213
230
|
"""
|
|
214
231
|
|
|
215
|
-
return self._request(
|
|
216
|
-
|
|
232
|
+
return self._request(
|
|
233
|
+
kwargs.pop("path"),
|
|
234
|
+
data=kwargs.pop("body"),
|
|
235
|
+
params=kwargs,
|
|
236
|
+
add_marketplace=False,
|
|
237
|
+
)
|
|
217
238
|
|
|
218
|
-
@sp_endpoint(
|
|
239
|
+
@sp_endpoint("/aplus/2020-11-01/contentPublishRecords", method="GET")
|
|
219
240
|
def search_content_publish_records(self, **kwargs) -> ApiResponse:
|
|
220
241
|
"""
|
|
221
242
|
search_content_publish_records(self, **kwargs) -> ApiResponse
|
|
@@ -239,12 +260,15 @@ class AplusContent(Client):
|
|
|
239
260
|
Returns:
|
|
240
261
|
ApiResponse:
|
|
241
262
|
"""
|
|
242
|
-
|
|
243
|
-
return self._request(kwargs.pop('path'), params=kwargs)
|
|
244
|
-
|
|
245
263
|
|
|
246
|
-
|
|
247
|
-
|
|
264
|
+
return self._request(kwargs.pop("path"), params=kwargs)
|
|
265
|
+
|
|
266
|
+
@sp_endpoint(
|
|
267
|
+
"/aplus/2020-11-01/contentDocuments/{}/approvalSubmissions", method="POST"
|
|
268
|
+
)
|
|
269
|
+
def post_content_document_approval_submission(
|
|
270
|
+
self, contentReferenceKey, **kwargs
|
|
271
|
+
) -> ApiResponse:
|
|
248
272
|
"""
|
|
249
273
|
post_content_document_approval_submission(self, contentReferenceKey, **kwargs) -> ApiResponse
|
|
250
274
|
|
|
@@ -266,12 +290,17 @@ class AplusContent(Client):
|
|
|
266
290
|
Returns:
|
|
267
291
|
ApiResponse:
|
|
268
292
|
"""
|
|
269
|
-
|
|
270
|
-
return self._request(fill_query_params(kwargs.pop('path'), contentReferenceKey), params=kwargs)
|
|
271
|
-
|
|
272
293
|
|
|
273
|
-
|
|
274
|
-
|
|
294
|
+
return self._request(
|
|
295
|
+
fill_query_params(kwargs.pop("path"), contentReferenceKey), params=kwargs
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
@sp_endpoint(
|
|
299
|
+
"/aplus/2020-11-01/contentDocuments/{}/suspendSubmissions", method="POST"
|
|
300
|
+
)
|
|
301
|
+
def post_content_document_suspend_submission(
|
|
302
|
+
self, contentReferenceKey, **kwargs
|
|
303
|
+
) -> ApiResponse:
|
|
275
304
|
"""
|
|
276
305
|
post_content_document_suspend_submission(self, contentReferenceKey, **kwargs) -> ApiResponse
|
|
277
306
|
|
|
@@ -293,5 +322,7 @@ class AplusContent(Client):
|
|
|
293
322
|
Returns:
|
|
294
323
|
ApiResponse:
|
|
295
324
|
"""
|
|
296
|
-
|
|
297
|
-
return self._request(
|
|
325
|
+
|
|
326
|
+
return self._request(
|
|
327
|
+
fill_query_params(kwargs.pop("path"), contentReferenceKey), data=kwargs
|
|
328
|
+
)
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import urllib.parse
|
|
2
|
+
|
|
3
|
+
from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ApplicationIntegrations(Client):
|
|
7
|
+
"""
|
|
8
|
+
ApplicationIntegrations SP-API Client
|
|
9
|
+
:link:
|
|
10
|
+
|
|
11
|
+
With the AppIntegrations API v2024-04-01, you can send notifications to Amazon Selling Partners and display the notifications in Seller Central.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@sp_endpoint('/appIntegrations/2024-04-01/notifications', method='POST')
|
|
16
|
+
def create_notification(self, **kwargs) -> ApiResponse:
|
|
17
|
+
"""
|
|
18
|
+
create_notification(self, **kwargs) -> ApiResponse
|
|
19
|
+
|
|
20
|
+
Create a notification for sellers in Seller Central.
|
|
21
|
+
|
|
22
|
+
**Usage Plan:**
|
|
23
|
+
|
|
24
|
+
| Rate (requests per second) | Burst |
|
|
25
|
+
| ---- | ---- |
|
|
26
|
+
| 1 | 5 |
|
|
27
|
+
|
|
28
|
+
The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
29
|
+
|
|
30
|
+
Args:
|
|
31
|
+
|
|
32
|
+
body: | * REQUIRED {'description': 'The request for the `createNotification` operation.',
|
|
33
|
+
'example': {'marketplaceId': 'ATVPDKIKX0DER', 'notificationParameters': {'priceValue': '200'}, 'templateId': 'PRICE_CHANGE'},
|
|
34
|
+
'properties': {'marketplaceId': {'description': 'An encrypted marketplace identifier for the posted notification.', 'type': 'string'},
|
|
35
|
+
'notificationParameters': {'$ref': '#/definitions/NotificationParameters', 'description': 'The parameters specified in the template you used to onboard your application.'},
|
|
36
|
+
'templateId': {'description': 'The unique identifier of the notification template you used to onboard your application.', 'type': 'string'}},
|
|
37
|
+
'required': ['templateId', 'notificationParameters'],
|
|
38
|
+
'type': 'object'}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
Returns:
|
|
42
|
+
ApiResponse:
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
return self._request(kwargs.pop('path'), data=kwargs)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@sp_endpoint('/appIntegrations/2024-04-01/notifications/deletion', method='POST')
|
|
49
|
+
def delete_notifications(self, **kwargs) -> ApiResponse:
|
|
50
|
+
"""
|
|
51
|
+
delete_notifications(self, **kwargs) -> ApiResponse
|
|
52
|
+
|
|
53
|
+
Remove your application's notifications from the Appstore notifications dashboard.
|
|
54
|
+
|
|
55
|
+
**Usage Plan:**
|
|
56
|
+
|
|
57
|
+
| Rate (requests per second) | Burst |
|
|
58
|
+
| ---- | ---- |
|
|
59
|
+
| 1 | 5 |
|
|
60
|
+
|
|
61
|
+
The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
|
|
65
|
+
body: | * REQUIRED {'description': 'The request for the `deleteNotifications` operation.',
|
|
66
|
+
'example': {'deletionReason': 'INCORRECT_CONTENT', 'templateId': 'PRICE_CHANGE'},
|
|
67
|
+
'properties': {'deletionReason': {'description': 'The unique identifier that maps each notification status to a reason code.',
|
|
68
|
+
'enum': ['INCORRECT_CONTENT', 'INCORRECT_RECIPIENT'],
|
|
69
|
+
'type': 'string',
|
|
70
|
+
'x-docgen-enum-table-extension': [{'description': "The notification's content is recognized to be incorrect.", 'value': 'INCORRECT_CONTENT'},
|
|
71
|
+
{'description': 'The notification was sent to incorrect seller.', 'value': 'INCORRECT_RECIPIENT'}]},
|
|
72
|
+
'templateId': {'description': 'The unique identifier of the notification template you used to onboard your application.', 'type': 'string'}},
|
|
73
|
+
'required': ['templateId', 'deletionReason'],
|
|
74
|
+
'type': 'object'}
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
ApiResponse:
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
return self._request(kwargs.pop('path'), data=kwargs)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
@sp_endpoint('/appIntegrations/2024-04-01/notifications/{}/feedback', method='POST')
|
|
85
|
+
def record_action_feedback(self, notificationId, **kwargs) -> ApiResponse:
|
|
86
|
+
"""
|
|
87
|
+
record_action_feedback(self, notificationId, **kwargs) -> ApiResponse
|
|
88
|
+
|
|
89
|
+
Records the seller's response to a notification.
|
|
90
|
+
|
|
91
|
+
**Usage Plan:**
|
|
92
|
+
|
|
93
|
+
| Rate (requests per second) | Burst |
|
|
94
|
+
| ---- | ---- |
|
|
95
|
+
| 1 | 5 |
|
|
96
|
+
|
|
97
|
+
The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
|
|
101
|
+
notificationId:string | * REQUIRED A `notificationId` uniquely identifies a notification.
|
|
102
|
+
|
|
103
|
+
body: | * REQUIRED {'description': 'The request for the `recordActionFeedback` operation.',
|
|
104
|
+
'example': {'feedbackActionCode': 'SELLER_ACTION_COMPLETED'},
|
|
105
|
+
'properties': {'feedbackActionCode': {'description': 'The unique identifier for each notification status.',
|
|
106
|
+
'enum': ['SELLER_ACTION_COMPLETED'],
|
|
107
|
+
'type': 'string',
|
|
108
|
+
'x-docgen-enum-table-extension': [{'description': 'The seller completed the action attached to the posted notification.', 'value': 'SELLER_ACTION_COMPLETED'}]}},
|
|
109
|
+
'required': ['feedbackActionCode'],
|
|
110
|
+
'type': 'object'}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
Returns:
|
|
114
|
+
ApiResponse:
|
|
115
|
+
"""
|
|
116
|
+
|
|
117
|
+
return self._request(fill_query_params(kwargs.pop('path'), notificationId), data=kwargs)
|
|
118
|
+
|
|
@@ -4,13 +4,13 @@ from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
|
|
|
4
4
|
class ApplicationManagement(Client):
|
|
5
5
|
"""
|
|
6
6
|
ApplicationManagement SP-API Client
|
|
7
|
-
:link:
|
|
7
|
+
:link:
|
|
8
8
|
|
|
9
9
|
The Selling Partner API for Application Management lets you programmatically update the client secret on registered applications.
|
|
10
10
|
"""
|
|
11
|
+
grantless_scope = 'sellingpartnerapi::client_credential:rotation'
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
@sp_endpoint('/applications/2023-11-30/clientSecret', method='POST')
|
|
13
|
+
@sp_endpoint("/applications/2023-11-30/clientSecret", method="POST")
|
|
14
14
|
def rotate_application_client_secret(self, **kwargs) -> ApiResponse:
|
|
15
15
|
"""
|
|
16
16
|
rotate_application_client_secret(self, **kwargs) -> ApiResponse
|
|
@@ -26,11 +26,10 @@ class ApplicationManagement(Client):
|
|
|
26
26
|
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 than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
27
27
|
|
|
28
28
|
Args:
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
|
|
31
31
|
Returns:
|
|
32
32
|
ApiResponse:
|
|
33
33
|
"""
|
|
34
|
-
|
|
35
|
-
return self.
|
|
36
|
-
|
|
34
|
+
|
|
35
|
+
return self._request_grantless_operation(kwargs.pop("path"), data=kwargs)
|
|
@@ -6,13 +6,14 @@ from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
|
|
|
6
6
|
class Authorization(Client):
|
|
7
7
|
"""
|
|
8
8
|
Authorization SP-API Client
|
|
9
|
-
:link:
|
|
9
|
+
:link:
|
|
10
10
|
|
|
11
11
|
The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
|
12
12
|
"""
|
|
13
|
-
grantless_scope = 'sellingpartnerapi::migration'
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
grantless_scope = "sellingpartnerapi::migration"
|
|
15
|
+
|
|
16
|
+
@sp_endpoint("/authorization/v1/authorizationCode", method="GET")
|
|
16
17
|
def get_authorization_code(self, **kwargs) -> ApiResponse:
|
|
17
18
|
"""
|
|
18
19
|
get_authorization_code(self, **kwargs) -> ApiResponse
|
|
@@ -48,6 +49,5 @@ class Authorization(Client):
|
|
|
48
49
|
Returns:
|
|
49
50
|
ApiResponse:
|
|
50
51
|
"""
|
|
51
|
-
|
|
52
|
-
return self._request_grantless_operation(kwargs.pop('path'), params=kwargs)
|
|
53
52
|
|
|
53
|
+
return self._request_grantless_operation(kwargs.pop("path"), params=kwargs)
|
sp_api/api/catalog/catalog.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import urllib.parse
|
|
2
2
|
|
|
3
3
|
from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
|
|
4
|
+
from sp_api.util import encode_kwarg
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
class Catalog(Client):
|
|
@@ -9,7 +10,7 @@ class Catalog(Client):
|
|
|
9
10
|
|
|
10
11
|
"""
|
|
11
12
|
|
|
12
|
-
@sp_endpoint(
|
|
13
|
+
@sp_endpoint("/catalog/v0/items/{}")
|
|
13
14
|
def get_item(self, asin: str, **kwargs) -> ApiResponse:
|
|
14
15
|
"""
|
|
15
16
|
get_item(self, asin: str, **kwargs) -> ApiResponse
|
|
@@ -38,9 +39,9 @@ class Catalog(Client):
|
|
|
38
39
|
Returns:
|
|
39
40
|
GetCatalogItemResponse:
|
|
40
41
|
"""
|
|
41
|
-
return self._request(fill_query_params(kwargs.pop(
|
|
42
|
+
return self._request(fill_query_params(kwargs.pop("path"), asin), params=kwargs)
|
|
42
43
|
|
|
43
|
-
@sp_endpoint(
|
|
44
|
+
@sp_endpoint("/catalog/v0/items")
|
|
44
45
|
def list_items(self, **kwargs) -> ApiResponse:
|
|
45
46
|
"""
|
|
46
47
|
list_items(self, **kwargs) -> ApiResponse
|
|
@@ -75,11 +76,10 @@ class Catalog(Client):
|
|
|
75
76
|
Returns:
|
|
76
77
|
ListCatalogItemsResponse:
|
|
77
78
|
"""
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return self._request(kwargs.pop('path'), params=kwargs)
|
|
79
|
+
encode_kwarg(kwargs, "Query", urllib.parse.quote_plus)
|
|
80
|
+
return self._request(kwargs.pop("path"), params=kwargs)
|
|
81
81
|
|
|
82
|
-
@sp_endpoint(
|
|
82
|
+
@sp_endpoint("/catalog/v0/categories")
|
|
83
83
|
def list_categories(self, **kwargs) -> ApiResponse:
|
|
84
84
|
"""
|
|
85
85
|
list_categories(self, **kwargs) -> ApiResponse
|
|
@@ -104,6 +104,5 @@ class Catalog(Client):
|
|
|
104
104
|
Returns:
|
|
105
105
|
ListCatalogCategoriesResponse:
|
|
106
106
|
"""
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
return self._request(kwargs.pop('path'), params=kwargs)
|
|
107
|
+
encode_kwarg(kwargs, "Query", urllib.parse.quote_plus)
|
|
108
|
+
return self._request(kwargs.pop("path"), params=kwargs)
|