Skip to content

Restore something from the bin

POST
/storefront/bin/{id}/restore
curl --request POST \
--url https://example.com/storefront/bin/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/restore \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token>

A page or post comes back as a draft, at the address it had, so nothing shows on the shop until it is published. A menu comes back into the shop’s draft, in no place; the same menu already in the draft (put back by an undo) is left as it is and only leaves the bin; a different menu that only shares its id gets this one beside it, under an id of its own. 409 when the shop already has as many menus as it can.

id
required
string format: uuid

What was restored

Media typeapplication/json
object
id
required

The bin entry, for restoring or deleting for good.

string format: uuid
kind
required
string
Allowed values: page post menu
itemId
required
string
name
required

Its title or name when it was deleted.

string
deletedAt
required
string format: date-time
deletedBy
required
object
kind
required

Person: someone signed in. key: an API key. assistant: an app connected over MCP. support: Bottle staff in a support session the business allowed.

string
Allowed values: person key assistant support
name
required

The person’s name then, or the key’s or the app’s.

string
goneAt
required

When it is removed for good.

string format: date-time
wasPublished
required

A page or post that was on the shop when it was deleted. It comes back as a draft: publish it again to put it back.

boolean
daysLeft
required
integer

Example

{
"kind": "page",
"deletedBy": {
"kind": "person"
}
}

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 member, or without the permission this needs

Media typeapplication/json
object
error
required
string
message
required
string

Example

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

Not in the bin: restored or deleted for good already

Media typeapplication/json
object
error
required
string
message
required
string

Example

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

The shop already has as many menus as it can

Media typeapplication/json
object
error
required
string
message
required
string

Example

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