Questions on Creating Expenses via API

Hello,
My team is interested in submitting transaction data for expenses via API.
We currently store/capture all transaction data required for the "Expense Creator" and the "Expense" Object.
However, I had a few questions how to actually submit this information for other accounts:
- Would my User Secret/ID allow me to submit expenses on behalf of other users (i.e. can one UserID & UserSecret be used for multiple email addresses - "employeeEmail" field)? I see that it is a restricted parameter, so just wanted to confirm.
- How do I validate the Policy ID? (If we're new to using the API, do we have to create a new Policy ID - or is this an optional field? would it prepopulate the policy ID tied to the email address?)
Answers
-
Ted Harris Expensify Success Coach - Admin, Expensify Team, Expensify Student Ambassador Posts: 359 Expensify Team
Hi @schadha - if you're looking to load expenses on behalf on other employees, you'll want to follow the instructions laid out here.
The team here will essentially need to whitelist you for your domain members, after which you'll be able to pass expenses into their accounts as well.
Regarding the PolicyID - this is linked to the Policy Object which you create in Expensify. You can find it in the URL of the policy within Expensify:
-
Thanks @Ted Peeters !
Looks like I need to work with my Admin to get the right controls first (I currently don't have Domain Control). But after taking a look, once I get that set-up, it should just be ~2-3 biz days.
And thanks for clearing up the info on Policies!