How to get all Expenses list using API

I am using Expensify API and i want all expense list for a particular user, how i can get that. I am sending below in request parameter.
Request:{ "type":"file", "credentials":{ "partnerUserID": "XXXXXXXXXXXXXXx", "partnerUserSecret": "XXXXXXXXXXXXXXX" }, "onReceive":{ "immediateResponse":["returnRandomFileName"] }, "inputSettings":{ "type":"combinedReportData", "filters":{ "reportIDList":"65849964" } }, "outputSettings":{ "fileExtension":"csv" } }
I have to mention report Id in filter, otherwise it is not showing me data, But i need all expenses list.
Answers
-
I'm a bit confused about why you think you need to include
reportIDList
in your filters @Ishan_Kaura?You could easily just add something like:
"inputSettings":{ "type":"combinedReportData", "reportState":"APPROVED,REIMBURSED", "limit":"10", "filters":{ "startDate":"2020-08-01", "endDate":"2020-09-01", "markedAsExported":"Expensify Export" }
Nowhere in our Integrations Documentation do we specify that
reportIDList
is required. Simply use theinputSettings
andinputSettings.filters
available to find your required reports: -
Thanks for your response, let me check it.
I have one more query. Now when I got all expenses list i want to update their status, i checked that you have API for that, it 'Expense Rule Update', how i can update any open expense to approve/reject.
Can you please help me on this.
-
April Bekkala Expensify Customer, Expensify Team, Expensify Student Ambassador Posts: 117 Expensify Team
Hi @Ishan
The Expensify API is a self-service tool. We have a couple of great guides for you to check out if you haven't already.
- Full API guide - this is the complete handbook for creating API requests, exporting data, using the API to create expenses, policy changes, and category updates.
- Breakdown of the fields used in the report templates.
- Rate limit is currently 50-requests-per-minute. If you exceed this limit you'll receive an error message.
I will note that Expense Rules do not change the status of an Expense Report. Expense rules allow you to automatically categorize, tag, and report expenses based on the merchant name.
-
I had checked both links and they show me below error.
Error:We’re no longer accepting new participants as our focus is on reimbursing existing claims. While we’re unable to provide a specific timeline on when your report will be reimbursed, we’re doing our best to drive donations and keep reimbursements moving forward. If you know anyone who can donate to this campaign please encourage them to enable Personal or Corporate Karma on their Expensify account.
I wants to update my expense status from open to approve or open to reject.
So please suggest me, how i can do it.
-
Cortney Ofstad Expensify Success Coach - Admin, Expensify Team, Expensify Student Ambassador Posts: 174 Expensify Team
Hi @Ishan! Sorry about that! Under that message is the necessary link you would need, as shown below:
Here is the link to have you access the API — https://integrations.expensify.com/Integration-Server/doc/#introduction
The breakdown of fields link is found here — https://integrations.expensify.com/Integration-Server/doc/export_report_template.html.
If you have any other questions or need anything else, please let me know!
-
I got your point and checked above link, but my question is i want to approve/reject any expense using API, how i can do it.
-
Cortney Ofstad Expensify Success Coach - Admin, Expensify Team, Expensify Student Ambassador Posts: 174 Expensify Team
Hi @Ishan! Unfortunately, our API only allows for the ability to update reports as Reimbursed. There is not a way to use the API to approve or rejects reports/expenses at this time.
Sorry for any hassle that this causes!