Menus

Add, edit, and delete anything related to WP EasyCart menus.

MenuItem

level
integer

The level of this menu item, must be 1-3.

menu_id
integer

The unique ID of this menu item in WP EasyCart

post_id
integer

The unique ID of this item in WordPress

menu_name
string

The name of this menu.

sort_order
integer

The sort order of this menu item.

clicks
integer

The number of views/clicks for this menu item.

banner_image
string

The image that can show on the menu page, should be a URL.

seo_description
string

The meta description for this menu.

seo_keywords
string

The meta keywords for this menu.

{
  • "level": 0,
  • "menu_id": 0,
  • "post_id": 0,
  • "menu_name": "string",
  • "sort_order": 0,
  • "clicks": 0,
  • "banner_image": "string",
  • "seo_description": "string",
  • "seo_keywords": "string"
}

Gets a list of menus

This allows you to get a list of menus

SecuritybearerAuth or basicAuth
Request
query Parameters
page
integer <int64>

Page number starting at 1

perpage
integer <int64>

Number of items per page

sortby
string

Sort results by term

sortdir
string

Sort results ASC or DESC

search
string

Filter menus by a search term

Responses
200

Successful operation

400

Unauthorized

get/menus
Request samples
Response samples
application/json
[
  • {
    }
]

Add a menu

This allows you to add a new menu

SecuritybearerAuth
Request
Request Body schema: application/json
required

Submit any or all elements to add a new menu.

level
required
integer

The level of this menu item, must be 1-3.

menu_name
required
string

The name of this menu.

sort_order
integer

The sort order of this menu item.

clicks
integer

The number of views/clicks for this menu item.

banner_image
string

The image that can show on the menu page, should be a URL.

seo_description
string

The meta description for this menu.

seo_keywords
string

The meta keywords for this menu.

Responses
200

Successful operation

400

Unauthorized

post/menus
Request samples
application/json
{
  • "level": 0,
  • "menu_name": "string",
  • "sort_order": 0,
  • "clicks": 0,
  • "banner_image": "string",
  • "seo_description": "string",
  • "seo_keywords": "string"
}
Response samples
application/json
{
  • "level": 0,
  • "menu_id": 0,
  • "post_id": 0,
  • "menu_name": "string",
  • "sort_order": 0,
  • "clicks": 0,
  • "banner_image": "string",
  • "seo_description": "string",
  • "seo_keywords": "string"
}

Gets a menu by ID and level

This allows you to get a menu from your store by menu ID and level

SecuritybearerAuth or basicAuth
Request
path Parameters
menu_id
required
integer <int64>

Menu ID

level
required
integer <int64>

Menu Level

Responses
200

Successful operation

400

Unauthorized

get/menus/{level}/{menu_id}
Request samples
Response samples
application/json
{
  • "level": 0,
  • "menu_id": 0,
  • "post_id": 0,
  • "menu_name": "string",
  • "sort_order": 0,
  • "clicks": 0,
  • "banner_image": "string",
  • "seo_description": "string",
  • "seo_keywords": "string"
}

Updates a menu by ID and level

This allows you to update a menu

SecuritybearerAuth
Request
path Parameters
menu_id
required
integer <int64>

Menu ID

level
required
integer <int64>

Menu Level

Request Body schema: application/json
required

Submit any or all elements to update the menu.

level
integer

The level of this menu item, must be 1-3.

menu_name
string

The name of this menu.

sort_order
integer

The sort order of this menu item.

clicks
integer

The number of views/clicks for this menu item.

banner_image
string

The image that can show on the menu page, should be a URL.

seo_description
string

The meta description for this menu.

seo_keywords
string

The meta keywords for this menu.

Responses
200

Successful operation

400

Unauthorized

patch/menus/{level}/{menu_id}
Request samples
application/json
{
  • "level": 0,
  • "menu_name": "string",
  • "sort_order": 0,
  • "clicks": 0,
  • "banner_image": "string",
  • "seo_description": "string",
  • "seo_keywords": "string"
}
Response samples
application/json
{
  • "level": 0,
  • "menu_id": 0,
  • "post_id": 0,
  • "menu_name": "string",
  • "sort_order": 0,
  • "clicks": 0,
  • "banner_image": "string",
  • "seo_description": "string",
  • "seo_keywords": "string"
}

Deletes a menu by ID

This allows you to delete a menu from your store

SecuritybearerAuth
Request
path Parameters
menu_id
required
integer <int64>

Menu ID

level
required
integer <int64>

Menu Level

Responses
200

Successful operation

400

Unauthorized

delete/menus/{level}/{menu_id}
Request samples
Response samples
application/json
{
  • "level": 0,
  • "menu_id": 0,
  • "post_id": 0,
  • "menu_name": "string",
  • "sort_order": 0,
  • "clicks": 0,
  • "banner_image": "string",
  • "seo_description": "string",
  • "seo_keywords": "string"
}