🔐 Required role:
TM_ENTRY_C📖 Data dictionary: Time-management entry
Create or update operational entries (upsert)
Every record is saved with type OperationalEntry, so records carry no type. Maximum 100 records per request.
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. Attributes left out of an update keep their values. A record with any field other than systemRef and attributes is rejected with 400.
| Attribute | 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. |
Select the operational code with code or operationalCodeId; one of them is required. 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).
A record fails with INACTIVE_RESOURCE when the staff member is inactive, CONVERSION_ERROR for an unknown code, UNRESOLVED_REFERENCE when a {system, reference} matches no staff member, service line or submitting staff member (an Aiwyn ID is stored as sent, without a check), BUILD_ERROR when a required attribute, or both the code and its ID, are missing, and VALIDATION_ERROR for a negative units or a blank reference in loggedStaffId.
Custom fields your firm defines for OperationalEntry are accepted too; list them with GET /api/v1/entries/schema/OperationalEntry.
Each record succeeds or fails on its own: 200, 207 or 422 say whether all, some or none succeeded — see Batch writes: per-record results.
- Sandbox (requires Cloudflare Access headers)https://api.sandbox.aiwyn.app/api/v1/operational-entries
- Staging (requires Cloudflare Access headers)https://api.staging.aiwyn.app/api/v1/operational-entries
- Production (your live firm data; no Cloudflare Access headers)https://api.aiwyn.ai/api/v1/operational-entries
curl -i -X POST \
https://api.sandbox.aiwyn.app/api/v1/operational-entries \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'CF-Access-Client-Id: YOUR_API_KEY_HERE' \
-H 'CF-Access-Client-Secret: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"records": [
{
"systemRef": {
"system": "PM",
"reference": "op-entry-001"
},
"attributes": {
"loggedAt": "2026-06-17T09:00:00Z",
"loggedStaffId": {
"system": "PM",
"reference": "12345"
},
"code": "TRAINING",
"units": 1.5,
"comment": "Internal training"
}
}
]
}'{ "data": { "summary": {}, "records": [ … ] }, "error": {}, "meta": { "success": true, "message": "string", "timestamp": "2019-08-24T14:15:22Z", "version": "string" } }