0

I am using the XERO Python Library to fetch Employee Data. I am successfully getting the basic employee data back, but anything that seems sensitive is returning None even if I can see the information in the Web UI.

Specifically, I am trying to get the Employee's classification value.

Screenshot of Web UI

But the API seems to be removing any semi-sensitive/personal data:

{'employees': [{'bank_accounts': None,
                'classification': None,
                'date_of_birth': datetime.date(1984, 1, 26),
                'gender': 'M',
                ...
                'home_address': None,
                'start_date': datetime.date(2018, 8, 24),
                'status': <EmployeeStatus.ACTIVE: 'ACTIVE'>,
                'super_memberships': None,
                'tax_declaration': None,
                'termination_date': None,
                'title': None,
                'twitter_user_name': None,
                'updated_date_utc': datetime.datetime(2020, 9, 2, 8, 32, 26, tzinfo=tzutc()),
                'validation_errors': None}]}

I setup the scopes in OAuth to include payroll.employees payroll.timesheets payroll.settings

What I am missing to get the full data back via the API?

1 Answers1

0

this might be better answered in the repo as an issue.

https://github.com/XeroAPI/xero-python

There is also a sample app that might show something helpful in regards to replicating or fixing your issue.

https://github.com/XeroAPI/xero-python-oauth2-app

SerKnight
  • 2,502
  • 1
  • 16
  • 18