Storyden
Categories

Category Update Position

Update the category's position in the tree. You may change the parent using `parent`, and/or reposition the category among its siblings using either `before` or `after`. Use this operation for drag-and-drop interfaces.

PATCH
/categories/{category_slug}/position

Update the category's position in the tree. You may change the parent using parent, and/or reposition the category among its siblings using either before or after. Use this operation for drag-and-drop interfaces.

Authorization

cookiestoryden-session<token>

Path Parameters

category_slug*string

Unique category URL slug.

Request Body

application/json
  1. body

Parameters for repositioning a category in the hierarchy. Update the parent using parent, and/or reposition among siblings using before or after. Using both before and after is not allowed.

parent?|

Optional new parent category identifier. Set to null to move to the root level.

Formatxid
before?Identifier

Move this category after the sibling with this identifier.

Formatxid
after?Identifier

Move this category after the sibling with this identifier.

Formatxid

Response Body

OK

application/json
  1. response
categories*array<>
Example Request
curl -X PATCH 'https://example.com/api/categories/string/position' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "categories": [    {      "id": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "deletedAt": "2019-08-24T14:15:22Z",      "misc": {},      "name": "string",      "slug": "string",      "description": "string",      "colour": "string",      "sort": 0,      "parent": "string",      "cover_image": {        "id": "string",        "filename": "string",        "path": "string",        "mime_type": "string",        "width": 0,        "height": 0,        "parent": {}      },      "children": [],      "meta": {},      "postCount": 0    }  ]}