# Reorder menu items

`PUT https://api.cademi.com.br/api/v3/menus/{menu_key}/items/order`

Operation ID: `menu_items.order.update` · API v3

Sets the display order of the menu items.

The `ids` array must contain the public ID of every item in the menu, in the desired order. Partial reordering is not supported. If the supplied set does not match, the API returns the `order_set_mismatch` error code and the existing order remains unchanged.

Required permissions: `menu_items.update`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `menu_key` | path | string | yes |  |

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
|---|---|---|---|
| `ids` | array of string | yes |  |

## Responses

### 200

Returns the reordered menu items.

Body: `data`: array of MenuItem.

Fields of MenuItem:

| Field | Type | Required | Description |
|---|---|---|---|
| `destination` | object | yes |  |
| `id` | string | yes | Public ID, with the mnu_ prefix. |
| `kind` | string, one of `shortcut`, `product`, `showcase`, `url`, `embed` | yes |  |
| `label` | string | yes |  |
| `object` | string, one of `menu_item` | yes |  |
| `position` | integer | yes |  |
| `revision` | string | yes |  |
| `target` | string, one of `_self`, `_blank` | yes |  |
| `visible` | boolean | yes |  |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The menu key is not recognized.

Body: Error.

### 422

The supplied IDs do not match the set of items in the menu.

Body: Error.

Full schema: https://cademi.dev/openapi/v3.json
