Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Get potential invoices

What are Potential Invoices? Potential invoices represent billable items that are ready to be invoiced but have not been converted to actual invoices yet. These are invoice drafts that appear in the invoice review section, waiting to be checked, adjusted, and finalized into official invoice documents.

What gets included:

  • Subscription billing rows that have passed their billing date
  • Time-based work (tasks with logged time) that has not been billed yet
  • Express quotations that have been accepted by customers
  • Products and components that are ready for billing
  • Manual positions and interim payments

What data is returned:

  • List of all potential invoices grouped by project, organization, and billing period
  • Each potential invoice includes the billing period (dateFrom, dateTo), total net amount, and invoice type
  • Results are automatically filtered based on project access permissions
  • Each entry shows which organization and project it belongs to

Invoice Types:

  • Mixed: Combined invoice with multiple billing types (time, subscriptions, products, components)
  • Subscription: Recurring subscription billing only (monthly or periodic fees)
  • TimeBased: Time-based work (logged hours on tasks) only
  • ExpressQuotation: Accepted express quotations only (quick add-ons from tickets)
  • SingleProject: Single project invoice (project-based billing)
  • InterimPayment: Interim or advance payment invoice

How it works: The system automatically creates potential invoices when billable items become due. For example, completed tickets appear as time-based items, subscriptions generate entries on their billing dates, and accepted express quotations become billable immediately.

Permission requirements: Requires Invoices.manage permission to view potential invoices. Results are scoped to projects you have access to.

GET/billing/potential-invoices
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:read
or
AuthorizationBearer token (JWT) · headerrequired
Responses
200Potential invoices retrieved successfully
Array of PotentialInvoiceResponseDto
dateFromstring<date>required
Start date of the billing period (ISO 8601 date string, YYYY-MM-DD format). This is when the billable period begins.
dateKeystringrequired
Date key used for grouping potential invoices by month (format: YYYY-MM). Used for organizing invoices in the list view.
dateTostring<date>required
End date of the billing period (ISO 8601 date string, YYYY-MM-DD format). This is when the billable period ends.
idstring<string>required
Unique identifier for the potential invoice. Format: {type}::{projectId}::{dateFrom}::{dateTo}. This ID is used to reference the invoice in other endpoints.
orgIdstring<uuid>required
Organization ID (UUID) of the customer organization for this potential invoice. This is the organization that will be billed.
projectIdstring<uuid>required
Project ID (UUID) associated with this potential invoice. This is the project where the billable work was performed.
totalnumberrequired
Total net amount for this potential invoice (before tax). This is the sum of all billable items in the invoice.
typestringrequired
Type of invoice indicating what kind of billable items are included. See InvoiceType enum for all possible values.
Allowed:MixedSubscriptionTimeBasedExpressQuotationSingleProjectInterimPaymentSupportContingentCharge
401Unauthorized - Invalid or missing authentication token
403User lacks Invoices.manage permission
Request
curl -X GET "https://leadtime.app/api/public/billing/potential-invoices" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
[
  {
    "dateFrom": "2024-01-01",
    "dateKey": "2024-01",
    "dateTo": "2024-01-31",
    "id": "SingleProject::0e9d033a-ab41-4212-8637-66c4e3b01fe2::2025-10-01::2025-10-31",
    "orgId": "660e8400-e29b-41d4-a716-446655440001",
    "projectId": "550e8400-e29b-41d4-a716-446655440000",
    "total": 1250.5,
    "type": "Mixed"
  }
]