Discussions
Employee endpoint paging with updated_since and attributes - bug?
Hi,
I'm using the updated_since and attributes\[] query parameters to get employees.
Per documentation: "NOTE: when using the updated_since filter, the email, limit, and offset parameters are ignored."
I do not find this to be the case: When I pass limit and offset, they are not ignored. Paging works as expected. Also the maximum number of results is 200 (default limit) if no limit is set.
For testing I'm using a small limit and once the number of total elements changed (decreased!) between the three different pages! (same parameter in updated_since)
2024-02-20 10:22:14,046 - - DEBUG - Starting to get all employees updated since 2024-02-18T10:22:13 with limit 10
2024-02-20 10:22:54,636 - - DEBUG - Processed page 1/3, total elements: 30
2024-02-20 10:23:14,913 - - DEBUG - Processed page 2/3, total elements: 28
2024-02-20 10:23:26,185 - - DEBUG - Processed page 3/3, total elements: 27
2024-02-20 10:23:55,326 - - INFO - Received 27 relevant employees from a total of 27 returned updated since 2024-02-18T10:22:13.
This effect occurred for a time, now the results seem stable. Initial number of total elements I got was 50 at about 10.16:03. Now the number of total elements seems stable at 22. As I pass the exact date and time as since the number should only go up, never down.
Can you please check?
Thanks and regards,
Simone
Posted by Simone Rittinger 3 months ago
Filter linking via iFrame integration
Hi,
I have integrated personio via iframe integration in a website and job filters are included.
Is there a possibility to jump directly by a link, link addition or a parameter to a filtered view inside the iframe?
If I open the personio career site directly via <https://meinaccount.jobs.personio.de/> and click a filter, then a parameter like ?filters=eyJlbXBsb3ltZW50X3R5cGUiOlsidHJhaW5lZSJdfQ== is added.
Can I send something like this into the iframe by javascript or something similar to filter the jobs?
Posted by Sebastian Feustle 3 months ago
How to connect SAP to Personio
We are planning to export the HR data from Personio to SAP. How do we connect SAP to Personio? Which domain and IP do we have to register in our firewall?
Posted by Malte Klesen 3 months ago
Personio API credentials do not work
Hi,
I'm trying to make my C#-code work with the Personio API but fail already with getting the bearer token from the /auth-interface.
I see that there is a little tryout-tool on <https://developer.personio.de/reference/post_auth>
but I can't even manage to get it right here. What am I missing?
The corresponding shell command looks like this:
curl --request POST
--url <https://api.personio.de/v1/auth>
--header 'accept: application/json'
--header 'content-type: application/json'
--data '
{
"client_id": "copy-paste-starting-with-papi-...",
"client_secret": "copy-paste-starting-with-papi-..."
}
'
The response to this very request is this:
{
"success": false,
"error": {
"code": 0,
"message": "Wrong credentials"
}
}
"Wrong credentials"?? Having a typo here is very unlikely, if you copy+paste the id and secret, right?
Posted by Ferhat Özdogan 3 months ago
How to get Personiodata for Power BI Reporting
Hello,
I am looking for ways to access more comprehensive data from Personio for Power BI reporting via the API.
The standard API doesn't provide alle the information I need.
Does anyone have experience with workarounds or alternative methods to extract more data?
Appreciate any help or recommendations.
Thanks,
Ricardo
Posted by Ricardo Scheidler Aguilar 3 months ago
No metadata available for GET /company/employees
Hi,
In the API documentation page, it returns the metadata with elements, pages count. But when I called the GET method "/company/employees" with below query string via code, it returns all records (148), but no metadata.
```curl
:?limit=100&offset=0&attributes\[]=id&attributes\[]=first_name&attributes\[]=last_name&attributes\[]=email&attributes\[]=gender&attributes\[]=status&attributes\[]=position&attributes\[]=last_modified_at&attributes\[]=department&attributes\[]=profile_picture
```
Regardless of limit and offset values, always it returns all records.
Please help me to sort-out this as sooner.
Posted by Chitta Kulatilake 3 months ago
breaking changes in API of v1/company/employees since yesterday
We have noticed that values of property "label" of some dynamic fields have been changed: "Straße", "Postleitzahl", "Hausnummer", "Ort", "Austrittsdatum (aktueller Anstellungszeitraum)" , just yesterday around midday
This changed has been partially reverted today.
Since we ar using "label" as identifier for dynamic fields, we ar in big trouble now, since API contract is somehow broken.
1. Since "label" is not a reliable indentifier for dynamic fields:
1. New property called universal_id looks (more appealing)?
2. Where can I find docs about it, including table of personio fields with values of universal_id?
2. Did we miss the info about changes in label values, is it expected to get such an info?
3. Currently, described changes have been reverted partially, what will happen to the dynamic field, with label = ""Austrittsdatum (aktueller Anstellungszeitraum) "
Posted by roberto bucksch 3 months ago
API token with read rights only for specific team
Hello there
I am currently trying to use the Personio API to automate some processes. For that I need access to the attendances and absences of specific employees using the API. For compliance reasons the access cannot go beyond a specific team. My question now is: Is it possible to create a token only with read rights to a specific team and not anyone else?
Thanks in advance!
Posted by Nick T 3 months ago
Cant pass applicant data + applicant documents
Hello,
since the Personio API changed last year, we are not able to pass the applicant documents and applicant information to Personio. We are working with PHP and cURL.
From the documentation, we gather that we need to first transfer the attached documents to Personio and then link the applicant information using the UUIDs of the documents. In the old API, we were able to transmit everything collectively as multipart. Here is our current code:
```
add_action('gform_after_submission', function ($entry, $form) {
// Extraktion der Formularfelder
$jobId = rgar($entry, '1');
$firstName = rgar($entry, '2');
$lastName = rgar($entry, '8');
$phone = rgar($entry, '3');
$email = rgar($entry, '4');
$text = rgar($entry, '5');
$gender = rgar($entry, '9');
$salary = rgar($entry, '11');
$birthday = rgar($entry, '12');
$availableFrom = rgar($entry, '10');
$files = json_decode(rgar($entry, '7'), true);
// Formatieren der Daten
$birthday = date('Y-m-d', strtotime($birthday));
$availableFrom = date('Y-m-d', strtotime($availableFrom));
// Array für die UUIDs der hochgeladenen Dateien
$fileUuids = [];
foreach ($files as $file) {
$uploadedFilePath = str_replace(site_url(), $_SERVER['DOCUMENT_ROOT'], $file);
$uploadResponse = uploadFileToPersonio($uploadedFilePath);
if (empty($uploadResponse['uuid'])) {
// Fehlerbehandlung für Datei-Upload
sendErrorEmail('Fehler beim Dateiupload', $uploadResponse);
} else {
$fileUuids[] = $uploadResponse['uuid'];
}
}
// Vorbereiten und Senden der Bewerberdaten
$applicantData = [
'phase' => [
'type' => 'custom',
'id' => '316302'
],
'job_position_id' => $jobId,
'first_name' => $firstName,
'last_name' => $lastName,
'phone' => $phone,
'email' => $email,
'gender' => $gender,
'salary_expectations' => $salary,
'birthday' => $birthday,
'available_from' => $availableFrom,
'message' => $text,
'files' => $fileUuids
];
$applicantResponse = sendApplicantToPersonio($applicantData);
if (!$applicantResponse) {
// Fehlerbehandlung für die Übermittlung der Bewerberdaten
sendErrorEmail('Fehler bei der Übermittlung der Bewerberdaten', $applicantResponse);
}
}, 10, 2);
function uploadFileToPersonio($filePath) {
$boundary = uniqid();
$filename = basename($filePath);
$payload = "--$boundary\\r\\n";
$payload .= "Content-Disposition: form-data; name=\"file\"; filename=\"$filename\"\\r\\n";
$payload .= "Content-Type: application/pdf\\r\\n\\r\\n";
$payload .= file_get_contents($filePath);
$payload .= "\\r\\n--$boundary--\\r\\n";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.personio.de/v1/recruiting/applications/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_HTTPHEADER => [
"X-Company-ID: *sanitized*",
"Authorization: Bearer *sanitized*",
"Content-Type: multipart/form-data; boundary=$boundary"
],
]);
$response = curl_exec($curl);
curl_close($curl);
return json_decode($response, true);
}
function sendApplicantToPersonio($data) {
$curl = curl_init();
curl_setopt_array($curl, \[
CURLOPT_URL => "<https://api.personio.de/v1/recruiting/applications">,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => [
"X-Company-ID: *sanitized*",
"Authorization: Bearer *sanitized*",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
return json_decode($response, true);
}
function sendErrorEmail($subject, $message) {
$to = '*sanitzied*';
$headers = 'From: *sanitized*' . "\\r\\n" .
'Reply-To: *sanitized*' . "\\r\\n";
mail($to, $subject, print_r($message, true), $headers);
}
```
Additional information:
We are collecting the data via a Gravity Forms Form on one of our WordPress websites.
If we skip the document upload, there are still some applicant information missing such as "available from"
The error handling function worked well but since the newest code, we don't even get an error response.
Thank you so much for your help.
Kind regards
Pascal
Posted by Pascal Meyer 4 months ago
Function 'outputErrors' finished with error! Cannot read properties of undefined (reading 'length')
Hello,
when I try to POST an attendance via the make connection, I always get the error "Function 'outputErrors' finished with error! Cannot read properties of undefined (reading 'length')"
![](https://files.readme.io/a3c8160-image.png)
The input should be correct according to the api documentation
Content-Type
application/json
{
"attendances": [
{
"employee": 19999999,
"date": "2024-01-31",
"start_time": "03:19",
"end_time": "11:19",
"break": 30
}
]
}
Where can I make a change that the call gets through?
Posted by Lars Bruder 4 months ago