Retrieve a shift definition
Introduction
You can retrieve a shift definition by the internal ID or an external reference using the GET call. Internal IDs for shift definitions can be found by listing all shift definitions using the GET collection endpoint.
Tip
Check the Swagger page for more technical information on the endpoints.
Endpoint details
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/shift-definitions/{shiftDefinitionReference}
URL parameters
This parameter needs to be filled in when calling this endpoint.
| Parameter | Description |
|---|---|
<shiftDefinitionReference> |
The internal ID or external reference of the shift definition. |
Response properties
This list of properties is returned by this endpoint.
| Property | Type | Description |
|---|---|---|
changeVersion |
string | Property to indicate the order of changes. |
id |
integer | Internal unique identifier for the shift definition. |
name.default |
string | Default name value of the shift definition. |
name.translations |
object | A list of translated names of the definition by language code. |
code |
string | A shift code used for this definition. |
friendlyName.default |
string | Default friendly name value for this definition shown to users. |
friendlyName.translations |
object | A list of translated friendly names by language code. |
isEnabled |
boolean | Indicates if the shift definition is enabled in myProtime. |
External references
It’s possible to use predefined external references and custom external references. More information can be found on the External References Page
For a list of predefined external references, see the external reference options section.
Note
Check the query options below the endpoint on the Swagger page for the relevant external references.
Caution
There are some restrictions on the characters allowed in URL requests. See the fetching resources page for more information.
Examples
Retrieving a shift definition by internal ID
Example with internal ID 7:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/shift-definitions/7
Retrieving a shift definition by external reference
Example with shift code V2:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/shift-definitions/V2?externalReferences=(shift-definitions,@shift-code)
With custom external reference
Example with custom external reference EARLY-SHIFT:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/shift-definitions/EARLY-SHIFT?externalReferences=(shift-definitions,customShiftCode)