Skip to content

Copy the WooCommerce website into the shop

POST
/storefront/import
curl --request POST \
--url https://example.com/storefront/import \
--header 'Content-Type: application/json' \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token> \
--data '{ "shopId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "replaceDraft": false }'

Starts copying a connected WooCommerce shop’s WordPress website into this business’s shop, in the background: published pages and blog posts (as drafts), menus, pictures, then a first draft of the look and home page. It replaces the shop’s draft, never the live shop, and publishes nothing. When the shop has been published, has pages or posts, or its draft has been changed, send replaceDraft true, or it is 409 and nothing starts. Starting again after one stopped carries on where it left off. Watch it with GET /storefront/import.

Media typeapplication/json
object
shopId
required

UUID v7

string format: uuid

Example

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

Started

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

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 shop connection

Media typeapplication/json
object
error
required
string
message
required
string

Example

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

One is already running, the shop is not WooCommerce, or replaceDraft is needed

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"
}
]
}

Five started in the last day already

Media typeapplication/json
object
error
required
string
message
required
string

Example

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

It could not be started; nothing was done

Media typeapplication/json
object
error
required
string
message
required
string

Example

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