Ask a Question

API request capability

Good morning, We are integrating with Personio from our CRM and I have a question. Is there any limit of requests to the API? Regards

BadRequest when trying to post attendance record

Hello, I am trying to post multiple attendance records for an employee using the personio api. But I always get a BadRequest error in the response. I tried the exact same post body example with attendances in my code but still all I get in the response is "please enter attendances". This is how I execute and create the request: // Post new slots var request = new RestRequest("company/attendances?", Method.Post); request.AddHeader("accept", "application/json"); request.AddHeader("content-type", "application/json"); request.AddHeader("authorization", personioToken); request.AddParameter("attendances", Attendance.TimeSlot.getJsonPost(toPost.ToArray(), pEmpId), ParameterType.RequestBody); var response = client.Execute(request); personioToken = extractToken(response); This is how I build the attendances value as JsonFormat from my TimeSlot object: public static string getJsonPost(TimeSlot[] timeSlots, int pEmpId) { string jsonFormat = ""; jsonFormat += "{\"attendances\":["; foreach (TimeSlot timeSlot in timeSlots) { jsonFormat += "{" + "\"employee\":" + pEmpId + ",\"date\":\"" + timeSlot.date.ToString("yyyy-MM-dd") + "\",\"start_time\":\"" + timeSlot.start_time.ToString("HH:MM") + "\",\"end_time\":\"" + timeSlot.end_time.Value.ToString("HH:MM") + "\",\"break\":" + timeSlot.getTotalMinBreak() + ",\"project_id\": null" + ",\"comment\":\"" + timeSlot.comment + "\"" + "}"; if (timeSlot != timeSlots.Last()) jsonFormat += ","; } jsonFormat += "]}"; return jsonFormat; }

How do I create a new time-off entry via API (POST company/time-offs)?

Hello, I'd like to create a new time-off entry. In your API Reference I can't find a POST body example. Can you please provide the POST body example. Thanks a lot.

How to assign and specify a universal ID to custom and standard attributes

Hello, how do I specify the universal ID? In the example "Employees API: Universal ID is now exposed" it looks as you can define the ID. Seems not to be composed of the label field "dynamic_153804": { "label": "Address, postcode", "value": "", "type": "standard", "universal_id": "postcode" }, Is there a way to replace then dynamic ID by the universal ID when working with the REST API? Consider a scenario where you need to convert JSON into XML for further processing. At the moment you'd get the XML node <dynamic_153804> ... The XML would be a lot easier to read/process if the node name would just be the uinversal_id <postcode> Thanks

Getting historical values from work_schedule

Hello, Personio Team. I would like to ask you to help me with a following question: I need to get a historical values of "work_schedule", thought the API at this /company/employees endpoint I receive only the current value, so I wonder if there is a chance to get the previous values too. Regards, Andrii Mazur

422 error /v1/company/documents

I'm using the following code: curl --location --request POST 'https://api.personio.de/v1/company/documents?employee_id=*myEmployeeID*&category_id=*myCategoryID*&title=test2' \ --header 'Authorization: Bearer *myBearerToken*' \ --form '[email protected]"/opt/PCDOCS/dochousetest/aufgaben/2022/08/24/1043_783.pdf"' I'm getting the following error response: {"success":false,"error":{"message":"The given data was invalid.","code":0,"error_data":{"file":["The file must be a file of type: pdf, docx, doc, jpg, zip, png, txt, jpeg, odt, xlsx, rtf, htm, xls, p7s, pptx, pages, rar, ppt, gif, tif, html, msg, eml, asc, tiff, wps, bmp, 7z, csv, ics, vcf, dotx, numbers, eps, gz, ods, otf, odp, odg, rtfd, txz, webarchive, xml, xps, md, fax, asice."]} What am I missing?

Retrieving holidays from API?

I have seen that this question was asked before, https://developer.personio.de/discuss/614c152c9abde6004d49b0bc Are there any updates? Thanks in advance!

422 error /v1/recruiting/applications/documents

Hey, I am trying to add a pdf file via api https://api.personio.de/v1/recruiting/applications/documents . And every other time I get this status "Something is wrong with the request body or the attachments" . Can you tell me what validations the file goes through for such an error?

Get Updated Employees only from AP

Hi Personio, thank you for creating awesome solution and api docs PROBLEM: If i Query /company/employees I get the entire list of employees, But what about only UPDATED employees from certain date? Basically if would be very helpful if we can filter on last_modified_at similar filter directly in the query for "updated_from" in /company/attendances https://developer.personio.de/reference/get_company-attendances STEPS: 1. Query /company/employees 2. Get entire employees list 3. What If I only want updated employees?

Call custom endpoint when data is created in Persio

Hello, is it possible to let call a certain endpoint when data is created, modified, deleted, ... in Persio? E. g. we want to react with our own software process if an employee creates an absence.