Skip to content

[EXPERIMENTAL] Upsert Actual

Request

Upsert a single Actual for an Employee.

Security
clientCredentials
Path
employee_idstringrequired

employee_id of the employee that the Actual applies to

Example:my-employee-id
idstring^[a-zA-Z0-9.~\-_]{1,512}$required

Unique identifier for this Actual. Should only contain characters which do not need URL encoding.

Headers
PreferArray of strings

The RFC7240 Prefer header indicates that a particular server behavior is preferred by the client but is not required for successful completion of the request (see RFC 7240).

The following behavior (see Examples) is supported by this API:

  • return=<minimal|representation> is used to suggest the server to return using 204 without resource (minimal) or using 200 or 201 with resource (representation) in the response body on success.
Examples:
minimal
Indicate no response is needed, can be omitted
["return=minimal"]
representation
Request the result of the operation as response
["return=representation"]
If-Matchstring

Weak Etag used for optimistic locking.

Example:W/"24"
Bodyapplication/json
startstring, (date-time)required

A date and time when the activity was started.

Example:"2025-05-14T08:00:00Z"
endstring, (date-time)

A date and time when the activity has ended.

Example:"2025-05-14T17:00:00Z"
work_timestring, (ISO-8601)required

The total work time performed by an Employee. Must be an ISO-8601 compliant Duration string. Must be strictly positive.

Example:"PT8H"
Payload
{ "start": "2025-05-14T08:00:00Z", "end": "2025-05-14T17:00:00Z", "work_time": "PT8H" }

Responses

Actual created or updated

Headers
ETagstring

A weak Etag (ex W/"<etag_value>") which contains the current version of the entity

Example:"W/\"25\""
Preference-Appliedstring

Indicates whether a preference has been applied. (ex return=representation)

Locationstring, (URI)

A URI to access the result of the operation.

Bodyapplication/json
employee_idstringread-onlyrequired
Example:"hvertenten"
idstring^[a-zA-Z0-9.~\-_]+$read-onlyrequired

Unique identifier for this Actual.

Example:"14-05-2025-morning-shift"
startstring, (date-time)required

A date and time when the activity was started.

Example:"2025-05-14T08:00:00Z"
endstring, (date-time)

A date and time when the activity has ended.

Example:"2025-05-14T17:00:00Z"
work_timestring, (ISO-8601)required

The total work time performed by an Employee. Must be an ISO-8601 compliant Duration string. Must be strictly positive.

Example:"PT8H"
business_idstring^[a-zA-Z0-9.~\-_]+$read-onlyrequireddeprecated

Unique identifier for this Actual. Deprecated in favor of id.

Example:"14-05-2025-morning-shift"
Response
{ "employee_id": "hvertenten", "business_id": "14-05-2025-morning-shift", "id": "14-05-2025-morning-shift", "start": "2025-05-14T08:00:00Z", "end": "2025-05-14T17:00:00Z", "work_time": "PT8H" }