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:
| Type | Create or update | Paged lookup | Read by ID |
|---|---|---|---|
TimeEntry | POST /api/v1/time-entries | POST /api/v1/time-entries/batch | GET /api/v1/time-entries/{id} |
ExpenseEntry | POST /api/v1/expense-entries | POST /api/v1/expense-entries/batch | GET /api/v1/expense-entries/{id} |
OperationalEntry | POST /api/v1/operational-entries | POST /api/v1/operational-entries/batch | GET /api/v1/operational-entries/{id} |
PtoEntry | POST /api/v1/pto-entries | POST /api/v1/pto-entries/batch | GET /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.
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.
| Name | Type | Format | Nullable | Description | Example |
|---|---|---|---|---|---|
systemRef | object | {system, reference} | Yes | External identity used to match an existing entry during upsert. | {"system":"PM","reference":"entry-001"} |
attributes | object | one of the tables below | No | Entry 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.
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.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
pmsRef | string | No | see below | Reference in your practice management system. |
loggedDate | date-time | Yes | — | When the work was done; see below. |
loggedStaffId | Aiwyn ID or {system, reference} | Yes | — | Staff member who did the work. |
clientId | Aiwyn ID or {system, reference} | Yes | — | Client the work was for. |
jobId | Aiwyn ID or {system, reference} | Yes | — | Project. |
taskId | Aiwyn ID or {system, reference} | No | — | Project task; sets the work code. |
code | string | No | — | Work code: a time code code (active preferred), else a task type code. |
units | number | No | see below | Hours worked. Always send it; see below. |
value | number | Yes | — | Amount in currency; see below. |
billedPerUnit | number | No | see below | Billing rate. |
costPerUnit | number | Yes | — | Cost rate; see below. |
billedAmount | number | Yes | — | Amount already billed. 0 for a new entry. |
writeOffAmount | number | Yes | — | Amount written off. 0 for a new entry. |
billable | boolean | No | see below | Whether the work is billable. |
posted | boolean | No | true | Whether the entry is posted. |
approved | boolean | No | true | Whether the entry is approved. |
notes | string | No | — | Entry description. |
internalNotes | string | No | — | Note for your firm. |
onCalendar | boolean | No | false | Whether the entry shows on the staff calendar. |
active | boolean | No | true | false 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.
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.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
pmsRef | string | No | see below | Reference in your practice management system. |
loggedDate | date-time | Yes | — | Date of the expense; see below. |
loggedStaffId | Aiwyn ID or {system, reference} | Yes | — | Staff member who incurred the expense. |
clientId | Aiwyn ID or {system, reference} | Yes | — | Client the expense is for. |
jobId | Aiwyn ID or {system, reference} | No | — | Project. |
code | string | No | — | Expense code code; an active code is preferred when several share it. |
expenseCodeId | integer | No | — | Aiwyn ID of the expense code; wins over code. |
value | number | Yes | — | Expense amount. |
units | number | No | 1 | Send 1. |
costPerUnit | number | Yes | — | Send the expense amount. |
billedPerUnit | number | No | 0 | Send the expense amount. |
billedAmount | number | Yes | — | Amount already billed. 0 for a new expense. |
writeOffAmount | number | Yes | — | Amount written off. 0 for a new expense. |
billable | boolean | Yes | — | Whether the expense is billable. |
posted | boolean | No | true | Whether the expense is posted. |
approved | boolean | No | true | Whether the expense is approved. |
notes | string | No | — | Expense description. |
internalNotes | string | No | — | Note for your firm. |
active | boolean | No | true | false 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. |
Non-client operational time, such as internal training. Send code or operationalCodeId.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
pmsRef | string | No | generated | Reference in your practice management system. |
loggedAt | date-time | Yes | — | When the time was logged; see below. |
loggedStaffId | Aiwyn ID or {system, reference} | Yes | — | Staff member. |
code | string | No | — | Operational code code; an active code is preferred when several share it. |
operationalCodeId | integer | No | — | Aiwyn ID of the operational code; wins over code. |
units | number | No | 1 | Hours. |
comment | string | No | — | Comment. |
internalNotes | string | No | — | Note for your firm. |
serviceLineId | Aiwyn ID or {system, reference} | No | — | Service line. |
status | string | No | DRAFT | DRAFT or SUBMITTED. |
submittedStaffId | Aiwyn ID or {system, reference} | No | — | Staff member who submitted it. |
submittedDate | date-time | No | — | When it was submitted. |
active | boolean | No | true | false 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). |
Paid time off, such as vacation or sick leave. Send code or ptoCodeId.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
pmsRef | string | No | generated | Reference in your practice management system. |
loggedAt | date-time | Yes | — | Day of the time off; see below. |
loggedStaffId | Aiwyn ID or {system, reference} | Yes | — | Staff member taking the time off. |
code | string | No | — | PTO code code; an active code is preferred when several share it. |
ptoCodeId | integer | No | — | Aiwyn ID of the PTO code; wins over code. |
units | number | No | 1 | Hours or days, as your firm records PTO. |
comments | string | No | — | Comments. |
internalNotes | string | No | — | Note for your firm. |
status | string | No | DRAFT | DRAFT or SUBMITTED. |
submittedStaffId | Aiwyn ID or {system, reference} | No | — | Staff member who submitted it. |
submittedDate | date-time | No | — | When it was submitted. |
active | boolean | No | true | false 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). |