From f027addec5e8bf8a7810cc4a2367629cf2361789 Mon Sep 17 00:00:00 2001 From: Amit Ray <51674969+amitray007@users.noreply.github.com> Date: Fri, 9 Oct 2026 22:41:10 +0530 Subject: [PATCH] feat: sync SDK with Etsy API spec (taxonomy property filters) Add the optional supports_variations and supports_attributes query parameters to SellerTaxonomyResource.get_properties_by_taxonomy_id, matching the getPropertiesByTaxonomyId spec change. Update the spec baseline. Co-Authored-By: Claude Opus 5.5 --- etsy_python/v3/resources/Taxonomy.py | 13 +++++++-- specs/baseline.json | 42 ++++++++++++++++++++++++++-- tests/test_remaining_resources.py | 16 ++++++++++- 3 files changed, 64 insertions(+), 7 deletions(-) diff --git a/etsy_python/v3/resources/Taxonomy.py b/etsy_python/v3/resources/Taxonomy.py index 00bb7c8..d1516ec 100644 --- a/etsy_python/v3/resources/Taxonomy.py +++ b/etsy_python/v3/resources/Taxonomy.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import Union +from typing import Any, Dict, Optional, Union from etsy_python.v3.exceptions.RequestException import RequestException from etsy_python.v3.resources.Response import Response @@ -30,7 +30,14 @@ def get_seller_taxonomy_nodes(self) -> Union[Response, RequestException]: return self.session.make_request(endpoint) def get_properties_by_taxonomy_id( - self, taxonomy_id: int + self, + taxonomy_id: int, + supports_variations: Optional[bool] = None, + supports_attributes: Optional[bool] = None, ) -> Union[Response, RequestException]: endpoint = f"/seller-taxonomy/nodes/{taxonomy_id}/properties" - return self.session.make_request(endpoint) + query_params: Dict[str, Any] = { + "supports_variations": supports_variations, + "supports_attributes": supports_attributes, + } + return self.session.make_request(endpoint, query_params=query_params) diff --git a/specs/baseline.json b/specs/baseline.json index 77925ba..e5fa18d 100644 --- a/specs/baseline.json +++ b/specs/baseline.json @@ -2412,11 +2412,11 @@ { "name": "max_variations_supported", "in": "query", - "description": "Coming soon: This parameter determines whether a third variation can be added to or updated for a listing. It accepts values of 2 or 3, where 3 enables third-variation support.", + "description": "This parameter determines whether a third variation can be added to or updated for a listing. It accepts values of 2 or 3, where 3 enables third-variation support.", "required": false, "schema": { "type": "string", - "description": "Coming soon: This parameter determines whether a third variation can be added to or updated for a listing. It accepts values of 2 or 3, where 3 enables third-variation support.", + "description": "This parameter determines whether a third variation can be added to or updated for a listing. It accepts values of 2 or 3, where 3 enables third-variation support.", "enum": [ "2", "3" @@ -6853,7 +6853,7 @@ "/v3/application/shops/{shop_id}/receipts/{receipt_id}/tracking": { "post": { "operationId": "createReceiptShipment", - "description": "
General ReleaseReport bug

This endpoint is ready for production use.

\n\nSubmits tracking information for a Shop Receipt, which creates a Shop Receipt Shipment entry for the given receipt_id. Each time you successfully submit tracking info, Etsy sends a notification email to the buyer User. When send_bcc is true, Etsy sends shipping notifications to the seller as well. When tracking_code and carrier_name aren't sent, the receipt is marked as shipped only. If the carrier is not supported, you may use `other` as the carrier name so you can provide the tracking code. **NOTES** When shipping within the United States AND the order is over $10 _or_ when shipping to India, tracking code and carrier name ARE required. Access to ShopReceipt's first_line, second_line, city, state, zip, country_iso and formatted_address is contingent in some regions to a preferred partnership status with Etsy", + "description": "
General ReleaseReport bug

This endpoint is ready for production use.

\n\nSubmits tracking information for a Shop Receipt, which creates a Shop Receipt Shipment entry for the given receipt_id. Each time you successfully submit tracking info, Etsy sends a notification email to the buyer User. When send_bcc is true, Etsy sends shipping notifications to the seller as well. When tracking_code and carrier_name aren't sent, the receipt is marked as shipped only. If the carrier is not supported, you may use `other` as the carrier name so you can provide the tracking code. **NOTES** When shipping within the United States AND the order is over $10 _or_ when shipping to India, tracking code and carrier name ARE required. **ACCESS RESTRICTION** In regions where Etsy's Preferred Partner Program is enforced, this endpoint is only available to applications that are approved fulfillment partners. Requests from other applications return `403 Forbidden`, even when the API key is valid, the OAuth token has the `transactions_w` scope and other receipt endpoints respond successfully. A request is authorized if the application is a commercial-access application categorized as Fulfillment or Print On Demand, if it is a personal-use application owned by the authenticated seller, or if the seller authorized the application before the Preferred Partner Program launched in their region. If your application doesn't meet these criteria, contact Etsy API support to ask about partner eligibility. Access to ShopReceipt's first_line, second_line, city, state, zip, country_iso and formatted_address is contingent in some regions to a preferred partnership status with Etsy", "tags": [ "Shop Receipt" ], @@ -7534,6 +7534,28 @@ "format": "int64", "minimum": 1 } + }, + { + "name": "supports_variations", + "in": "query", + "description": "When `true`, returns properties that support variations. When `false`, returns properties that do not support variations.", + "required": false, + "schema": { + "type": "boolean", + "description": "When `true`, returns properties that support variations. When `false`, returns properties that do not support variations.", + "nullable": true + } + }, + { + "name": "supports_attributes", + "in": "query", + "description": "When `true`, returns properties that support attributes. When `false`, returns properties that do not support attributes.", + "required": false, + "schema": { + "type": "boolean", + "description": "When `true`, returns properties that support attributes. When `false`, returns properties that do not support attributes.", + "nullable": true + } } ], "responses": { @@ -15584,6 +15606,20 @@ "description": "[Personalization only] The ID of the original personalization question.", "format": "int64", "nullable": true + }, + "mime_type": { + "type": "string", + "description": "MIME type of an uploaded personalization file. Null for non-upload questions.", + "nullable": true, + "enum": [ + "image/jpeg", + "image/png", + "image/gif", + "image/svg+xml", + "image/heif", + "image/heic", + "application/pdf" + ] } } }, diff --git a/tests/test_remaining_resources.py b/tests/test_remaining_resources.py index 881943e..162e9ae 100644 --- a/tests/test_remaining_resources.py +++ b/tests/test_remaining_resources.py @@ -522,7 +522,21 @@ def test_get_properties_by_taxonomy_id(self, mock_session): resource = SellerTaxonomyResource(session=mock_session) resource.get_properties_by_taxonomy_id(MOCK_TAXONOMY_ID) mock_session.make_request.assert_called_once_with( - f"/seller-taxonomy/nodes/{MOCK_TAXONOMY_ID}/properties" + f"/seller-taxonomy/nodes/{MOCK_TAXONOMY_ID}/properties", + query_params={"supports_variations": None, "supports_attributes": None}, + ) + + def test_get_properties_by_taxonomy_id_with_filters(self, mock_session): + mock_session.make_request.return_value = Response( + 200, make_collection(make_taxonomy_property) + ) + resource = SellerTaxonomyResource(session=mock_session) + resource.get_properties_by_taxonomy_id( + MOCK_TAXONOMY_ID, supports_variations=True, supports_attributes=False + ) + mock_session.make_request.assert_called_once_with( + f"/seller-taxonomy/nodes/{MOCK_TAXONOMY_ID}/properties", + query_params={"supports_variations": True, "supports_attributes": False}, )