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.

7 REPLIES 7
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!

yvathumilli
Occasional Member - Level 2

Hi,

 

We are trying to work with the expense report v3 API and we always receive "Forbidden Request" as the response. We could query the V4 API with same access token. Could you please help us in understanding how did you make the V3 API work?

@yvathumilli is there a reason you don't want to use v4 API? I remember someone telling me that all APIs are getting migrated to v4, so you might be better off using it.


Thank you,
Kevin Dorsey
SAP Concur Community Manager
Did this response answer your question? Be sure to select “Accept as Solution” so your fellow community members can be helped by it as well.
yvathumilli
Occasional Member - Level 2

Hi Kevin, 

 

Our use case is to download all the expense reports that are pending approval. I couldn't find anything equivalent to this in V4 API. But I see this is possible in V3 however. Hence I am trying to see how I can make it work.

 

Thanks,

Yaswanth