PATCH
/
api
/
v2
/
platform
/
menu_items
/
{id}
/
reposition
curl --request PATCH \
  --url http://{defaultHost}/api/v2/platform/menu_items/{id}/reposition \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "menu_item": {
    "new_parent_id": 1,
    "new_position_idx": 1
  }
}'
{
  "data": {
    "id": "77",
    "type": "menu_item",
    "attributes": {
      "name": "Link no. 62 To Somewhere",
      "subtitle": null,
      "destination": null,
      "new_window": false,
      "item_type": "Link",
      "linked_resource_type": "Spree::Linkable::Uri",
      "code": null,
      "lft": 5,
      "rgt": 6,
      "depth": 2,
      "created_at": "2022-11-08T19:34:27.610Z",
      "updated_at": "2022-11-08T19:34:27.858Z",
      "link": null,
      "is_container": false,
      "is_root": false,
      "is_child": true,
      "is_leaf": true
    },
    "relationships": {
      "icon": {
        "data": {
          "id": "73",
          "type": "icon"
        }
      },
      "menu": {
        "data": {
          "id": "15",
          "type": "menu"
        }
      },
      "parent": {
        "data": {
          "id": "75",
          "type": "menu_item"
        }
      },
      "linked_resource": {
        "data": null
      },
      "children": {
        "data": []
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
menu_item
object
required

Response

200
application/vnd.api+json
Record updated
data
object
required