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/sortAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequiredRequest body
requiredapplication/jsonpaymentIdsstring[]requiredArray 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
successbooleanrequiredOperation 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"
]
}'const response = await fetch("https://leadtime.app/api/public/projects/string/interim-payments/sort", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"paymentIds": [
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001",
"550e8400-e29b-41d4-a716-446655440002"
]
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/string/interim-payments/sort",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"paymentIds": [
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001",
"550e8400-e29b-41d4-a716-446655440002"
]
},
)Response
{
"success": true
}Invalid input data
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions