Are you receiving SNAP/EBT benefits? The campaign is live and accepting new members. Learn more about receiving $50 for submitting a SNAP receipt and $50 for getting your COVID-19 vaccine here and join today!

API: Retrieve SubmitsTo

mikecaputozi2 Expensify Customer Posts: 2

I am trying to set up an integration using Python to update the SubmitsTo field based on reporting hierarchies in the HR system. I have the logic in place to do the update operation, but I recently found out that I have to check before updating to see if the user submits to a certain person; if so, it has to be left in place instead of being updated.

Expensify's API documentation does not indicate a way to retrieve SubmitsTo only, but I noticed that it's included in the response JSON on a Policy query. So I'm trying to use that interface to get what I need, but unfortunately when I do, I get back a 401 error with the message "Not authorized to authenticate as user [the email I queried with]".

So I have two questions:

  1. Does anyone know a way around this authentication issue? I.E. do I have to configure something in the UI?
  2. Is there another, perhaps undocumented, way to retrieve the SubmitsTo without having to go through the Policy API?

Sign In or Register to comment.