Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Set task billing details

What does this do? Sets both the billed time and billed title for a task in a potential invoice. This allows you to customize how the task appears on the invoice, including adjusting the time charged and providing a more customer-friendly title.

When to use:

  • To adjust both the billed hours and the task title in one operation
  • To customize how tasks appear on invoices for better customer clarity
  • To correct billing details before finalizing the invoice

How it works:

  • Updates both task.billedTime and task.billedTitle fields
  • Both fields are optional - you can update just one or both
  • billedTime can be set to null to clear it (revert to using spent time)
  • billedTitle can be set to null to use the original task title
  • The billed time is used to calculate the total charge (billedTime × hourly rate)

Task requirements:

  • Task must belong to the potential invoice’s project
  • Task must not be already billed (billed: false)
  • User must have access to the project

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.

POST/billing/potential-invoices/{id}/tasks/{taskId}/details
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstringrequired
Potential invoice ID in format: {type}::{projectId}::{dateFrom}::{dateTo}
taskIdstring<uuid>required
Task ID (UUID) to update details for
Request body
requiredapplication/json
billedTimenumber | null
Billed time in hours. This is the amount of time that will be charged to the customer, which may differ from the actual time spent. Can be null to clear the billed time. Must be a non-negative number if provided.
min 0
billedTitleobject | null
Custom billed title for the task. This title will appear on the invoice instead of the task title. Can be null to use the original task title. If provided, must be a non-empty string.
Responses
200Task details updated successfully
successbooleanrequired
Operation success flag
401Unauthorized - Invalid or missing authentication token
403User lacks Invoices.manage permission or project access
404Potential invoice or task not found
Request
curl -X POST "https://leadtime.app/api/public/billing/potential-invoices/SingleProject%3A%3A0e9d033a-ab41-4212-8637-66c4e3b01fe2%3A%3A2025-10-01%3A%3A2025-10-31/tasks/550e8400-e29b-41d4-a716-446655440000/details" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "billedTime": 12.5,
  "billedTitle": "Integration of BIM tools with custom workflow adjustments"
}'
Response
{
  "success": true
}