Skip to main content
Answered

API and several attributes

  • September 9, 2024
  • 3 replies
  • 154 views

Hi community,

We are testing the API integration and are looking for some help in order to retrieve more attributes.

Main thing what we cannot seem to find is:

  • IBAN
  • Employee ID
  • Address

Is there anyone here who is willing to give some guidance? Would be very grateful.

 

Thank you,

 

Ralph

 

Best answer by Weena

Hi @evehryday

I have found a similar post here that might help you. 😊

Basically, to retrieve custom Attributes through the API integration, you have to whitelist these attributes under the API credentials settings.

This is visible in Settings > Integrations > API Credentials > Corresponding API Credentials > Readable Attributes. You can add the mentioned attributes to the list. This will enable their retrieval through the API .

 

If you would like more information about the configuration, you can consult our Helpcenter article:

Generate and manage API credentials

 

I hope this helps! Please let me know if you have further questions. 😊

I wish you a lovely afternoon. 🙌

Regards,

Weena

3 replies

Weena
Personio Employee
Forum|alt.badge.img+3
  • Former Community Moderator
  • Answer
  • September 11, 2024

Hi @evehryday

I have found a similar post here that might help you. 😊

Basically, to retrieve custom Attributes through the API integration, you have to whitelist these attributes under the API credentials settings.

This is visible in Settings > Integrations > API Credentials > Corresponding API Credentials > Readable Attributes. You can add the mentioned attributes to the list. This will enable their retrieval through the API .

 

If you would like more information about the configuration, you can consult our Helpcenter article:

Generate and manage API credentials

 

I hope this helps! Please let me know if you have further questions. 😊

I wish you a lovely afternoon. 🙌

Regards,

Weena


  • Author
  • Follower
  • September 11, 2024

Thank you very much. This is what I missed.  


Hi ​@Weena ,

I am experiencing the same issue; however, the solution described here does not work in my case.

I have selected multiple attributes that should be exposed via the API.
However, when calling the API for persons, only the attributes listed in the documentation are returned.

For example, these attributes are selected for the exposure: 

The get request for persons or a specific person responses these attribuets:

{'custom_attributes': [], 'email': 'example-user@my-company.com', 'employments': [{'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxx'}], 'first_name': 'Example', 'id': '12345678', 'last_name': 'User', 'preferred_name': 'Example User', 'status': 'ACTIVE', '_meta': {'links': {'employments': {'href': 'https://api.personio.de/v2/persons/1234567/employments'}}}}

The additional attributes are missing. 

 

My current request looks like that: 

GET https://api.personio.de/v2/persons/123456

or for more than one person:

GET https://api.personio.de/v2/persons?limit=50&cursor={{next_cursor}}

header:
Authorization: Bearer {{access_token}}
Accept: application/json

 

Is there any additional configuration or step required to retrieve all selected attributes for employees via the API?

Thank you very much in advance.

Best regards,
Adrian