Emburse Enterprise offers an API that enables you to download images after exporting expenses.
REST Expense Image API
The benefits of the REST version of the API include improved performance and standardized access controls. Additionally, the format of the PDF documents available via the API is now consistent with the layout of the PDF documents available within Emburse Expense Enterprise.
Administrators may enable access to the REST Expense Image API via the API Key Management admin screen. See below for instructions on enabling access for SAP Connector. Further details are available in the Implementation Toolkit.
Click here to access the new REST Expense Image API.
Enable REST API for SAP Connector
1. Navigate to the SAP Connector Digital Download Center and log in using the password provided to you via email by the Emburse Enterprise SAP Team. If you do not have access to the email, you may request the password by creating a Support ticket.
2. Scroll down to the Upgrades section and download the ZIP packages for each transport.
3. Deploy the expense workbench transport into SAP systems on each SAP instance.
4. Contact Emburse Enterprise via Support to activate the required expense-image-api resource in Emburse Enterprise.
5. Next, create or change the required RFC connection as shown in the following screenshots of the Technical Settings and Security Settings.
- The target host and path prefix are different for the REST API than they were for the old SOAP API.
Technical Settings
Security Settings
6. Change the customizing for receipts to enable the NewAPI field and enter the known api-key and customer-code.
Optionally, you may delete the receipt unique ID and identifier.
Instructions for Integration Platform or Custom Receipt Processes
If your organization uses an Integration Platform like SAP PI, CPI, or Webmethods, please contact the Emburse Enterprise SAP Team for assistance with enabling the REST API.
If your organization has custom receipt processes, please contact the Emburse Enterprise SAP Team to discuss possible changes for this implementation.
REST API service documentation is available at swagger.io. The HTTP method is changed from POST to GET.
Legacy SOAP Expense Image API
How to Access the Service
- Use the QA/UAT or Production URL provided by your organization's Emburse Enterprise administrator.
Required POST Arguments
| un | Username (FTP User) |
| pw | Password (FTP Password) |
| method | method to run |
method=getVoucherInvoices
Required POST Arguments
| fromDate | MM/DD/YYYY format |
| toDate | MM/DD/YYYY format |
- Note: To optimize the query, the date range is limited to 32 days.
- Note: Records returned are limited to export dates within the past 90 calendar days. If the expense items were exported more than 90 days ago, their XML data will not be returned.
Success XML
Error XML
Data Element Notes
- voucherInvoice: Voucher Invoice number that is created in the financial system
- invoiceDate: Formatted in seconds since 1970
- invoiceDateString: Formatted human readable date
- vendorNumber: Vendor1 or Vendor2 value in Emburse Enterprise
method=getReceipts
Required POST Arguments
| voucherInvoice | Voucher invoice number that was returned from the getVoucherInvoices method. |
| reportID |
The Report ID is a 12-digit number generated by Emburse Enterprise that begins with 0100. Be sure to omit the dashes.
Example: 010012345678
|
Optional POST Arguments
| Argument | Action | Possible Values | Default Value |
| getImage | Returns the expense image | true/false | true |
| getMileageDetails | Returns the Mileage Details cover page | true/false | false |
| getPDFReport | Returns the Full PDF Report | true/false | false |
| getPDFReportWithNotes | Returns the Full PDF Report with Notes | true/false | false |
| imageFirst | Returns the image before the Full PDF Report | true/false | true |
Returns
- If successful, the API will return the consolidated image and/or PDF file.
- If an error occurs, the API will return XML with error information.
Decision-Making and Returned Messages in Detail
- If no data exists for the given voucher invoice ID, the message will be: “Invalid voucherInvoice.”
- If both the image PDFs and JPGs are available, the JPGs will be retrieved first. If no JPGs are available, the PDF will be retrieved.
- If “getPDFReport” is selected, the original PDF will be retrieved first, if available.
- If no JPG or PDF can be found for that invoice, the message will be: “Receipts could not be retrieved. Please resubmit receipts for this voucher.”
- If this expense report does not have any attached images, the message will be: “There are no receipts associated with this expense report.”
method=getReceiptsWithCoverPage()
Required POST Argument
| voucherInvoiceFor Pdf | Voucher invoice number that was returned from the getVoucherInvoices method. |
| reportIDForPdf |
The Report ID is a 12-digit number generated by Emburse Enterprise that begins with 0100. Be sure to omit the dashes.
Example: 010012345678
|
Returns
- If successful, the API will return the consolidated image and/or PDF file.
- If an error occurs, the API will return XML with error information.
Decision-Making and Returned Messages in Detail
- If no data exists for the given voucher invoice ID, the message will be: “Invalid voucherInvoice.”
- If both the image PDFs and JPGs are available, the JPGs will be retrieved first. If no JPGs are available, the PDF will be retrieved.
- If no JPG or PDF can be found for that invoice, the message will be: “Receipts could not be retrieved. Please resubmit receipts for this voucher.”
- If this expense report does not have any attached images, the message will be: “There are no receipts associated with this expense report.”
method=getLineItemVoucherInvoices
- IF particular line item has Image linked to it, THEN include its Line Item Voucher Invoice in the returned list, ELSE do not include it
- IF any Images on the Header are not linked to any Line Item and only sit on the Header, THEN include the 00000000 entry in the returned listing (which should include all nonlinked images
Line Item Voucher Invoice Format:
Required POST Argument
| lineItemVoucherInvoice | Voucher invoice number that was returned from the getVoucherInvoices method. |
Success XML:
method=getLineItemReceipts
Line Item Voucher Invoice Format:
Required POST Argument
| voucherInvoiceForReceipt | Line Item-specific Voucher invoice number that was returned from the getLineItemVoucherInvoices method. |
Returns
- If successful, the API will return the consolidated image and/or PDF file. This will either consist of the images related to that particular line item or of the remaining images of the expense report not associated with any line item (00000000).
- If an error occurs, the API will return XML with error information.
method=getLineItemReceiptsWithMileageDetails
method=getVoucherInvoicesForXML()
Required POST Arguments
| fromDateforXml | MM/DD/YYYY format |
| toDateforXml | MM/DD/YYYY format |
- Note: To optimize the query, the date range is limited to 32 days.
- Note: Records returned are limited to export dates within the past 90 calendar days. If the expense items were exported more than 90 days ago, their XML data will not be returned.
Success XML
Error XML
Data Element Notes
- voucherInvoice: Voucher Invoice number that is created in the financial system
- invoiceDate: Formatted in seconds since 1970
- invoiceDateString: Formatted human readable date
- vendorNumber: Vendor1 or Vendor2 value in Emburse Enterprise
method=getReceiptsForXML()
Required POST Argument
| voucherInvoiceForXml | Voucher invoice number that was returned from the getVoucherInvoicesForXML method. |
Returns
- If successful, the API will return the ZIP file containing all XML files.
- If an error occurs, the API will return XML with error information.
Decision-Making and Returned Messages in Detail
- If no voucher invoice is entered: “VoucherInvoice is required.”
- If no data exists for the given voucher invoice ID, the message will be: “Invalid voucherInvoice.”
- If this expense report does not have any attached images, the message will be: “There are no XMLs associated with this expense report.”
Comments
0 comments
Article is closed for comments.