Etsy: create, edit and publish listings, photos, price and stock, order tracking - #887
Merged
Merged
Conversation
…er tracking Twelve tools, following Etsy's OpenAPI spec: - lookups a new listing needs: seller taxonomy and its properties, shipping profiles, processing profiles (readiness states), return policies, shop sections, listing inventory - etsy_create_listing_draft, etsy_edit_listing (incl. state=active to publish), etsy_set_listing_inventory, etsy_add_listing_image (multipart from a public URL, via the __file support from #818), etsy_add_order_tracking At least six workspaces had built write tools by hand and failed on missing required fields (taxonomy_id, readiness_state_id, who_made/when_made/is_supply together) or on read-only scopes. The new tools declare what Etsy requires and say in which order to call them. Bodies follow what already works in production: form-urlencoded, tags as one comma-separated string. Scopes gain listings_w and transactions_w (no listings_d: nothing deletes). Names avoid the ones customers gave their own tools (etsy_update_listing, etsy_create_draft_listing, ...), because the catalog update matches tools by name. Existing connectors get the tools only through an explicit update, and the instructions say how to re-authorize with the new scopes.
Rows installed before the browser flow have no scopes of their own and adopt the catalog's at authorization, so they now ask for the write scopes too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
From the 5 Oct error review: at least six workspaces had built Etsy write tools by hand (create draft, update listing, upload image…). Most failures were missing required fields (
taxonomy_id,readiness_state_id,shipping_profile_id,who_made/when_made/is_supplytogether) or a token with read-only scopes (Access token lacks scope: listings_w), because the catalog adapter is read-only.What
12 new tools, paths and fields from Etsy's OpenAPI spec (
/openapi/generated/oas/3.0.0.json):etsy_list_seller_taxonomyetsy_list_taxonomy_propertiesetsy_list_shipping_profilesetsy_list_processing_profilesetsy_list_return_policiesetsy_list_shop_sectionsetsy_read_listing_inventoryetsy_create_listing_draftetsy_edit_listingstate=activepublishes)etsy_set_listing_inventoryetsy_add_listing_image__file, #818)etsy_add_order_trackingtags[0]=…, so tags/materials are declared as comma-separated strings.+ listings_w transactions_w. Nolistings_dand no delete tool (settingstate=inactivetakes a listing off the shop).etsy_update_listing×8,etsy_create_draft_listing×5, …): catalog resync matches tools by name and would overwrite theirs. Checked against production: none of the new names exists.encodePathParams: trueon every new tool with a path id.Tests
etsy.write-tools.spec.ts: drives RestEngine with the adapter's own definitions (form body, PATCH with only the given fields, JSON inventory, multipart image with the fetched file, tracking JSON, path encoding, no reused names).After merge
Website guides for Etsy list the old tools; regenerate them.