cancel
Showing results for 
Search instead for 
Did you mean: 
S0018407879
Occasional Member - Level 2

Difficulties using API Expense / Reports V4

Hi,

We are trying to use API Expenses v4 to get the reports of the expenses, but for calling the API I need to know the userID. contextType and reportId, but I don't seem to have an API to get me the list of reportIds with userID. 

 

Has anyone used this API already? Are we looking at it wrongly?

 

Thanks in advance,

Pedro

8 REPLIES 8
leedau
SAP Concur Employee
SAP Concur Employee

@S0018407879 Thanks for posting in the SAP Concur Community. When reading the Expense v4 API details on developer.concur.com, it appears that you need to use Identity v4 API to retrieve the userID. 

 

leedau_0-1700600951530.png

 

Remember to tag me if you respond or feel free to mark this post as Solved if you don't have further questions or comments. To tag me on your response, you click the Reply button, first thing to type is @. This should bring up the username of the person you are replying to.

 

 


Thank you,
Lee-Anne Dautovic
SAP Concur Community Moderator
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.
S0018407879
Occasional Member - Level 2

@leedau ,

Thanks a lot for your answer.

We have checked the API documentation and we have a problems. - We are not able to access Identity v4 API to retrieve the userID. 

But even if we get the userID, we will need to get the reportId.

 

We were using Reports v3 and it had an API to get the reports. On version v4 I could not find it.

And even having the reportIds, then we should loop through all the users and for each user loop through all the reports? It doesn't seem to be very performant.

 

Our intent is to get all the information of the Expense reports into SAP BW and it is proving to be quite difficult, even considering that both are SAP Technologies. 

Can you tell me if we are approaching this in the wrong way?

 

Thanks,

Pedro

ravibharti
New Member - Level 1

Hi Pedro,

Were you able to use this api ?
I am also facing the same issue.

Regards,

Ravi

S0018407879
Occasional Member - Level 2

Hi Ravi,

No were were able to use it yet. Still struggling with it...

 

Regards,

Pedro

 

leedau
SAP Concur Employee
SAP Concur Employee

 

@S0018407879 and @ravibharti Thanks for posting in the SAP Concur Community. I would recommend that you have an Authorized Support Contact at your company open a case in the SAP Concur Support Portal to allow an expert to provide you with the necessary guidance based on your requirements. 

 

Remember to tag me if you respond or feel free to mark this post as Solved if you don't have further questions or comments. To tag me on your response, you click the Reply button, first thing to type is @. This should bring up the username of the person you are replying to.


Thank you,
Lee-Anne Dautovic
SAP Concur Community Moderator
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.
MikelAriztegui
Occasional Member - Level 2

Hi S0018407879,

We use API V4 in our company. In my opinion the first thing to do is to explore CONCUR DEVELOPER CENTER in https://developer.concur.com/api-reference

There you have all the explanations for V4 API and how to use it.

In order to try them, I recommend you using POSTMAN app.

 

 

If you want some examples from Europe (in the USA I think the root path for requests is different):

yvathumilli
Occasional Member - Level 2

Hi

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? 

,

 

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?

MikelAriztegui
Occasional Member - Level 2

Hi 

Hi yvathumilli,
There are several methods in V3 API. The best way to learn how to query the API is using an API client like Postman.
Steps could be:
  1. Get the access token -> https://emea.api.concursolutions.com/oauth2/v0/token
  2. Copy  the string after "access_token" key
  3. Call the desired API. For example, to get an user information -> https://emea.api.concursolutions.com/api/v3.0/common/users?active=false&employeeid=1797
  4. In Authorization section choose "Bearer token" and copy previously loaded "acces_token"
  5. You should receive an XML response like this 
    <Items>
        <User>
            <ID xsi:nil="true" />
            <URI xsi:nil="true" />
            <LoginID>user_name@ayesa.com</LoginID>
            <EmployeeID>xxxx</EmployeeID>
            <FirstName>Miguel Maria</FirstName>
            <LastName>ARIZTEGUI HUARTE</LastName>
            <MiddleName />
            <PrimaryEmail>user_name@ayesa.com</PrimaryEmail>
            <Active>true</Active>
            <CellPhoneNumber xsi:nil="true" />
            <OrganizationUnit xsi:nil="true" />
        </User>
    </Items>
    <NextPage xsi:nil="true" />
</Users>
Preview
MikelAriztegui_0-1717618289495.png

Another example: getting reports by status

MikelAriztegui_1-1717618514552.png

 

I hope it will be helpful.

Regards

Mikel