API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console

GET /v1/time-records/draft-summary

GET/v1/time-records/draft-summary

Returns, per customer company, an overview of the time bookings still in DRAFT status: count, minutes and estimated amount, plus isComplete as a traffic light for companies without open drafts. All organizations are returned, including those without open drafts — in party_team mode restricted to the team’s customer companies.

from/to bound the booking date. teamId is resolved according to the tenant setting teamFilterMode — either to the team’s members or to its customer companies.

Two sets are deliberately not included:

  • Project work — bookings on a project or on a task that belongs to a project. This time is reviewed in the project at project completion, not in service recording. The overview thus applies the same rule as the entries table (GET /v1/time_records?excludeProjectWork=true), to which clicking a company jumps — otherwise a tile would announce hours that the list below does not show.
  • Standalone-billed projects and tickets — units with standaloneBilling.enabled. They are invoiced per unit and must not appear twice in a collective per-customer preview.

Both criteria are independent of each other and do not coincide.

Data model

This operation works on the entity Time Record (time_record). All 110 fields — type, validation, required status, relationships — are listed in the schema reference.

Query parameters

NameTypeDescription
fromstring<date>
tostring<date>
teamIdstring

Example

curl -X GET https://api.codemeta-os.de/v1/time-records/draft-summary \
  -H "X-Tenant-Id: $TENANT" \
  -b cookies.txt
const result = await cm.time-records.list();

Best practice

Use the endpoint as a work queue, not as a billing total. The amounts are produced via the same price cascade as the service report, but are an estimate based on drafts — they will still change as long as the bookings have not been approved.

Query a concrete period with from/to instead of leaving it unbounded: without a date window, the response grows with the tenant’s history, and the “last service” metric then becomes hardly meaningful.

Response codes

HTTP Meaning
200 Default Response

Search