Reorder manual positions
What this endpoint does: Updates the sort order of manual positions within a project. The order determines how positions appear in project planning views, quotes, and invoices.
How reordering works:
- Provide an array of position IDs in the desired display order
- The first ID in the array will have sort order 0, the second will have sort order 1, and so on
- All positions must belong to the specified project
- Positions not included in the array will maintain their current sort order (but may appear after the reordered positions)
Validation rules:
- All position IDs must be valid UUIDs
- All positions must belong to the specified project
- Project must exist and user must have access
- Duplicate IDs are not allowed
Permission requirements:
- Requires Projects.manageManualPositions permission
- Requires api scope
- Requires read access to the project
Use cases:
- Organize positions by importance or category
- Group related positions together
- Control the order in which positions appear in quotes and invoices
- Improve readability of project planning overview
POST
/projects/{projectId}/manual-positions/sortAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequiredRequest body
requiredapplication/jsonpositionIdsstring[]requiredArray of position IDs in the desired display order. The first ID will have sort order 0, the second will have sort order 1, and so on. All IDs must belong to the same project. Positions not included in this array will maintain their current sort order.
Responses
200
successbooleanrequiredOperation success flag
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/projects/string/manual-positions/sort" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"positionIds": [
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001"
]
}'const response = await fetch("https://leadtime.app/api/public/projects/string/manual-positions/sort", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"positionIds": [
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001"
]
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/string/manual-positions/sort",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"positionIds": [
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001"
]
},
)Response
{
"success": true
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions