Restore something from the bin
const url = 'https://example.com/storefront/bin/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/restore';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/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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”What was restored
object
The bin entry, for restoring or deleting for good.
Its title or name when it was deleted.
object
Person: someone signed in. key: an API key. assistant: an app connected over MCP. support: Bottle staff in a support session the business allowed.
The person’s name then, or the key’s or the app’s.
When it is removed for good.
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.
Example
{ "kind": "page", "deletedBy": { "kind": "person" }}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 member, or without the permission this needs
object
Example
{ "error": "not_found", "message": "Customer not found"}Not in the bin: restored or deleted for good already
object
Example
{ "error": "not_found", "message": "Customer not found"}The shop already has as many menus as it can
object
Example
{ "error": "not_found", "message": "Customer not found"}