Retrieve a department

Retrieve a department

Introduction

You can retrieve a department by the internal ID or an external reference using the GET call.

Tip

Check the Swagger page for more technical information on the endpoints.

Endpoint details

GET
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/departments/{departmentReference}

URL parameters

This parameter needs to be filled in when calling this endpoint.

Parameter Description
<departmentReference> The internal ID or external reference of the department.

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 Unique identifier for the department.
name.default string Default name of the department.
name.translations object Translated names for supported languages.
externalCode string External code for the department.

External references

It’s possible to use custom external references as a departmentReference to retrieve a department. More information can be found on the External References Page

Note

Check the query options below the endpoint on the Swagger page for the relevant external references.

Examples

Retrieve one department

Example retrieving a department with internal ID 456:

GET
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/departments/456

Retrieve a department with a custom external reference

Example retrieving a department with a custom external code 789:

GET
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/departments/789?externalReferences=(departments,CustomReferenceName)