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

API: Get Individual Expenses from Expense Report

Hello, I'm trying to use the v3 API to get all Expense Reports in a date range, then go through each of the reports and gather some data about each expense in those reports.

 

I'm using this endpoint: api/v3.0/expense/reports?user=all (with some additional filtering).  This works as expected.

I then try to use the use the response I just received to get further details about that report using the ID field for each Report

I use this endpoint: api/v3.0/expense/reports/<report_id> (I have also tried just using the 'URI' included with the report, but it appears to be the same as this)

 

This does not work, I get a response of:

{"Message": "A resource with the specified ID could not be found."}

 

This seems odd since the endpoint I'm making the request to is directly given to me by the API response from the previous request.

 

How do you obtain the expenses in a given report?

4 REPLIES 4
Andras
SAP Concur Employee
SAP Concur Employee

Hi @sschaefer ! Can you please try to use 

GET  /api/v3.0/expense/reports/{id}

 

More information and examples can be found here - SAP Concur Developer Center | Reports v3 


Best wishes,

Andras
SAP Concur

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.

sschaefer
Occasional Member - Level 1

Hi @Andras 

I have tried using that endpoint and I still get the same error JSON response

"{'Message': 'A resource with the specified ID could not be found.'}"

 

I was however able to use the equivalent deprecated v2 API call and it did respond with report details as expected:

api/expense/expensereport/v2.0/report/{id}

 

Is there any other information I can provide to debug this error further?

GIRITTH
Occasional Member - Level 1

Hi,

 

If i want to get all the expenses line item what should be the API end point 

Andras
SAP Concur Employee
SAP Concur Employee

Hi @sschaefer , if I understand correctly you are using Web Services. 

 

Could you please try to create the Support ticket and contact WBS Team directly? 

 

Just FYI, I am the part of ICS, so can not give with further recommendations.

 

Thank you.


Best wishes,

Andras
SAP Concur

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.