cancel
Showing results for 
Search instead for 
Did you mean: 

Who Me Too'd this topic

Who Me Too'd this topic

yvathumilli
Occasional Member - Level 2

Need help in understanding the Expense API V4 usage

HI All,

 

I am currently exploring the Expense V4 API to retrieve all the details of a particular Expense report and present it to my end users in a different format. I logged in to our test tenant and was able to create client credentials, company token to be able to test these APIs. However I have 2 questions for which I was unable to find answers myself over the documentation and other sources:
1. I know that the depreceated V2 API used to give all the data relevant for an expense report in one go with just one API call. But now in V4 we need to call a bunch of endpoints just to gather information for one single expense report. I am currently working on a tool which has to query all the open expense reports and gather all its relevant information periodically. This now leads to too many API calls for each expense reports. Can anyone suggest a better/alternate approach if any ?
2. In the Expense V4 API I keep seeing endpoints for same information e.g., allocations, attendees... always in 2 flavors, one with specifying a user id and context type and another without that. However I am unable to get the latter one working. This is forcing me to always retrieve the User ID in order to call any of these Expense APIs. Can anyone give me a hint to what I am missing here and how I can make use of the APIs without the user id and context type? Does this require a special user with specific permissions to create the client id, secret, company token to make it work??

Sorry for the lengthy post. Highly appreciate any piece of relevant information. 

Thanks in advance.

Who Me Too'd this topic