Skip to content

Time-management entry

Time-management entries record the time, expenses, operational time and paid time off of your staff. There are four entry types: TimeEntry, ExpenseEntry, OperationalEntry and PtoEntry. Each is logged against a code of the same kind; see Time-management code.

Each type has its own endpoints:

TypeCreate or updatePaged lookupRead by ID
TimeEntryPOST /api/v1/time-entriesPOST /api/v1/time-entries/batchGET /api/v1/time-entries/{id}
ExpenseEntryPOST /api/v1/expense-entriesPOST /api/v1/expense-entries/batchGET /api/v1/expense-entries/{id}
OperationalEntryPOST /api/v1/operational-entriesPOST /api/v1/operational-entries/batchGET /api/v1/operational-entries/{id}
PtoEntryPOST /api/v1/pto-entriesPOST /api/v1/pto-entries/batchGET /api/v1/pto-entries/{id}

The same records can also be managed through the shared entry endpoints with type set on each record: POST /api/v1/entries and POST /api/v1/entries/batch/{type}; see Time entry.

Entries can also carry custom fields your firm defines. GET /api/v1/entries/schema/{type} lists every field of a type for your tenant, custom fields included.

Entry record envelope

A create or update request wraps each entry's attributes in a record. On the per-type endpoints the path decides the type, so records carry no type.

NameTypeFormatNullableDescriptionExample
systemRefobject{system, reference}YesExternal identity used to match an existing entry during upsert.{"system":"PM","reference":"entry-001"}
attributesobjectone of the tables belowNoEntry fields. Attributes left out of an update keep their values.—

A record updates the entry its systemRef names: the same system and reference, the entry with that Aiwyn ID when system is aiwyn, or else the entry whose pmsRef is the reference. Without a systemRef, it updates the entry whose pmsRef is attributes.pmsRef. When nothing matches, a new entry is created. Fields that reference another record (loggedStaffId, clientId, jobId, ...) take an Aiwyn ID or a {system, reference} object. A {system, reference} that matches no record fails with UNRESOLVED_REFERENCE; an Aiwyn ID is stored as sent, without a check. A time entry needs a jobId.

A paged lookup returns type, pageSize, page, returned and records; each record, and the response of a read by ID, has the shape described under Time-management code. Both return active entries only: a deactivated entry is no longer listed or found by ID.

TimeEntry

Hours a staff member worked for a client. attributes.type is always Time; a type sent in attributes is replaced. How value, billedPerUnit, costPerUnit and billable are set depends on whether rate resolution is enabled for your firm; see POST /api/v1/time-entries. Always send units.

NameTypeRequiredDefaultDescription
pmsRefstringNosee belowReference in your practice management system.
loggedDatedate-timeYes—When the work was done; see below.
loggedStaffIdAiwyn ID or {system, reference}Yes—Staff member who did the work.
clientIdAiwyn ID or {system, reference}Yes—Client the work was for.
jobIdAiwyn ID or {system, reference}Yes—Project.
taskIdAiwyn ID or {system, reference}No—Project task; sets the work code.
codestringNo—Work code: a time code code (active preferred), else a task type code.
unitsnumberNosee belowHours worked. Always send it; see below.
valuenumberYes—Amount in currency; see below.
billedPerUnitnumberNosee belowBilling rate.
costPerUnitnumberYes—Cost rate; see below.
billedAmountnumberYes—Amount already billed. 0 for a new entry.
writeOffAmountnumberYes—Amount written off. 0 for a new entry.
billablebooleanNosee belowWhether the work is billable.
postedbooleanNotrueWhether the entry is posted.
approvedbooleanNotrueWhether the entry is approved.
notesstringNo—Entry description.
internalNotesstringNo—Note for your firm.
onCalendarbooleanNofalseWhether the entry shows on the staff calendar.
activebooleanNotruefalse deactivates the entry.
Without pmsRef, a new entry takes systemRef.reference when systemRef.system is PM, and a generated reference
otherwise. loggedDate is an ISO-8601 date-time with Z or an offset, for example 2026-06-17T00:00:00Z; an offset
is converted to UTC. A date alone, or a date-time without Z or an offset, fails with VALIDATION_ERROR.

With rate resolution enabled, leave billedPerUnit out to have Aiwyn price the entry: it rounds the hours, takes billable from the work code when you don't send it, and computes value, billedPerUnit and costPerUnit from the rate card (send 0 for value and costPerUnit). Without units, value is read as the hours. Send billedPerUnit to have the entry stored as sent. Without rate resolution, every entry is stored as sent, units defaults to 1 and billable to true.

ExpenseEntry

An expense a staff member incurred for a client. attributes.type is always Expense; a type sent in attributes is replaced. Reading an expense entry back does not return units, costPerUnit, billedPerUnit, billedAmount, writeOffAmount, pmsRef, its stored systemRefs or custom fields; the values sent are stored.

NameTypeRequiredDefaultDescription
pmsRefstringNosee belowReference in your practice management system.
loggedDatedate-timeYes—Date of the expense; see below.
loggedStaffIdAiwyn ID or {system, reference}Yes—Staff member who incurred the expense.
clientIdAiwyn ID or {system, reference}Yes—Client the expense is for.
jobIdAiwyn ID or {system, reference}No—Project.
codestringNo—Expense code code; an active code is preferred when several share it.
expenseCodeIdintegerNo—Aiwyn ID of the expense code; wins over code.
valuenumberYes—Expense amount.
unitsnumberNo1Send 1.
costPerUnitnumberYes—Send the expense amount.
billedPerUnitnumberNo0Send the expense amount.
billedAmountnumberYes—Amount already billed. 0 for a new expense.
writeOffAmountnumberYes—Amount written off. 0 for a new expense.
billablebooleanYes—Whether the expense is billable.
postedbooleanNotrueWhether the expense is posted.
approvedbooleanNotrueWhether the expense is approved.
notesstringNo—Expense description.
internalNotesstringNo—Note for your firm.
activebooleanNotruefalse deactivates the expense.
Without pmsRef, a new expense takes systemRef.reference when systemRef.system is PM, and a generated reference
otherwise. loggedDate is an ISO-8601 date-time with Z or an offset, for example 2026-06-17T00:00:00Z; an offset
is converted to UTC. A date alone, or a date-time without Z or an offset, fails with VALIDATION_ERROR.

OperationalEntry

Non-client operational time, such as internal training. Send code or operationalCodeId.

NameTypeRequiredDefaultDescription
pmsRefstringNogeneratedReference in your practice management system.
loggedAtdate-timeYes—When the time was logged; see below.
loggedStaffIdAiwyn ID or {system, reference}Yes—Staff member.
codestringNo—Operational code code; an active code is preferred when several share it.
operationalCodeIdintegerNo—Aiwyn ID of the operational code; wins over code.
unitsnumberNo1Hours.
commentstringNo—Comment.
internalNotesstringNo—Note for your firm.
serviceLineIdAiwyn ID or {system, reference}No—Service line.
statusstringNoDRAFTDRAFT or SUBMITTED.
submittedStaffIdAiwyn ID or {system, reference}No—Staff member who submitted it.
submittedDatedate-timeNo—When it was submitted.
activebooleanNotruefalse deactivates the entry.
loggedAt takes a date (read as midnight), a date-time without an offset (stored as sent), or one with Z or an
offset (converted to UTC).

PtoEntry

Paid time off, such as vacation or sick leave. Send code or ptoCodeId.

NameTypeRequiredDefaultDescription
pmsRefstringNogeneratedReference in your practice management system.
loggedAtdate-timeYes—Day of the time off; see below.
loggedStaffIdAiwyn ID or {system, reference}Yes—Staff member taking the time off.
codestringNo—PTO code code; an active code is preferred when several share it.
ptoCodeIdintegerNo—Aiwyn ID of the PTO code; wins over code.
unitsnumberNo1Hours or days, as your firm records PTO.
commentsstringNo—Comments.
internalNotesstringNo—Note for your firm.
statusstringNoDRAFTDRAFT or SUBMITTED.
submittedStaffIdAiwyn ID or {system, reference}No—Staff member who submitted it.
submittedDatedate-timeNo—When it was submitted.
activebooleanNotruefalse deactivates the entry.
loggedAt takes a date (read as midnight), a date-time without an offset (stored as sent), or one with Z or an
offset (converted to UTC).