SAP Concur – Retrieving Receipt Images for a specific Country
I have been a Technical Consultant at SAP Concur for quite some time and have worked with many clients to help them build their interfaces between their systems and SAP Concur. One requirement I regularly see come up is to maintain a local archive of receipt images in that country.
In this blog we are focusing on the use case where you may need to retrieve Expense Receipt Images for a particular country. There are several ways of getting Expense Receipt Image files from SAP Concur. These include:
- Image Delivery Extract
A zip-file delivered via SFTP in a predefined format. It does not allow for any country filtering.
- SAP Integration with Concur Solutions (ICS) for SAP ERP Systems
Allow you to define an image archive location within the SAP ERP system. Once setup the receipt images are retrieved as part of the FI posting.
- Web Service APIs
Allows you to retrieve images based on filter criteria through a series of calls from a program to extract the data for immediate consumption. This is an excellent of retrieving receipt images for a local country archive when other standard methods cannot fulfill your requirements. This will be the focus of this blog-post.
This post will not discuss authentication with Concur Expense. Please see this post to get an explanation on authentication and application building within Concur Expense. You will need an application with the following SCOPEs:
Receipt Images can be downloaded by Expense Report. All receipt for the Expense Report will be compiled into a single PDF-file. You can filter the Report list on certain criteria result by using the parameters on the Reports v3 API to ensure the result only returns the relevant reports to download images for.
- Get Report list based on filter criteria
- Get Image per Report ID
- Get Image file
To help you understand APIs used in this use case, I developed the following Postman collection (found here) as an example. More detail on the APIs used can be found on the SAP Business Accelerator Hub:
- Overview | Image API Documentation | SAP Business Accelerator Hub
- Overview | Reports | SAP Business Accelerator Hub
Get Report list based on filter criteria
The first step is to retrieve all the expense reports for which we need to get the receipt images. For this we can use the Reports v3 API – GET /api/v3.0/expense/reports . By adding query parameters we can filter the result. For example, if we want to see all expense report (1) from Italy (2) that have images (3) and have been sent for payment on 13 June 2023 (4), we could use the following parameters:
The actual GET call would then look like this:
In the result, each Expense Report will include an element “ID”, which is the Report ID.
Further detail about the available filter criteria can be found here.
Get Image per Report ID
For each Expense Report you can then use the Image v1 API to get a URL from where you can download a PDF-file with all images for that single report. Since this is per Report ID, you will need make this GET-call for each Expense Report.
The response will contain a URL that can be used to retrieve the actual image file. This URL is valid for 15 minutes after the request.
Get Image file
To get the Receipt Image file, you can call a direct GET to the URL that was returned in the previous step. Any parameters the URL includes will need to be included as well. This URL could look something like this:
Combining SAP Concur’s Reports v3 and Image v1 APIs offer a very flexible way to retrieve Receipt Images based on relevant filter criteria. This allows you to specifically target only those images that you need to store in a local archive.
Share and Connect
What do you think? Do you have anything to add? Leave a comment below.
Did you find it useful? Give us a like and share on social media.
Want to know more about SAP Concur? Please follow here.
Want to ask questions about SAP Concur and its offerings? Ask here
Follow my profile for similar content.