Wocart
Wocart API

Navigation

Server

List menus

GET
https://api.wocart.store
/api/menus
X-API-Key (header)

Every menu of the store, oldest first, with how many items each holds.

List menus › Responses

200

The store's menus

success
​boolean · required
​MenuSummary[] · required
count
​integer · required

Create a menu

POST
https://api.wocart.store
/api/menus
X-API-Key (header)

An empty menu; add its items with PUT /{id}/items.

Create a menu › Request Body

handle
​string · pattern: ^[a-z0-9][a-z0-9-]{0… · required

Lowercase letters, digits and hyphens; how a theme names the menu

title
​string · minLength: 1 · maxLength: 100 · required

Create a menu › Responses

The new menu

success
​boolean · required
​MenuDetail · required

Find what a menu item can point at

GET
https://api.wocart.store
/api/menus/destinations
X-API-Key (header)

Up to 20 products, categories, store pages or landing pages whose name or slug contains q, each with its public path and whether shoppers can see it now.

Find what a menu item can point at › query Parameters

type
​string · enum · required
Enum values:
category
collection
product
page
landing
q
​string · maxLength: 100

Part of the name or slug

Part of the name or slug

Find what a menu item can point at › Responses

200

Matching destinations

success
​boolean · required
​MenuDestinationOption[] · required

Get a menu

GET
https://api.wocart.store
/api/menus/{id}
X-API-Key (header)

A menu with its item tree. Each item says whether shoppers can follow it (destinationStatus).

Get a menu › path Parameters

id
​string · required

Menu id

Menu id

Get a menu › Responses

The menu

success
​boolean · required
​MenuDetail · required

Rename a menu

PATCH
https://api.wocart.store
/api/menus/{id}
X-API-Key (header)

Changes its title or handle. A theme reads a menu by handle, so a new handle moves the menu out of every theme setting that named the old one.

Rename a menu › path Parameters

id
​string · required

Menu id

Menu id

Rename a menu › Request Body

handle
​string · pattern: ^[a-z0-9][a-z0-9-]{0…

Lowercase letters, digits and hyphens; how a theme names the menu

title
​string · minLength: 1 · maxLength: 100

Rename a menu › Responses

The menu

success
​boolean · required
​MenuDetail · required

Delete a menu

DELETE
https://api.wocart.store
/api/menus/{id}
X-API-Key (header)

Deletes the menu with its items and their translations. A theme setting naming it then renders no menu.

Delete a menu › path Parameters

id
​string · required

Menu id

Menu id

Delete a menu › Responses

Deleted

success
​boolean · required
​object · required

Save a menu's items

PUT
https://api.wocart.store
/api/menus/{id}/items
X-API-Key (header)

Replaces the menu's items with this tree, at once. An item sent with its id keeps it and its translations; an item left out is deleted. At most three levels and 100 items.

Save a menu's items › path Parameters

id
​string · required

Menu id

Menu id

Save a menu's items › Request Body

​MenuItemInput[] · required

The whole tree, in order; at most three levels and 100 items

Save a menu's items › Responses

The menu as saved

success
​boolean · required
​MenuDetail · required

Get a menu item's translations

GET
https://api.wocart.store
/api/menus/items/{id}/translations
X-API-Key (header)

The translatable fields in the store's primary language and every stored translation, each flagged outdated when its source text changed after it was written.

Get a menu item's translations › path Parameters

id
​string · required

Get a menu item's translations › Responses

200

Source and translations

success
​boolean · required
​object · required

Translate a menu item into one language

PATCH
https://api.wocart.store
/api/menus/items/{id}/translations
X-API-Key (header)

A JSON Merge Patch (RFC 7396) of one language: a string sets a field, null removes its translation, other fields are untouched. The language must be one the store has added, and not its primary — the resource's own fields hold that.

Translate a menu item into one language › path Parameters

id
​string · required

Translate a menu item into one language › Request Body

locale
​string · enum · required
Enum values:
ar
fr
en
​object · required

Translate a menu item into one language › Responses

200

Source and translations after the patch

success
​boolean · required
​object · required