Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

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:

  1. Provide an array of product IDs in the desired display order
  2. The first ID in the array will have the lowest sort value
  3. Subsequent IDs receive incrementally higher sort values
  4. 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/sort
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
projectIdstring<uuid>required
Project ID
Request body
requiredapplication/json
idsstring[]required
Array 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
successbooleanrequired
Operation 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"
  ]
}'
Response
{
  "success": true
}