Skip to main content
cURL
Cost: 1 API credit per write.
Needs the listings:write scope and the Listing optimization workspace permission. A change outside the workspace answers 404.
A revert writes to the live listing on Etsy. It overwrites what the listing holds now with the change’s earlier values.

Undo a change

  1. Find the change with List changes or Get a change. revertable says whether it can be undone, and not_revertable_reason why not.
  2. Call with dry_run=true to see what would be restored and what not. Nothing is sent to Etsy.
  3. Call again without dry_run. Send an Idempotency-Key so a retry is safe. See Idempotency.
The answer is 200 with the listing as Etsy returned it, plus reverts, restored and not_reverted. While Etsy is still answering, it is 202 with the change instead: get the change until its outcome is final. The revert is a new change with source: revert, and its reverts is the ID of the change it undid. It can itself be reverted.

What can be restored

Reverts are deny by default. Only a change made through Alura’s change log, with a before read live from Etsy, that landed on Etsy, can be reverted. Each field goes back to its value in before. A change with some restorable fields and some not is reverted for the restorable ones. not_reverted lists the rest, each with its reason.

What is never restored

A change that can’t be reverted at all answers 409 change_not_revertable, with reason and nothing written.

When the listing changed since

Before writing, Alura reads the listing on Etsy again. Every field to restore must still hold the change’s after. If one doesn’t, the revert answers 409 changed_since, changed names the fields that moved, and nothing is written.
  • Fields the change didn’t touch are neither compared nor written.
  • For the inventory, every variant’s price, SKU and enabled flag must still be the change’s. A sale moving a quantity is fine. Otherwise changed names inventory.
  • A category (category_id) the change moved is also refused when the listing was edited on Etsy after the change: its updated time is more than 10 seconds from the change’s, or unknown. Putting the category back can make Etsy drop attributes set since.
Etsy has no conditional update. An edit made on Etsy between Alura’s read and its write can still be overwritten.
A change to a listing in a running Alura A/B test is reverted like any other. The test’s variant switches also write through Alura (changes with source: automation), so its next switch may overwrite the fields its variants hold.
See Credits and limits for what a refused revert or a dry run costs.

Authorizations

Authorization
string
header
required

An API key: Authorization: Bearer alura_sk_....

Headers

Idempotency-Key
string

Makes a retry safe: the same key with the same request within 24 hours answers from the first write (with Idempotent-Replayed: true) and never writes to Etsy twice; a write that failed with nothing written (Retry-After set) is tried again under it. The same key with a different request is a 409 conflict; while the first request still runs, 409 idempotency_processing (or the same 202). Required for relative changes such as adjust_price, and to add a listing file, image or video, or to change the alt text of an image (each uploads to Etsy, so a blind retry would upload again); a dry_run=true needs none.

Required string length: 1 - 255

Path Parameters

id
string
required

The change to revert, chn_… (GET /v1/workspace/changes shows which are revertable).

Required string length: 1 - 64
Example:

"chn_01JMCK00000000000000000001"

Query Parameters

dry_run
boolean

true: plan the write and send nothing: what it would change, the Etsy calls it would make, and nothing reserved, charged or recorded. Free; counts toward the per-minute write limit.

Response

OK: the write landed on Etsy (or, with dry_run=true, what it would do).

object
string
required
Allowed value: "workspace.listing"
id
string
required

Etsy ID, as a string.

shop_id
string
required

Etsy ID, as a string.

title
string | null
required

The title as Etsy answered; null when Etsy did not say.

description
string | null
required

The description as Etsy answered; null when Etsy did not say.

url
string | null
required

The listing on Etsy.

state
string | null
required

Etsy's listing state, for example active, inactive or draft.

price
object | null
required

The listing's price as Etsy answered; usd is null unless the listing is priced in USD.

quantity
integer | null
required

The listing's total quantity across its enabled offerings, as Etsy and get_my_listing count it (not the per-offering value a request sends: 3 on each of 2 variants is 6).

skus
string[] | null
required

The SKUs of the listing's offerings as Etsy answered; null when Etsy did not say.

tags
string[] | null
required

The tags as Etsy answered; null when Etsy did not say.

materials
string[] | null
required

The materials as Etsy answered; null when Etsy did not say.

category
object | null
required

Etsy's category (category_id in the request).

section
object | null
required

The shop section; null when the listing is in none.

shipping_profile_id
string | null
required

The listing's shipping profile; null when it has none or Etsy did not say.

return_policy_id
string | null
required

The listing's return policy; null when it has none or Etsy did not say.

processing_profile_id
string | null
required

The processing profile every offering has; null when they differ or Etsy did not say.

production_partner_ids
string[] | null
required

The production partners as Etsy answered; null when Etsy did not say.

Etsy ID, as a string.

who_made
string | null
required

Etsy's who_made: i_did, someone_else or collective; null when Etsy did not say.

when_made
string | null
required

Etsy's when_made, for example made_to_order; null when Etsy did not say.

is_supply
boolean | null
required

true: a craft supply or tool; false: a finished product; null when Etsy did not say.

should_auto_renew
boolean | null
required

true: Etsy renews the listing automatically when it expires; null when Etsy did not say.

updated_at
string | null
required

When Etsy last changed the listing.

as_of
string
required

When Etsy answered the write.

change
object
required

The write: its change ID and what landed.

notices
object[]
required

Why a part of the answer is unknown; empty when nothing is.

reverts
string
required

The change this revert undid (chn_...).

restored
string[]
required

The fields restored to the change's before, named as in the listing's shapes.

not_reverted
object[]
required

The fields of the change this revert did not restore, each with its reason; empty when it restored every field.