Personio: reading API v2 data through the Proxy API
Apideck's Personio connector is built on Personio's API v1. Some data, such as the newer working-hours attributes on persons and employments, is only available in Personio's API v2. You can read it today through the Proxy API, using the consumer's existing Personio connection. No new connection or extra setup is needed on the Apideck side.
Make a v2 call
Send the request to the Proxy API and put the Personio v2 address in x-apideck-downstream-url:
curl --request GET 'https://unify.apideck.com/proxy' \
--header 'Authorization: Bearer {YOUR_APIDECK_API_KEY}' \
--header 'x-apideck-app-id: {YOUR_APP_ID}' \
--header 'x-apideck-consumer-id: {CONSUMER_ID}' \
--header 'x-apideck-service-id: personio' \
--header 'x-apideck-downstream-url: https://api.personio.de/v2/persons/{person_id}/employments'
{person_id}is the same ID that Apideck returns as the employeeidfromGET /hris/employees.Other v2 endpoints work the same way, for example
https://api.personio.de/v2/persons/{person_id}. See Personio's API v2 reference for what's available.
Apideck adds the authentication. The response is Personio's own v2 response, unchanged, so you map the fields yourself.
Getting only IDs back?
Personio only returns the attributes the consumer's API credential is allowed to read, and it leaves the rest out without an error. If a v2 response contains only id fields and links, the credential doesn't have those attributes enabled.
The consumer's Personio admin can change this in Settings → Integrations → API credentials: open the credential used for Apideck and enable the attributes you need, for example the working-hours attributes. The change applies to the existing connection, so there's no need to reconnect.
Related
Contact Apideck support through the Customer Portal (the Requests link at the top of this help center), your Slack channel with us, or support@apideck.com if you get stuck.
