Skip to content

Delete a menu

DELETE
/stores/{storeRef}/menus/{id}
curl --request DELETE \
--url https://apibase.ecomweb.app/api/v1/stores/example/menus/1 \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "force": false }'

Marks the menu as deleted so it no longer appears in reads. Send force: true in the body to remove it and its items permanently instead. A menu that was only marked as deleted still holds its reference, so another menu cannot reuse it.

Required scopes: write:menus

id
required
integer

ID of the menu.

storeRef
required
string

The store’s ref, as returned by GET /stores.

Media typeapplication/json
object
force

Force permanent deletion. If false, performs soft delete (sets deleted_at). If true, permanently removes the menu.

boolean

Example

false
Media typeapplication/json
object
type
required

soft when the menu was only marked as deleted, hard when it was removed permanently.

string
Allowed values: soft hard
success
required

True when the menu was deleted.

boolean
message
required

A readable confirmation.

string
entity_id
required

ID of the deleted menu.

number
deleted_at

When the menu was marked as deleted, as an ISO 8601 timestamp. Present on a soft delete only.

string

Example

{
"type": "soft"
}

The request is malformed or failed validation.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The resource does not exist in this store.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}