Update usage
Updates an existing usage for an activity definition.
Tip
Check the Swagger page for more technical information on the endpoints.
Endpoint details
PUT
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/activity-structure-versions/{structureVersionId}/levels/{level}/activity-definitions/{activityDefinitionReference}/usages
Headers: Authorization: Bearer {token}, User-Agent: {agent}
Scope: connector-protimeapi-activity-definitions.write
URL parameters
These parameters need to be filled in when calling this endpoint.
| Parameter | Description |
|---|---|
<structureVersionId> |
The ID of the activity structure. Can be found in the configuration in myProtime. |
<level> |
Defines the level in the structure. |
<activityDefinitionReference> |
The internal ID or an external reference. |
Body properties
| Field | Type | Required | Writable | Description |
|---|---|---|---|---|
activityUsageKind |
string | Yes | Yes | Determines the rights on People, Groups, or Circles. Valid values: Person, Group, Circle. |
usageReference.id |
integer | Yes | Yes | ID or a Custom external reference. |
originalFrom |
date | Yes | Yes | The existing start date in myProtime (YYYY-MM-DD). It must match the current value in the system. |
originalUntil |
date | No | Yes | The existing end date in myProtime (YYYY-MM-DD). If no end date exists, omit originalUntil from the request; otherwise, use the current value. |
updatedFrom |
date | Yes | Yes | The new start date for the usage (YYYY-MM-DD). |
updatedUntil |
date | No | Yes | The new end date for the usage (YYYY-MM-DD). If no end date is required, omit updatedUntil or send it as an empty string (""). |
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 |
|---|---|---|
activity-definitions |
@data-entry-code, @external-reference |
Supported |
circles |
None | Supported |
groups |
None | Supported |
people |
@badge-number, @employee-number |
Supported |
Caution
There are some restrictions on the characters allowed in URL requests. See the fetching resources page for more information.
Success response
200 OK
Error responses
| Status | Condition |
|---|---|
400 |
Validation error or invalid external reference format |
401 |
Missing or invalid access token, or insufficient scope |
404 |
Activity definition not found |
Examples
Update usage dates for a circle
Example updating usage dates for circle with ID 13:
PUT
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/activity-structure-versions/b2347a7a-d60d-446f-b03b-7es2cc8c3281/levels/3/activity-definitions/38fc2206-b51f-434a-9c36-9e0esfc5e70e/usages
{
"activityUsageKind": "Circle",
"usageReference": {
"id": 13
},
"originalFrom": "2025-01-01",
"originalUntil": "2025-12-31",
"updatedFrom": "2025-01-15",
"updatedUntil": "2025-12-31"
}Update usage for a person
Example updating usage for person with ID 1234:
PUT
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/activity-structure-versions/b2347a7a-d60d-446f-b03b-7es2cc8c3281/levels/1/activity-definitions/a7d853ea-89eb-4735-83d1-b891c6fde398/usages
{
"activityUsageKind": "Person",
"usageReference": {
"id": 1234
},
"originalFrom": "2025-01-01",
"originalUntil": "2026-01-01",
"updatedFrom": "2025-02-01",
"updatedUntil": "2025-12-31"
}