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

Not getting field "firstname" and "lastname" in look up comment API

Checked the response body of Look Up Comment API (under expense report service apis) - we are not getting First Name and Last Name values. On going through the API version history, we found that these are now removed from the response body. 

Just need to check is there any other API / workaround available to get the First Name and Last Name values of Approver's with comments of Expense report. Request you to kindly share the updates.

 

 API end point we are using : /expensereports/v4/users/{userId}/context/{contextType}/reports/{reportId}/expenses/{expenseId}/comments

API change log : Overview | Expense Report Service | SAP Business Accelerator Hub

3 REPLIES 3
KevinD
Community Manager
Community Manager

@ashhad sending this to my API guy to see if he can provide some insight.


Thank you,
Kevin
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.
TChapman
SAP Concur Employee
SAP Concur Employee

Apparently I am the API guy 🙂

Yes you can get the information, but you need to make a second call.  In the response JSON , you will get the comment and an "author" section.   In that section will be an employeeUuid.  Use that to call Identity v4 to get the information on the author.  In your instance, the name, but you could also get email, empid, etc  See more information at: https://developer.concur.com/api-reference/expense/expense-report/v4.comments.html

ashhad
Occasional Member - Level 1

Hi @TChapman,

Thank you for your suggestion to use the Identity v4 API to retrieve the author details.

We would like to better understand how this approach is expected to work in practice.

For example, the Look up Comments API returns all comments for an expense report along with the author identifiers. If an expense report contains 20 comments from 20 different users/approvers, would we need to make 20 additional Identity v4 API calls to retrieve each author's name? Furthermore, whenever a new comment is added and the comments are refreshed, would the same process need to be repeated?

From our perspective, this would result in multiple additional API calls, which could significantly impact performance, increase response time, and affect the user experience of the comments widget.

Could you please elaborate on the recommended implementation for this scenario? Specifically:

  • Is there a recommended approach to avoid making an Identity v4 API call for every author?

  • Is there any alternative API or supported workaround that provides author names without requiring multiple additional API calls?

We are looking for a solution that minimizes performance overhead and avoids introducing custom logic that could impact existing customer implementations.

We appreciate your guidance and look forward to your recommendations.