Retrieve a request
Returns a single hours to validate request by its internal ID.
Tip
Check the Swagger page for more technical information on the endpoints.
Endpoint details
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/hours-to-validate-requests/{id}
Headers: Authorization: Bearer {token}, User-Agent: {agent}
Scope: connector-protimeapi-hours-to-validate.read
URL parameters
| Parameter | Description |
|---|---|
{id} |
The internal ID (GUID) of the hours to validate request. External references are not accepted. |
Response properties
| Field | Type | Required | Writable | Description |
|---|---|---|---|---|
changeVersion |
string | — | Read-only | Property to indicate the order of changes. |
id |
string | — | Read-only | Unique identifier (GUID) for the hours to validate request. |
person.id |
integer | — | Read-only | Internal ID of the person the request applies to. |
date |
string | — | Read-only | Date the requested hours are registered on (YYYY-MM-DD). |
durations |
array | — | Read-only | The durations covered by the request. |
durations[].id |
integer | — | Read-only | Identifier of the requested duration. |
durations[].startTimeInMinutes |
integer | — | Read-only | Start time of the requested duration (minutes since midnight, between -1440 and 2880). Omitted when the duration is not bound to a start time. |
durations[].endTimeInMinutes |
integer | — | Read-only | End time of the requested duration (minutes since midnight, between -1440 and 2880). Omitted when the duration is not bound to an end time. |
durations[].durationInMinutes |
integer | — | Read-only | Requested duration, in minutes. |
durations[].originalDurationInMinutes |
integer | — | Read-only | Duration before the request was raised, in minutes. |
status |
string | — | Read-only | Status of the request. Possible values: Uninitialized, Requested, Deleted, Approved, Refused. An approved request results in a validated hours record. |
requested.person.id |
integer | — | Read-only | Internal ID of the person who raised the request. This can differ from person.id. |
requested.requestedAt |
string | — | Read-only | Date and time the request was raised (ISO 8601 format). |
isStale |
boolean | — | Read-only | Indicates that the request is based on hours to validate that have since been recalculated to a different amount. A stale request can no longer be approved or refused, only deleted. |
conversation |
array | — | Read-only | Comments exchanged on the request. Omitted when no comments were made. |
conversation[].person.id |
integer | — | Read-only | Internal ID of the person who made the comment. |
conversation[].commentedAt |
string | — | Read-only | Date and time the comment was made (ISO 8601 format). |
conversation[].comment |
string | — | Read-only | Text of the comment. |
Note
The API does not expose who evaluated a request or when it was evaluated.
External references
The endpoint supports predefined and custom external references. See the external references page for details.
The following collections are supported for this endpoint:
| Collection | Predefined | Custom |
|---|---|---|
people |
@badge-number, @employee-number |
Supported |
Note
External references are resolved on person, requested.person and conversation[].person.
Caution
There are some restrictions on the characters allowed in URL requests. See the fetching resources page for more information.
Error responses
| Status | Condition |
|---|---|
400 |
Invalid external reference specification |
401 |
Missing or invalid access token, or insufficient scope |
404 |
Hours to validate request with the given ID does not exist |
Examples
Retrieving a request by internal ID
Example with internal ID f47ac10b-58cc-4372-a567-0e02b2c3d479:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/hours-to-validate-requests/f47ac10b-58cc-4372-a567-0e02b2c3d479
{
"changeVersion": "0001E7C5000098FA0013",
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"person": {
"id": 123
},
"date": "2025-01-15",
"durations": [
{
"id": 1,
"startTimeInMinutes": 480,
"endTimeInMinutes": 720,
"durationInMinutes": 240,
"originalDurationInMinutes": 240
}
],
"status": "Requested",
"requested": {
"person": {
"id": 456
},
"requestedAt": "2025-01-16T09:01:01.376+00:00"
},
"isStale": false,
"conversation": [
{
"person": {
"id": 456
},
"commentedAt": "2025-01-19T10:25:01.376+00:00",
"comment": "ad-hoc question"
}
]
}With external reference for people
Example with the same internal ID and the employee number as an external reference:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/hours-to-validate-requests/f47ac10b-58cc-4372-a567-0e02b2c3d479?externalReferences=(people,@employee-number)