Reorder products
Updates the sort order for multiple products in a project. Products are displayed in the order specified by the provided array of product IDs.
How it works:
- Provide an array of product IDs in the desired display order
- The first ID in the array will have the lowest sort value
- Subsequent IDs receive incrementally higher sort values
- Products not included in the array retain their current sort order
Requirements:
- All product IDs must belong to the specified project
- All product IDs must be valid UUIDs
- Array must contain at least one product ID
Use cases:
- Reorganizing product list for better presentation
- Grouping related products together
- Prioritizing important products at the top
POST
/projects/{projectId}/products/sortAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstring<uuid>requiredProject ID
Request body
requiredapplication/jsonidsstring[]requiredArray of product UUIDs in the desired display order. The first UUID in the array will appear first in the product list, the second UUID will appear second, and so on. All product IDs must belong to the same project. Products not included in this array will retain their current sort order.
Responses
200Products reordered successfully
successbooleanrequiredOperation success flag
400Bad Request - Invalid input
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient permissions or no project access
404Not Found - Project does not exist
Request
curl -X POST "https://leadtime.app/api/public/projects/%3Cuuid%3E/products/sort" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"550e8400-e29b-41d4-a716-446655440008",
"550e8400-e29b-41d4-a716-446655440009",
"550e8400-e29b-41d4-a716-446655440010"
]
}'const response = await fetch("https://leadtime.app/api/public/projects/%3Cuuid%3E/products/sort", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"ids": [
"550e8400-e29b-41d4-a716-446655440008",
"550e8400-e29b-41d4-a716-446655440009",
"550e8400-e29b-41d4-a716-446655440010"
]
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/%3Cuuid%3E/products/sort",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"ids": [
"550e8400-e29b-41d4-a716-446655440008",
"550e8400-e29b-41d4-a716-446655440009",
"550e8400-e29b-41d4-a716-446655440010"
]
},
)Response
{
"success": true
}Bad Request - Invalid input
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient permissions or no project access
Not Found - Project does not exist