Undo copying the website
const url = 'https://example.com/storefront/import/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/undo';const options = { method: 'POST', headers: {cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/storefront/import/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/undo \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token>Puts the pages and blog posts the import made in the bin, where each is still exactly as the import made it, and puts the shop’s draft back as it was before, while the draft is still the one the import saved. Anything changed or published since is kept and counted (kept), and a draft changed since stays as it is (draftKept). Pictures are kept.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Responses
Section titled “Responses”Undone
object
object
UUID v7
UUID v7
Queued: waiting to start. running: under way. done: finished. failed: stopped; starting again carries on. undone: what it made was taken out again.
Fetching: reading the website. pictures: copying its pictures. converting: making pages and blog posts. drafting: setting up the look, home page and menus. done: finished.
object
object
object
UUID v7
object
Example
{ "import": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "shopId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "status": "queued", "step": "fetching", "notes": [ { "values": {} } ] }, "sources": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ]}Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}The plan does not include a shop
object
Example
{ "error": "not_found", "message": "Customer not found"}Not a person signed in as an owner or admin, or without the permission
object
Example
{ "error": "not_found", "message": "Customer not found"}No such import
object
Example
{ "error": "not_found", "message": "Customer not found"}Nothing to undo
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}