Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

Reorder interim payments

Updates the sort order of interim payments by providing a new ordered list of payment IDs.

How reordering works:

  • Provide an array of payment IDs in the desired display order
  • The first ID in the array gets sort order 0, the second gets 1, and so on
  • Payments not included in the array retain their current sort order
  • This affects the order in which payments appear in list responses

Example: To display payments in order: Payment A, Payment C, Payment B Send: { “paymentIds”: [“id-of-A”, “id-of-C”, “id-of-B”] }

Validation:

  • All payment IDs must be valid UUIDs
  • All payment IDs must belong to the specified project
  • Array cannot be empty

Use cases:

  • Organize payments chronologically (e.g., first payment, second payment, final payment)
  • Group related payments together
  • Prioritize certain payments in the display

Permissions: Requires Projects.edit permission

POST/projects/{projectId}/interim-payments/sort
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
projectIdstringrequired
Request body
requiredapplication/json
paymentIdsstring[]required
Array of payment IDs in the desired display order. Each ID must be a valid UUID v4 belonging to the project. The first ID in the array will have sort order 0, the second will have sort order 1, and so on. Payments not included in this array will retain their current sort order. The array cannot be empty.
Responses
200Interim payments reordered successfully
successbooleanrequired
Operation success flag
400Invalid input data
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/projects/string/interim-payments/sort" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "paymentIds": [
    "550e8400-e29b-41d4-a716-446655440000",
    "550e8400-e29b-41d4-a716-446655440001",
    "550e8400-e29b-41d4-a716-446655440002"
  ]
}'
Response
{
  "success": true
}