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.
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}/positionstoryden-session<token>
In: cookie
Path Parameters
category_slugstring
Unique category URL slug.
parent?NullableIdentifier
Optional new parent category identifier. Set to null to move to the root level.
Format
xidbefore?Identifier
Move this category before the sibling with this identifier.
Format
xidafter?Identifier
Move this category after the sibling with this identifier.
Format
xidResponse Body
curl -X PATCH "https://loading/api/categories/string/position" \ -H "Content-Type: application/json" \ -d '{}'{
"categories": [
{
"id": "cc5lnd2s1s4652adtu50",
"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": "cc5lnd2s1s4652adtu50",
"cover_image": {
"id": "cc5lnd2s1s4652adtu50",
"filename": "string",
"path": "string",
"mime_type": "string",
"width": 0,
"height": 0,
"parent": {
"id": "cc5lnd2s1s4652adtu50",
"filename": "string",
"path": "string",
"mime_type": "string",
"width": 0,
"height": 0,
"parent": {}
}
},
"children": [
{
"id": "cc5lnd2s1s4652adtu50",
"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": "cc5lnd2s1s4652adtu50",
"cover_image": {
"id": "cc5lnd2s1s4652adtu50",
"filename": "string",
"path": "string",
"mime_type": "string",
"width": 0,
"height": 0,
"parent": {
"id": "cc5lnd2s1s4652adtu50",
"filename": "string",
"path": "string",
"mime_type": "string",
"width": 0,
"height": 0,
"parent": {}
}
},
"children": [],
"meta": {},
"postCount": 0
}
],
"meta": {},
"postCount": 0
}
]
}Empty
Empty
Empty
{
"error": "string",
"message": "string",
"suggested": "string",
"metadata": {}
}