Webhooks

Subscribes to change events for the personal information collection.

Caution

Read the Webhooks page. There is important information on required implementation!

Tip

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

Endpoint details

POST
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/webhooks

Headers: Authorization: Bearer {token}, User-Agent: {agent} Scope: connector-protimeapi-webhooks.write and connector-protimeapi-people.read

Body properties

This list of properties can be sent in the request body.

Field Type Required Writable Description
destinationUrl string Yes Yes The URL where webhook events will be sent.
collectionName string Yes Yes The name of the collection to subscribe to (people).

Event properties

Field Type Required Writable Description
id integer — Read-only Internal unique identifier for the person.
externalReferences object — Read-only External references of the person, keyed by reference name. Returned only for the references set on the webhook that have a value for the person.
changeVersion string — Read-only Property to indicate the order of changes.
periodClosingDate string — Read-only Date of the period closing, used to lock the calendar.
hourlyRateCurrencyDefinition.id integer — Read-only Internal unique identifier for the hourly rate currency.
advanceCurrencyDefinition.id integer — Read-only Internal unique identifier for the advance currency.
lastName string — Read-only Last name of the person.
firstName string — Read-only First name of the person.
initials string — Read-only Initials of the person.
telephone string — Read-only Telephone number.
mobile string — Read-only Mobile phone number.
email string — Read-only Email address.
address string — Read-only Street address with the number.
postalCode string — Read-only Postal code.
town string — Read-only Town or city.
countryISOCode string — Read-only ISO code of the country.
nationalityISOCode string — Read-only ISO code of the nationality.
sex string — Read-only Sex of the person (Unknown, Female, Male, Other).
maritalStatus string — Read-only Marital status (Unknown, Single, Married, Widow, Widower, Divorced, LivingTogether).
birthDate string — Read-only Birth date of the person (YYYY-MM-DD).
placeOfBirth string — Read-only Place of birth.
drivingLicense string — Read-only Driving license number.
registerNumber string — Read-only Register number.
passportNumber string — Read-only Passport number.
socialSecurityNumber string — Read-only Social security number.
bankAccount string — Read-only Bank account number.
inServiceDate string — Read-only Date when the person entered service (YYYY-MM-DD).
outOfServiceDate string — Read-only Date when the person stopped service (YYYY-MM-DD). To infinity if empty.
wtdStartDate string — Read-only WTD start date (YYYY-MM-DD).
employeeNumber string — Read-only Employee number.
payGroup string — Read-only Pay group of the person.
hourlyRate number — Read-only Hourly rate.
maxAdvance number — Read-only Maximum advance allowed.
terminalGroup.id integer — Read-only Internal unique identifier for the terminal group the person is linked to.
badgeNumber string — Read-only Badge number of the person. Needs to be unique.
pinCode integer — Read-only PIN code.
terminalLanguageISOCode string — Read-only ISO code of the terminal language for this person.

External references

The endpoint supports predefined and custom external references. See the external references page for details and the predefined options list.

The following collections are supported for this endpoint:

Collection Predefined Custom
people @badge-number, @employee-number Supported

The references set on the webhook are returned in the externalReferences property of each person in the events.

Error responses

Status Condition
400 Invalid destination URL, unknown collection name, or invalid external reference
401 Missing or invalid access token, or insufficient scope

Success response

201 Created with webhookKey and validUntil in the response body.

Examples

A webhook for people

Example for creating a webhook for people:

POST
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/webhooks

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

A webhook for people with an external reference

Example for creating a webhook for people that includes the employee number in the events:

POST
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/webhooks?externalReferences=(people,@employee-number)

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