Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Move/reorder items in component library tree

Allows reordering components and items at the same level, reparenting items to different components or parent items, and moving items between components (automatically updates componentId for all descendants). When parent is null, sorts components. When parent is provided, sorts items within that parent. Automatically handles side-effects including conditions cleanup and timeframe updates. Only library components and items (component.projectId is null) can be reordered through this endpoint.

POST/administration/project-components/tree/sort
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Request body
requiredapplication/json
object
Responses
200Tree structure updated successfully
messagestring
successboolean
400Invalid request format, invalid UUIDs, or invalid type values
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions to edit component library
404Component/item not found in library
Request
curl -X POST "https://leadtime.app/api/public/administration/project-components/tree/sort" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response
{
  "message": "Products sort updated successfully",
  "success": true
}