Image Integration API for INVOICE Chrome River offers an API that enables you to download images to your internal system after exporting invoices. REST Invoice Image API The SOAP Invoice Image API detailed below will eventually be replaced with the REST Invoice Image REST 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 Chrome River INVOICE. Administrators may enable access to the REST Invoice Image API via the API Key Management admin screen. Further details are available in the Implementation Toolkit. Click here to access the new REST Invoice Image API. Validations Validate invoiceId is length: 12 characters Validate invoice exists Validate invoice has images Validate invoice does not have image count exceeding 100 Validate invoice is not in deleted status Instructions for Integration Platform or Custom Image Processes If your organization uses an Integration Platform like SAP PI, CPI, or Webmethods, please contact the Chrome River SAP Team for assistance with enabling the REST API. If your organization has custom image processes, please contact the Chrome River 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 Invoice Image API Note: The Chrome River Image API requires the client application to specify a security protocol of TLS 1.2 or higher in order to connect. How to Access the Service <environment_url>/receipts/doitenvironment_url (depending on querying PROD or QA/UAT server) Use the QA/UAT or Production URL provided by your organization's Chrome River administrator. Required POST Arguments (always required for every method call below) un Username (FTP User) pw Password (FTP Password) method method to run method=getInvoices This method returns a list of invoices exported in a given date range. The dates are based on the Chrome River export date. Most customers run the service after midnight for the previous day. Your company develops a program that iterates over the list of invoices and calls the getInvoiceImages method for each one. Please note, non-ASCII characters such as currency symbols and soft hyphens are not fully supported at this time and may cause issues with this method. 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 invoice was exported more than 90 days ago, its XML data will not be returned. Success XML <?xml version="1.0" encoding="utf-8" ?><list><com.chromeriver.servlet.InvoiceTO><invoiceID>010000008475</invoiceID><invoiceNumber>0003698602242029</invoiceNumber><invoiceDate>1236293857500</invoiceDate><invoiceDateString>2009-03-05 22:57:37</invoiceDateString><vendorUniqueID>12345</vendorUniqueID><addressUniqueID>3</addressUniqueID></com.chromeriver.servlet.InvoiceTO><com.chromeriver.servlet.InvoiceTO><invoiceID>010000008490</invoiceID><invoiceNumber>0003698602987777</invoiceNumber><invoiceDate>1236293857500</invoiceDate><invoiceDateString>2009-03-05 22:57:37</invoiceDateString><vendorUniqueID>12345</vendorUniqueID><addressUniqueID>3</addressUniqueID></com.chromeriver.servlet.VoucherInvoiceTO>...</list>or<list/> Error XML <?xml version="1.0" encoding="utf-8"?><com.chromeriver.ws.CrRestHeaderOutput><errorMessage> </errorMessage></com.chromeriver.ws.CrRestHeaderOutput> Data Element Notes invoiceID: Invoice ID invoiceNumber: Invoice number invoiceDate: Invoice Date formatted in seconds since 1970 invoiceDateString: Invoice Date vendorUniqueID: Vendor Unique ID addressUniqueID: Vendor Address Unique ID method=getInvoiceImages This method returns a PDF file of all of the images and/or invoice PDF reports associated with an invoice. Each call generates a single PDF file that is named with the Invoice ID. PDF reports will be appended to the image file. Required POST Arguments invoiceID Invoice ID Optional POST Arguments Argument Action Possible Values Default Value getImage Returns the invoice image true/false true getPDFReport Returns the Full PDF report true/false false imageFirst Returns the invoice 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. Note: There is no date limit as to when this call can be made. Decision-Making and Returned Messages in Detail If no invoice exists for the given invoice ID, the message will be: “No invoice record exists for this request.” If both the image PDF and JPG are available, the jpgs will be retrieved; if no JPGs are available the PDF will be retrieved. If “getPDFReport” is selected, the original PDF will be retrieved first, if available. If this invoice does not have any attached images, the message will be: “There are no images associated with this invoice.” INVOICE Image Integration APIs.pdf200 KB Was this article helpful? Yes No