Contracts


Introduction

Through the API there’s a possibility to retrieve contracts.
A contract represents an agreement between a person and the organization, defining employment terms such as period, hours, and type (contract or addendum).

Properties

Property Type Description
id integer Unique identifier for the contract record.
person.id integer Internal ID of the person.
code string The Contract code.
from string Start date of the contract for when it’s active.
until string End date of the contract.
contractHoursInMinutes integer Contracted hours in minutes.
fullTimeEquivalentInMinutes integer The equivalent in minutes for a full-time contract.
contractPercentage number Percentage of full-time contract.
numberOfWorkingDaysPerWeek number The number of working days per week.
numberOfDaysInContractPeriod integer The number of days in the contract period.
kind string The kind of contract (Contract,Addendum).
parentContract.id integer Identifier of the parent contract.

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.

Endpoints

Below you can find the supported endpoints for this data collection.

GET a contract by reference

You can retrieve a contract by its internal ID or an external reference using the GET call. Internal IDs for contracts can be found by listing all contracts using the GET collection endpoint.

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

GET a list of contracts

You can retrieve a list of contracts. Optionally, filter by person ID(s).

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

Filter requirements

Delta

It’s possible to retrieve changes with the delta. Check the Delta page for more general and critical information on how to use this feature.

Example for contracts with a delta: GET https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/contracts?delta

Webhooks

It’s possible to retrieve change-events with webhooks. Check the Webhooks page for more general and critical information on how to use this feature.

Example for creating a webhook for contracts: POST https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/webhooks

{
    "destinationUrl": "https://www.fictional-customer.com/protime/contracts",
    "collectionName": "contracts"
}