Forums | Back to Concur Developer Center

Is it possible to get the expense detail image?


#1

I am working on a connection from Concur to our internal ERP system and I want to import the image for each detail line in the expense.

I have found two methods to retrieve all the images for an expense report:

  1. Getting the ReportImageURL from /api/expense/expensereport/v2.0/report/{id}
  2. Calling /apr/image/v1.0/report/{id} and using the “url” in the response.

Both methods return all images in the report as one PDF file. I would like to fetch the image for a specific line in the report.

Thank you for your help!


#2

dconely,
you have to GET a list of Reports, then, using the Report Id of the desired Report that includes the entries that you want images, GET the Details (v2) or GET Entries (v3) of that Report. That result will produce an Entry ID. Use that Entry ID to get the Image for that entry.

  1. URI = https://www.concursolutions.com/api/expense/expensereport/v2.0/report/{reportId}
  2. GET Images (v1.0)
    A. The results from #1 will provide all of the entry details in a given report. (note: Not all of the entries will have images. )
    B. The following url is for a specific entry ID. The report entry ID is obtained from the results from #1. (see this https://developer.concur.com/api-reference/image/v3.image.html)
    ](https://developer.concur.com/imaging/image-url-resource/image-url-resource-get)
    1. Example of one of the data elements returned: https://www.concursolutions.com/api/image/v1.0/expenseentry/ {entryId}
  3. This url https://www.concursolutions.com/api/image/v1.0/expenseentry/ nhpptJtihqHxbslCY4xTzGNyufSSY31do produced this API Response:
  4. <Image xmlns=“http://www.concursolutions.com/api/image/2011/02” xmlns:i=“http://www.w3.org/2001/XMLSchema-instance”> <Id>nhpptJtihqHxbslCY4xTzGNyufSSY31do</Id> <Url> https://imagingupload.concursolutions.com/file/p0056378jmuy/E6FF5012C1DC81D4A5B7E40DC73CADD1ABF5C5E768E92569E1FCD30CB428C79A037E7A3D339DF60A7C38BA8D8D28F2E67B5434A27BCE892A5C5B6D123B8A1BC9H43520044603FFD123CCB30A671B8D0FE </Url > </Image>

Copy and paste the url from the response into a browser and view the image. Currently, this is a short-lived url for only 30 minutes.


#3

Doug,
That is exactly what I needed!
Thank you!