Admin Capabilities Within the API

I get the following response when I try to load expenses on behalf of employees
I am Admin
{"responseMessage":"Not authorized to authenticate as user [email protected]","responseCode":401}
curl -X POST 'https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations' \ -d 'requestJobDescription={ "type":"create", "credentials":{ "partnerUserID": "aa_accounts_company_com", "partnerUserSecret": "1234567890987654321abc" }, "inputSettings":{ "type":"expenses", "employeeEmail":"[email protected]", "transactionList": [ { "created": "2018-05-01", "currency": "ZAR", "merchant": "E TRAVEL NEWLANDS", "amount": 1253, "policyID": "760D782BC0CE2AB0", }, { "created": "2018-05-02", "currency": "ZAR", "merchant": "Name of merchant 2", "amount": 2211, "policyID": "760D782BC0CE2AB0" }, { "created": "2018-05-07", "currency": "ZAR", "merchant": "Name of merchant 3", "amount": 443, "policyID": "760D782BC0CE2AB0" } } ] } }'
Best Answer
-
Ted Harris Expensify Success Coach - Admin, Expensify Team, Expensify Student Ambassador Posts: 359 Expensify Team
Hi @Mads - just checking in here to make sure everything is back on track now that we've hopefully set you up:
to load expenses on behalf of employees.
To note: access to the Expense Creator API on behalf of employees requires some set-up from Expensify as we're required to:
- Make sure you're set up correctly, (using Domain Control, are a Domain Admin, are a Policy Admin etc...)
- Validate you are authorized internally to add data to other accounts on your domain.
If this is something you need, please reach out to [email protected] (and feel free to reference this Community Post too, so we know where you came from!)
Once we've verified this, we create a request for our engineering team to allow the access you need. This can typically take 2-3 working days, although it may be faster!
Once that's completed, we'll reach back out and you should be good to go like @Mads here!
Answers
-
Sheena Trepanier Expensify Team, Approved! Accountant, Expensify Student Ambassador Posts: 1,362 Expensify Team
Hi @mads, thanks for reaching out! This is a great question that requires a bit of work on our end to make possible. I'm going to reach out to you via email in just a moment and then update this thread once we've finished up.
Look for something from me soon!
-
Hi Sheena
As per your email, we have enabled Domain ControlWhat is the next step?
-
@Mads I want to have the ability (for me and other Policy Admins) to add expenses to reports created by other users. Did you manage to get it done? I would love to find out how I can add it to my account.
-
Rachael Hopkins Expensify Success Coach - Admin, Expensify Team, Expensify Student Ambassador Posts: 904 Expensify Team
Hi @JonathanBuzz aside from API based expense creation, if you have company cards, you can add those to user reports via the Company Card Reconciliation Dashboard.
Can you explain a little more about the kind of expenses you need to add to reports on behalf of users?
-
@RachCHopkins i have the employees fill up a report for their own expenses that need to be reimbursed but we have a report for our company’s Monthly expenses. So if an employee receives an invoice from a supplier, i would want them to forward it to [email protected] so that i can place it into our monthly expenses report. But right now i can’t move an expense added from another employee into a common report that we all would like to add to.
-
Rachael Hopkins Expensify Success Coach - Admin, Expensify Team, Expensify Student Ambassador Posts: 904 Expensify Team
Ok @JonathanBuzz , given that you probably won't use the API, let's continue this on the other thread!
-
I've followed these instructions and have been able to get transactions submitted via the API to appear in reports of various users. However the issue we now have is that the transactions are being entered in the incorrect policy.
All of our users have a default policy, and we have a created a particular policy that we want API submitted transactions to appear in.
Despite specifying the policyID at creation time, the transactions keep appearing in the default policy. Does anyone have an idea as to what we are doing wrong?