Skip to content
Leadtime
English
Esc
↑↓navigate↵open⌘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
200

Tree structure updated successfully

messagestring
successboolean
400

Invalid request format, invalid UUIDs, or invalid type values

401

Unauthorized - Invalid or missing authentication token

403

Insufficient permissions to edit component library

404

Component/item not found in library

Try it
Server
Authorization
Bodyapplication/json
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
}