cancel
Showing results for 
Search instead for 
Did you mean: 
Alexs2024
Occasional Member - Level 1

API How to download all expense reports

Hi all,

 

Newby here. Can anyone provide a walkthrough of how to download company expenses via API's?

 

We are trying to process them for use in comparative reports (which pull in data from other areas of the company), so any tabular format would be fine, JSON etc. I've read through the API reference guide (it assumes a lot of knowledge which I clearly don't have 😂) and landed on the endpoint Get /api/v3.0/expense/reports

 

I'm using Postman to test this and I thought I had it down, but I'm getting a return message "Forbidden Request".  Anyone know what could cause this? Or how to solve?

 

Thanks for your thoughts 🙂

Full Request looks like this:

 Get https://eu2.api.concursolutions.com/api/v3.0/expense/reports?limit=15&user=ALL

 Authentication token (Client Credentials) obtained and passed in Authentication Header as Bearer {token}

 I'm only using Limit and User as parameters but will probably need more later.

4 REPLIES 4
jeff526
Occasional Member - Level 2

I can get this working with the v4 API, but this seems limited to a signle expense Id for a single User i.e. https://us.api.concursolutions.com/expensereports/v4/users/49c7c5cb-e708-4c18-a57e-8d287754b847/cont....
However if I generate a new token and try this with v3 I receive the same error - Forbidden Request
Are we missing scopes?

leela2516
Super User
Super User

@Alexs2024 - Unfortunately, I do not have any insights on how to get this to work and haven't used it but I am curious how it all turns out. I am also curious, and maybe the information you and @jeff526  have provided tells, but does this also provide the attached receipts for the given report(s)?

jeff526
Occasional Member - Level 2

@leela2516 the Expenses enpoint response will indicate if a receipt is attached. 
However there appears to be a separate endpoint to fetch receipts...
https://preview.developer.concur.com/api-reference/receipts/endpoints.html

Thank you so much @jeff526! I appreciate the information!