Skip to content

Undo copying the website

POST
/storefront/import/{id}/undo
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.

id
required

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

UUID v7

Undone

Media typeapplication/json
object
import
required
object
id
required

UUID v7

string format: uuid
shopId
required

UUID v7

string | null format: uuid
status
required

Queued: waiting to start. running: under way. done: finished. failed: stopped; starting again carries on. undone: what it made was taken out again.

string
Allowed values: queued running done failed undone
step
required

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.

string
Allowed values: fetching pictures converting drafting done
progress
required
object
done
required
integer
total
required
integer
counts
required
object
pages
required
integer
posts
required
integer
menus
required
integer
pictures
required
integer
picturesFailed
required
integer
draftedByAi
required
boolean
notes
required
Array<object>
object
key
required
string
<= 80 characters
values
object
key
additional properties
Any of:
string
error
required
string | null
canUndo
required
boolean
createdAt
required
string format: date-time
finishedAt
required
string | null format: date-time
sources
required
Array<object>
object
id
required

UUID v7

string format: uuid
name
required
string
replacesWork
required
boolean
undone
required
object
pagesRemoved
required
integer
postsRemoved
required
integer
kept
required
integer
draftKept
required
boolean

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

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

The plan does not include a shop

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not a person signed in as an owner or admin, or without the permission

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

No such import

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Nothing to undo

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string

Example

{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}