Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

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
200

Products reordered successfully

successbooleanrequired

Operation success flag

400

Bad Request - Invalid input

401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient permissions or no project access

404

Not Found - Project does not exist

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://leadtime.app/api/public/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/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
}