Hi @itnewbie,
Every document uploaded to an employee’s profile has a Document ID. You can retrieve this ID by going to the Document section of the employee’s profile and clicking on the document. You will see at the end of the URL “documentId=” followed by a number. This number is the Document ID that you can use for the API.
Regarding connecting your integration, you can check out the Personio Marketplace to see if you want to use an existing integration or if you wish to connect a Custom integration, please see details in this Help Center article: Build your own integration with our APIs
Thanks for your query and let me know if you have further questions.
Best,
Steve
Hi Steve
Thanks for your reply. By the way, the Document ID you described above, is retrieved as a user using the Personio application. Is a developer able to obtain the Document ID, via an API passing in a parameter such as “Name” or “EmployeeID” or any other fields for a specific employee,etc?
Thanks in advance,
Lynn
Hi @itnewbie,
Yes, you can do this using our v2 Document Management API. Specifically the "list document metadata" endpoint. This allows you to include the owner_id
as a query parameter which is the ID of an employee in Personio. It will return metadata (including the name) relating to the document. For example with an employee with ID 23788456
we can make the following request:
GET https://api.personio.de/v2/document-management/documents?owner_id=23788456
HEADERS Authorisation Bearer {{authToken}}
RESPONSE
{
"_data": "
{
"id": "95414029",
"name": "test",
"date": "2024-07-01",
"comment": "",
"category": {
"id": "2188461"
},
"owner": {
"id": "23788456"
},
"document_type": "application/pdf",
"size": 3908,
"created_at": "2024-07-02 08:50:35",
"virus_scan": {
"status": "safe"
},
"esignature": {
"status": "status_unspecified"
}
}
],
"_meta": {
"links": {
"self": {
"href": "https://api.personio.de/v2/document-management/documents?cursor=eyJvd25lcklkIjoyMzc4ODQ1NiwiY2F0ZWdvcnlJZCI6bnVsbCwibGltaXQiOm51bGwsImNyZWF0ZWRBdEd0ZSI6bnVsbCwiY3JlYXRlZEF0THQiOm51bGwsImN1cnNvciI6bnVsbH0="
}
}
}
}
Thanks for your follow-up and let me know in case you have further questions.
Best,
Steve