Reorder manual positions in potential invoice
What does this do? Reorders the manual positions in a potential invoice. The positions will appear in the order specified by the items array.
When to use:
- To change the display order of manual positions on the invoice
- To group related positions together
- To organize positions in a logical sequence
How it works:
- Updates the sort order of manual positions stored in the potential invoice metadata
- Only custom manual positions (type: manual) can be reordered
- Project manual positions (from project snapshots) maintain their original order
- The items array should contain all position IDs in the desired order
- Positions not included in the array will be placed at the end
Position requirements:
- All position IDs in the items array must exist in the potential invoice
- Only custom manual positions can be reordered
- The array can include a subset of positions (others will be placed at the end)
Invoice ID Format: The invoice ID follows the format: {type}::{projectId}::{dateFrom}::{dateTo}
- Example: SingleProject::0e9d033a-ab41-4212-8637-66c4e3b01fe2::2025-10-01::2025-10-31
Permission requirements: Requires Invoices.manage permission and access to the project.
/billing/potential-invoices/{id}/manual-positions/sortAuthorizationOAuth2 access token · headerrequiredapi:writeAuthorizationBearer token (JWT) · headerrequiredidstringrequiredPotential invoice ID in format: {type}::{projectId}::{dateFrom}::{dateTo}
application/jsonitemsstring[]requiredArray of manual position IDs in the desired sort order. Only custom manual positions (type: manual) can be reordered.
Manual positions reordered successfully
successbooleanrequiredOperation success flag
Unauthorized - Invalid or missing authentication token
User lacks Invoices.manage permission or project access
Potential invoice not found