Move/reorder items in project component 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). Automatically handles side-effects including conditions recalculation, configurationChanged flag updates, summary generation checks, and timeframe updates.
POST
/projects/{projectId}/components/tree/sortAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequiredRequest body
requiredapplication/jsonobjectResponses
200Tree structure updated successfully
messagestringsuccessboolean400Invalid request format, invalid UUIDs, or invalid type values
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions to manage components or access to project denied
404Project not found or component/item not found in project
Request
curl -X POST "https://leadtime.app/api/public/projects/string/components/tree/sort" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'const response = await fetch("https://leadtime.app/api/public/projects/string/components/tree/sort", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({})
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/string/components/tree/sort",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={},
)Response
{
"message": "Products sort updated successfully",
"success": true
}Invalid request format, invalid UUIDs, or invalid type values
Unauthorized - Invalid or missing authentication token
Insufficient permissions to manage components or access to project denied
Project not found or component/item not found in project