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.
/categories/{category_slug}/positionUpdate 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.
In: cookie
Path Parameters
Unique category URL slug.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
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.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/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
}
]
}{
"type": "string",
"title": "string",
"detail": "string",
"trace_id": "string",
"metadata": {}
}