Skip to content

Etsy: create, edit and publish listings, photos, price and stock, order tracking - #887

Merged
keysersoft merged 3 commits into
mainfrom
keysersoft/etsy-write-tools
Oct 5, 2026
Merged

keysersoft merged 3 commits into
mainfrom
keysersoft/etsy-write-tools

Conversation

@keysersoft

Copy link
Copy Markdown
Contributor

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_supply together) 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):

Tool Call
etsy_list_seller_taxonomy GET /seller-taxonomy/nodes
etsy_list_taxonomy_properties GET /seller-taxonomy/nodes/{taxonomy_id}/properties
etsy_list_shipping_profiles GET /shops/{shop_id}/shipping-profiles
etsy_list_processing_profiles GET /shops/{shop_id}/readiness-state-definitions
etsy_list_return_policies GET /shops/{shop_id}/policies/return
etsy_list_shop_sections GET /shops/{shop_id}/sections
etsy_read_listing_inventory GET /listings/{listing_id}/inventory
etsy_create_listing_draft POST /shops/{shop_id}/listings (form-urlencoded)
etsy_edit_listing PATCH /shops/{shop_id}/listings/{listing_id} (form-urlencoded; state=active publishes)
etsy_set_listing_inventory PUT /listings/{listing_id}/inventory (JSON, replaces the inventory)
etsy_add_listing_image POST /shops/{shop_id}/listings/{listing_id}/images (multipart, file fetched from a public URL via __file, #818)
etsy_add_order_tracking POST /shops/{shop_id}/receipts/{receipt_id}/tracking (JSON)
  • Body shapes follow what already works in production: customers' own create-draft tools succeed with form-urlencoded bodies and tags as one comma-separated string (112 successful calls last week). Our engine would send arrays as tags[0]=…, so tags/materials are declared as comma-separated strings.
  • Scopes: + listings_w transactions_w. No listings_d and no delete tool (setting state=inactive takes a listing off the shop).
  • Names avoid the customers' own tools (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.
  • Existing connectors: new tools are a structural change, so they only arrive through an explicit update, and auth is never touched. The instructions explain how to set the new scopes and re-authorize.
  • encodePathParams: true on 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).
  • Etsy specs + catalog.spec: 3322 passed; validate-adapters 268/268; adapter-count check OK; tsc clean.
  • Not tested against a live Etsy shop (we have none). Unauthenticated probes answer 400 on every route, so they can't confirm paths; paths are from Etsy's spec.

After merge

Website guides for Etsy list the old tools; regenerate them.

…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.
@keysersoft
keysersoft requested a review from D3nisty as a code owner October 5, 2026 12:13
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.
@keysersoft
keysersoft enabled auto-merge (squash) October 5, 2026 12:51
@keysersoft
keysersoft merged commit 1c5dff3 into main Oct 5, 2026
13 checks passed
@keysersoft
keysersoft deleted the keysersoft/etsy-write-tools branch October 5, 2026 12:54
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant