{"info":{"_postman_id":"6bd9ad4a-5825-4bf4-be62-f7f76269c434","name":"Receipt Bot - Open API","description":"<html><head></head><body><p>Receipt-Bot API provides a collection of endpoints for uploading documents and associated metadata for data extraction.</p>\n<p>It is a REST-based service that authenticates requests using an API key.</p>\n<p>The process is divided into two steps;</p>\n<p><strong>Step 1</strong>) Make a request to FileUpload API to start the data extraction by passing the document with base64 encoding.</p>\n<p><strong>Step 2</strong>) Either receive the extracted data on a webhook when the document is processed or make a second request to get the extracted data.</p>\n<img src=\"https://content.pstmn.io/bd769c32-7a46-4ff9-b7b4-6475b3db0f3c/Zmxvdy1kaWFncmFtLnBuZw==\">\n\n<p>Our API uses resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.</p>\n<h1 id=\"base-url\">Base URL</h1>\n<p>The base URL for the API is the following:</p>\n<p><a href=\"https://goapi.receipt-bot.com\">https://api.receipt-bot.com</a></p>\n<h1 id=\"authentication\">Authentication</h1>\n<p>The Receipt Bot API uses an API key to authenticate each request.</p>\n<p>To get your API key;</p>\n<ol>\n<li><p>Register an account with Receipt Bot.</p>\n</li>\n<li><p>Navigate to the \"Integration\" page using the \"Business Configuration\" option from the side menu.</p>\n</li>\n<li><p>Click the \"Show Keys\" button at the bottom of the page.</p>\n</li>\n</ol>\n<p>You should be able to see the \"Organization API Key\" and \"Business ID\".</p>\n<p>Note: If you are an invited user, please ask the account admin to share the keys, as you may not have access to view the keys.</p>\n<h2 id=\"update-api-keys\">Update API Keys</h2>\n<p>To change your API key, navigate to the Integration page using the \"Business Configuration\" option in your Receipt Bot account and click the \"Generate new key\" button. Your old keys will be invalidated, and a new one will appear on the screen.</p>\n<p>Please keep your API key secure and do not share it in publicly accessible locations on your website, GitHub, client-side code, etc.</p>\n<h1 id=\"response-codes\">Response Codes</h1>\n<p>We return standard response status codes to indicate the status of a request.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200 OK</td>\n<td>The request was received and recorded as expected.</td>\n</tr>\n<tr>\n<td>400 Bad Request</td>\n<td>The request was unacceptable, often due to missing a required parameter.</td>\n</tr>\n<tr>\n<td>403 Unauthorized</td>\n<td>An invalid API key was provided.</td>\n</tr>\n<tr>\n<td>404 Not Found</td>\n<td>The requested resource doesn't exist.</td>\n</tr>\n<tr>\n<td>429 Too Many Requests</td>\n<td>You have made more than 60 requests within a minute.</td>\n</tr>\n<tr>\n<td>500, 502, 503, 504</td>\n<td>Something went wrong on our end. (It rarely happens as we thoroughly test all API changes. Please get in touch with us at <a href=\"https://mailto:hello@receipt-bot.com\">hello@receipt-bot.com</a> if you identify any such errors.)</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"request-throttling\">Request Throttling</h1>\n<p>Receipt Bot enforces a limit of 60 requests per minute. If you exceed this limit and send over 60 requests within a minute, the system will respond with an error carrying the status code 429.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Base URL","slug":"base-url"},{"content":"Authentication","slug":"authentication"},{"content":"Response Codes","slug":"response-codes"},{"content":"Request Throttling","slug":"request-throttling"}],"owner":"14388213","collectionId":"6bd9ad4a-5825-4bf4-be62-f7f76269c434","publishedId":"2sA3kYjLPj","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-07-26T13:06:24.000Z"},"item":[{"name":"File Upload","id":"59894509-1946-43db-8299-ccf4a40a836a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"APIKey","value":"{{APIKey}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"businessId\": \"ABC-1234-1234-1234-1234567\",\r\n    \"moduleId\": 1,\r\n    \"fileName\": \"Example.pdf\", \r\n    \"fileContent\": \"The content of the file is converted into a base 64 string\",\r\n    \"documentTypeId\": 2\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.receipt-bot.com/FileUpload","description":"<h1 id=\"introduction\">Introduction</h1>\n<p>This endpoint uploads a new file to Receipt-Bot for data extraction. You can pass the file as a base64-encoded file.</p>\n<h4 id=\"limitation\">Limitation</h4>\n<ul>\n<li><p>The end-point only accepts one file per request. (Please create separate requests if you need to upload multiple files. If multiple documents merged into a PDF file are sent in a request, Receipt Bot will split the file into separate documents and provide multiple responses.)</p>\n</li>\n<li><p>The allowed file formats are PDF, PNG, JPG &amp; JPEG.</p>\n</li>\n<li><p>The maximum file size allowed per API request is 50 MB, while you can upload files up to 256 MB via the web app.</p>\n</li>\n</ul>\n<p>For information about allowed file formats and upload channels, please refer to the following Help Article: <a href=\"https://www.receipt-bot.com/blog/knowledge-base/upload-documents/\">https://www.receipt-bot.com/blog/knowledge-base/upload-documents/</a></p>\n<h1 id=\"input\">Input</h1>\n<p>This end-point requires the following data parameters;</p>\n<h2 id=\"headers-parameters\"><strong>Headers parameters</strong></h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>APIKey</td>\n<td>This is the Organization API Key found on the Integration page. (Mandatory)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"body-parameters\"><strong>Body parameters</strong></h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>businessId</td>\n<td>This is the business ID, which can be found on the Integration page.  <br /><em>(Mandatory)</em></td>\n</tr>\n<tr>\n<td>documentTypeId</td>\n<td>A document type can be an invoice, remittance advice, credit note, etc. A document type defines the validations to be performed after the extraction.  <br />Provide a document type ID based on the allowed values mentioned below.  <br /><em>(Optional)</em> (Default is 1)</td>\n</tr>\n<tr>\n<td>fileName</td>\n<td>Provide a friendly name for the file. (Include the file extension in the name.)  <br /><em>(Mandatory)</em></td>\n</tr>\n<tr>\n<td>fileContent</td>\n<td>Provide the content of the file as a string with a base64 encoding.  <br /><em>(Mandatory)</em></td>\n</tr>\n<tr>\n<td>moduleId</td>\n<td>The modules can be Purchases, Sales and more. A module defines the pipeline and fields to be extracted from a document.  <br />Provide a module ID based on the allowed values mentioned below.  <br /><em>(Optional)</em></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"module-id\">Module ID</h2>\n<p>Module ID can be any of the following.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Module Name</strong></th>\n<th><strong>Module ID</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Purchase Invoice</td>\n<td>1</td>\n</tr>\n<tr>\n<td>Sale Invoice</td>\n<td>2</td>\n</tr>\n<tr>\n<td>Bank/Card Statement</td>\n<td>3</td>\n</tr>\n<tr>\n<td>Other Document</td>\n<td>4</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"document-type\">Document Type</h2>\n<p>Document Type can be any of the following;</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Document Type</strong></th>\n<th><strong>Document Type ID</strong></th>\n<th><strong>Module</strong></th>\n<th><strong>Module ID</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Invoice</strong></td>\n<td>1</td>\n<td>Purchase Invoice</td>\n<td>1</td>\n</tr>\n<tr>\n<td>Remittance Advice</td>\n<td>5</td>\n<td>Purchase Invoice</td>\n<td>1</td>\n</tr>\n<tr>\n<td>Credit Note (Refund)</td>\n<td>10</td>\n<td>Purchase Invoice</td>\n<td>1</td>\n</tr>\n<tr>\n<td>Invoice</td>\n<td>26</td>\n<td>Sale Invoice</td>\n<td>2</td>\n</tr>\n<tr>\n<td>Payment confirmation/Receipt</td>\n<td>27</td>\n<td>Sale Invoice</td>\n<td>2</td>\n</tr>\n<tr>\n<td>Customer Credit</td>\n<td>28</td>\n<td>Sale Invoice</td>\n<td>2</td>\n</tr>\n<tr>\n<td>Bank Statement</td>\n<td>41</td>\n<td>Bank Statement</td>\n<td>3</td>\n</tr>\n<tr>\n<td>Credit Card Statement</td>\n<td>42</td>\n<td>Bank Statement</td>\n<td>3</td>\n</tr>\n<tr>\n<td>Loan/Mortgage Statement</td>\n<td>43</td>\n<td>Bank Statement</td>\n<td>3</td>\n</tr>\n<tr>\n<td>Merchant Account Statement</td>\n<td>44</td>\n<td>Bank Statement</td>\n<td>3</td>\n</tr>\n<tr>\n<td>PayPal Statement</td>\n<td>45</td>\n<td>Bank Statement</td>\n<td>3</td>\n</tr>\n<tr>\n<td>Other Document</td>\n<td>46</td>\n<td>Extract Table</td>\n<td>4</td>\n</tr>\n<tr>\n<td>Other Document</td>\n<td>47</td>\n<td>PDF to Text</td>\n<td>4</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"output\">Output</h1>\n<p>If the request is successful, the endpoint returns a document ID in response. The document ID is a unique identifier for a document within a business in the Receipt Bot.</p>\n<p>Receipt Bot will start the extraction process for your uploaded documents (provided you have an active subscription with a positive credit balance. You can find detailed information about <a href=\"https://www.receipt-bot.com/blog/knowledge-base/view-billing-utilization-history/\">credit utilization and billing in Receipt Bot here.)</a></p>\n<p>Receipt Bot does not return the extracted data immediately in response. As the extraction process takes some time. There are following two ways to get the extracted data;</p>\n<p>Option 1) Set up a webhook where Receipt Bot can drop the extracted data once it is available.</p>\n<p>Option 2) Keep polling the get statement details API until you receive the output.</p>\n<h1 id=\"receive-via-webhook\">Receive via Webhook</h1>\n<p>Receipt Bot will return extracted data via HTTP post on your provided Webhook URL. This approach is preferred because it reduces the workload on both systems.</p>\n<h2 id=\"setup-a-webhook-in-receipt-bot\">Setup a Webhook in Receipt Bot</h2>\n<p>You can set up a Webhook from the integration page on the Receipt Bot web app. Please follow the below steps;</p>\n<ol>\n<li><p>Login to your Receipt Bot account.<br /> (You must be an account owner to be able to set up a Webhook)</p>\n</li>\n<li><p>Navigate to the \"Integration\" page.</p>\n</li>\n<li><p>Click the \"Connect via API\" button.</p>\n</li>\n<li><p>Provide a friendly, short name for the integration.</p>\n</li>\n<li><p>Click the \"Save &amp; Generate Keys\" button.</p>\n</li>\n<li><p>Click the \"Add Webhook\" button.</p>\n</li>\n<li><p>Enter a Webhook URL.<br /> Note: You can also set up a basic authentication for your webhook URL.</p>\n</li>\n<li><p>Click the \"Save\" button.</p>\n</li>\n</ol>\n<p>Your webhook should now be set up in Receipt Bot. Now, you can export data from Receipt Bot to your application directly.</p>\n<h3 id=\"important-notes\">Important Notes</h3>\n<ul>\n<li><p>Receipt Bot supports multiple businesses under one account. If you have multiple businesses, you must perform the above action separately for each business.</p>\n</li>\n<li><p>At present, the system exports data solely for documents within the bank/card statement module. Documents uploaded as Purchase, Sale, or Other will not have their data extracted and sent via webhook.</p>\n</li>\n<li><p>If a document is deleted by Receipt Bot, its data is not sent over the Webhook.</p>\n</li>\n</ul>\n<h3 id=\"additional-settings\">Additional Settings</h3>\n<p>There are a few additional settings related to the setup of Webhook in Receipt Bot.</p>\n<ul>\n<li><p><strong>Auto Export</strong>: This setting controls whether the processed documents should be automatically pushed to the provided Webhook URL.</p>\n</li>\n<li><p><strong>Export modified PDF file</strong>: The system can automatically split a document under certain conditions. When this occurs, the system returns the document's content as a base64-encoded string. Given the potential size of the data, which can be substantial, there is an option to manage whether the system should return the base64 encoded string.</p>\n</li>\n</ul>\n<h3 id=\"development-requirements-for-your-system\">Development Requirements for Your System</h3>\n<ul>\n<li><p>You must set a URL in your system that should accept a POST request. It should be provided to Receipt Bot as a Webhook URL.</p>\n</li>\n<li><p>Your webhook URL must return a 200-success response status code for incoming requests. If a success response is not returned, Receipt Bot will treat the export as failed and will resend the event up to three times, or until a success response is received.</p>\n</li>\n</ul>\n<h3 id=\"webhook-events\">Webhook Events</h3>\n<p>The data will be exported to the given webhook when extracted. All export attempts are recorded as events in the system. Below is a list of key export events;</p>\n<h4 id=\"1--statement-data-export\"><strong>1- Statement Data Export</strong></h4>\n<ul>\n<li><p>This event is generated when a bank/card statement is processed.</p>\n</li>\n<li><p>The event content includes metadata for the file, extracted header and transaction details.</p>\n</li>\n<li><p>Sample response attached with example \"Webhooks Response - Successful Response for Statement Data Export\".</p>\n</li>\n</ul>\n<h4 id=\"2--file-export\"><strong>2- File Export</strong></h4>\n<ul>\n<li><p>This event is generated when a document is exported from Receipt Bot as a result of a split or merge, creating a new file and document ID in Receipt Bot.</p>\n</li>\n<li><p>The event content includes metadata &amp; base 64 content for the new file created by Receipt Bot.</p>\n</li>\n<li><p>This document and document ID would not exist in your system at this stage. The system will send both the document and the extracted data together in two different files as simultaneous events.</p>\n</li>\n<li><p>Sample response attached with example \"Webhooks Response - Successful Response for File Export\".</p>\n</li>\n</ul>\n<h3 id=\"event-details---statement-data-export\">Event Details - Statement Data Export</h3>\n<p>Receipt Bot provides the following attributes when exporting the statement data;</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field Name</th>\n<th>Field Path</th>\n<th>Definition</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Business ID</td>\n<td>businessId</td>\n<td>Receipt Bot generated unique business/entity identifier.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Business Name</td>\n<td>businessName</td>\n<td>The business name you provided for the business setup.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Event ID</td>\n<td>eventId</td>\n<td>A unique ID assigned for each export attempt by Receipt Bot to your provided webhook.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Event Type</td>\n<td>eventType</td>\n<td>Type of events initiated by Receipt Bot for exporting data to your webhooks. Allowed values: FileExport, StatementDataExport</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Trigger</td>\n<td>trigger</td>\n<td>The trigger that initiated this event. Allowed values: AutoExport, ManualExport</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Webhook Status</td>\n<td>webhookStatus</td>\n<td>Status of the webhook. Allowed values: Scheduled, Succeeded, Re-scheduled, Failed</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Occurred At</td>\n<td>occurredAt</td>\n<td>Date and time when the event occurred.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Document ID</td>\n<td>file.documentId</td>\n<td>Receipt Bot generated a unique document identifier for each business.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Upload Date</td>\n<td>file.uploadDate</td>\n<td>The date and time when Receipt Bot received your document.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Module Name</td>\n<td>file.moduleName</td>\n<td>The module identified by the system. Allowed values: Purchase Invoice, Sale Invoice, Other Document, Bank Statement</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Module Type ID</td>\n<td>file.moduleTypeId</td>\n<td>Document type identified by the system. Allowed values: 0, 1, 2, 3</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>File Name</td>\n<td>file.fileName</td>\n<td>The original file name provided when uploading a document.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Source</td>\n<td>file.source</td>\n<td>The source from which a document is received. Allowed values: Web, Mobile, Email, System, API</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Uploaded By Email</td>\n<td>file.uploadUserEmail</td>\n<td>The user email who uploaded the document.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Document ID</td>\n<td>file.parent.DocumentId</td>\n<td>The unique identifier for the source document from which the current document has been generated.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Parent File Name</td>\n<td>file.parent.FileName</td>\n<td>The name of the source document that was passed on document upload.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Parent Remaining Responses</td>\n<td>file.parent.remainingResponses</td>\n<td>This shows the number of responses that you will further receive for the source document.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Closing Balance</td>\n<td>statement.closingBalance</td>\n<td>Closing balances as extracted from the statement. Positive integer for an account credit balance and a negative integer for an account debit balance.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Opening Balance</td>\n<td>statement.openingBalance</td>\n<td>Opening balances as extracted from the statement. Positive integer for an account credit balance and a negative integer for an account debit balance.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Date From</td>\n<td>statement.dateFrom</td>\n<td>Start date of the period for statement.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Date To</td>\n<td>statement.dateTo</td>\n<td>End date of the period for statement.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Document Type</td>\n<td>statement.documentType</td>\n<td>The subtype for the document. Allowed values: Bank Statement, Credit Card Statement, Loan/Mortgage Statement, Merchant Account Statement, PayPal Statement, Duplicate Document, Processing Error.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Process Status</td>\n<td>statement.processStatus</td>\n<td>The status of the document in the processing cycle. Allowed values: Processing, Processed, Paused, Exported.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Title</td>\n<td>statement.title</td>\n<td>Title as extracted from the bank statement.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Chargeable Pages</td>\n<td>statement.chargeablePages</td>\n<td>Number of pages eligible for credit charges associated with the document.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Transactions Count</td>\n<td>statement.transactionsCount</td>\n<td>Count of transactions associated with the document.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Processing Notes</td>\n<td>statement.processingNotes</td>\n<td>Processing Notes added in case of validation failures or errors during document processing.</td>\n<td>List (String)</td>\n</tr>\n<tr>\n<td>Payment Method ID</td>\n<td>statement.paymentMethod.paymentMethodId</td>\n<td>Unique ID assigned to each payment method.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Bank Name</td>\n<td>statement.paymentMethod.bankName</td>\n<td>Bank name as extracted from the statement.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Payment Method Name</td>\n<td>statement.paymentMethod.displayName</td>\n<td>Unique name assigned to each account by Receipt Bot or by the user.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Account Number</td>\n<td>statement.paymentMethod.accountNumber</td>\n<td>The last four digits of the account number as extracted by the system.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Payment Mode</td>\n<td>statement.paymentMethod.paymentMode</td>\n<td>Type of bank account. Allowed values: Bank, Credit Card, PayPal, None</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Currency</td>\n<td>statement.paymentMethod.currency</td>\n<td>Currency for the payment method.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Bank Address</td>\n<td>statement.paymentMethod.bankAddress</td>\n<td>Bank address as extracted from the statement.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Phone Number</td>\n<td>statement.paymentMethod.bankPhoneNumber</td>\n<td>Bank phone number as extracted from the statement by Receipt-Bot.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Customer Name</td>\n<td>statement.paymentMethod.customerName</td>\n<td>Customer name as extracted from the statement by Receipt-Bot.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Customer Phone Number</td>\n<td>statement.paymentMethod.customerPhoneNumber</td>\n<td>Customer phone number as extracted from the statement by Receipt-Bot.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Customer Address</td>\n<td>statement.paymentMethod.customerAddress</td>\n<td>Customer address as extracted from the statement by Receipt-Bot.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Transaction ID</td>\n<td>statement.transactions.transactionId</td>\n<td>ID refers to the sequence of rows in a statement.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Transaction Date</td>\n<td>statement.transactions.date</td>\n<td>Extracted from the statement and standardized to address any gaps.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Transaction Description</td>\n<td>statement.transactions.description</td>\n<td>It is the particulars or narration extracted for a transaction.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Transactions Reference</td>\n<td>statement.transactions.reference</td>\n<td>Extracted reference or transaction type.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Money Out</td>\n<td>statement.transactions.moneyOut</td>\n<td>The amount paid out from the account.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Money In</td>\n<td>statement.transactions.moneyIn</td>\n<td>The amount received into the account.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Running Balance</td>\n<td>statement.transactions.balance</td>\n<td>Extracted running balance amounts from the statement.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Sub Account Reference</td>\n<td>statement.transactions.subAccountReference</td>\n<td>If the statement has multiple accounts, the account reference added against each transaction to indicate which account/card this transaction relates to.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Memo Amount 1</td>\n<td>statement.transactions.memoAmount1</td>\n<td>Additional columns in a statement that do not impact the balance are only included as transaction details, e.g., charges, fee, interest, etc.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Memo Amount 2</td>\n<td>statement.transactions.memoAmount2</td>\n<td>Additional extracted data, similar to memo amount 1.</td>\n<td>Integer</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"event-details---file-export\">Event Details - File Export</h3>\n<p>Receipt Bot provides the following attributes when exporting statement files that were created in Receipt Bot as a result of the split or merge of uploaded documents;</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field Name</th>\n<th>Field Path</th>\n<th>Definition</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Document ID</td>\n<td>file.documentId</td>\n<td>Receipt Bot generated a unique document identifier for each business.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Upload Date</td>\n<td>file.uploadDate</td>\n<td>The date and time when Receipt Bot received your document.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Module Name</td>\n<td>file.moduleName</td>\n<td>The module identified by the system. Allowed values: Purchase Invoice, Sale Invoice, Other Document, Bank Statement</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Module Type ID</td>\n<td>file.moduleTypeId</td>\n<td>Document type identified by the system. Allowed values: 0, 1, 2, 3</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>File Name</td>\n<td>file.fileName</td>\n<td>The original file name provided when uploading a document.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Source</td>\n<td>file.source</td>\n<td>The source from which a document is received. Allowed values: Web, Mobile, Email, System, API</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Uploaded By Email</td>\n<td>file.uploadUserEmail</td>\n<td>The user email who uploaded the document.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Document ID</td>\n<td>file.parent.DocumentId</td>\n<td>The unique identifier for the source document from which the current document has been generated.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Parent File Name</td>\n<td>file.parent.FileName</td>\n<td>The name of the source document that was passed on document upload.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Parent Remaining Responses</td>\n<td>file.parent.remainingResponses</td>\n<td>This shows the number of responses that you will further receive for the source document.</td>\n<td>Integer</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["FileUpload"],"host":["api","receipt-bot","com"],"query":[],"variable":[]}},"response":[{"id":"950c0cd7-b51c-40a7-b7a1-3628002254a9","name":"Successful Upload Example","originalRequest":{"method":"POST","header":[{"key":"APIKey","value":"ABC12345678","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"businessId\": \"ABC-1234-1234-1234-1234567\",\r\n    \"moduleId\": 1,\r\n    \"fileName\": \"Example.pdf\", \r\n    \"fileContent\": \"The content of the file after converting into a base 64 encoding\",\r\n    \"documentTypeId\": 2\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.receipt-bot.com/Fileupload"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Length","value":"153"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Server","value":"Microsoft-IIS/8.5"},{"key":"X-Rate-Limit-Limit","value":"5s"},{"key":"X-Rate-Limit-Remaining","value":"24"},{"key":"X-Rate-Limit-Reset","value":"2024-06-22T11:01:00.8925069Z"},{"key":"X-Powered-By","value":"ASP.NET"},{"key":"Date","value":"Sat, 22 Jun 2024 11:00:56 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Document Uploaded Successfully\",\n    \"documentId\": \"4\",\n    \"processingTime\": \"Expected Processing Time is 30 Minutes\",\n    \"apiVersionKey\": \"V3\"\n}"},{"id":"a6427c29-607d-400a-8635-9ffc4a6c60f6","name":"Incorrect API or Business key Passed Example","originalRequest":{"method":"POST","header":[{"key":"APIKey","value":"Required","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"businessId\": \"Abc1234\",\r\n    \"moduleId\": 1,\r\n    \"fileName\": \"Example.pdf\", \r\n    \"fileContent\": \"The content of the file after converting into a base 64 encoding\",\r\n    \"documentTypeId\": 2\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.receipt-bot.com/FileUpload"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Length","value":"109"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Server","value":"Microsoft-IIS/10.0"},{"key":"X-Rate-Limit-Limit","value":"5s"},{"key":"X-Rate-Limit-Remaining","value":"24"},{"key":"X-Rate-Limit-Reset","value":"2024-08-13T14:47:16.5893445Z"},{"key":"X-Powered-By","value":"ASP.NET"},{"key":"Date","value":"Tue, 13 Aug 2024 14:47:11 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 400,\n    \"message\": \"Authentication error, please verify the APIKey or BusinessID.\",\n    \"apiVersionKey\": \"V3\"\n}"},{"id":"36fd94d2-7cb3-4f5c-a5d5-9a20cf2369cf","name":"Incorrect base64 string passed","originalRequest":{"method":"POST","header":[{"key":"APIKey","value":"ABC12345678","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"businessId\": \"Abc1234\",\r\n    \"moduleId\": 1,\r\n    \"fileName\": \"Example.pdf\", \r\n    \"fileContent\": \"The content of the file after converting into a base 64 encoding\",\r\n    \"documentTypeId\": 2\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.receipt-bot.com/FileUpload"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Length","value":"119"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Server","value":"Microsoft-IIS/10.0"},{"key":"X-Rate-Limit-Limit","value":"5s"},{"key":"X-Rate-Limit-Remaining","value":"24"},{"key":"X-Rate-Limit-Reset","value":"2024-08-13T15:34:37.5818309Z"},{"key":"X-Powered-By","value":"ASP.NET"},{"key":"Date","value":"Tue, 13 Aug 2024 15:34:32 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 400,\n    \"message\": \"The provided extension does not match with base64 of the file provided.\",\n    \"apiVersionKey\": \"V3\"\n}"},{"id":"e8ca53f1-f868-4f21-b988-24348999cfa0","name":"Incorrect Extension Passed Example","originalRequest":{"method":"POST","header":[{"key":"APIKey","value":"ABC12345678","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"businessId\": \"Abc1234\",\r\n    \"moduleId\": 1,\r\n    \"fileName\": \"Example.nofileextension\", \r\n    \"fileContent\": \"@#$%^&abcdadakldl\",\r\n    \"documentTypeId\": 2\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.receipt-bot.com/FileUpload"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Length","value":"79"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Server","value":"Microsoft-IIS/10.0"},{"key":"X-Rate-Limit-Limit","value":"5s"},{"key":"X-Rate-Limit-Remaining","value":"24"},{"key":"X-Rate-Limit-Reset","value":"2024-08-13T15:39:04.8812772Z"},{"key":"X-Powered-By","value":"ASP.NET"},{"key":"Date","value":"Tue, 13 Aug 2024 15:38:59 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 400,\n    \"message\": \"File extension is not provided.\",\n    \"apiVersionKey\": \"V3\"\n}"},{"id":"f44ebd55-9428-48d5-9553-89d8bcf29470","name":"Webhooks Response - Successful Response","originalRequest":{"method":"POST","header":[{"key":"APIKey","value":"ABC12345678","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"payload\": [\r\n        {\r\n            \"file\": {\r\n                \"parentDocument\": {\r\n                    \"documentId\": null,\r\n                    \"fileName\": null,\r\n                    \"remainingResponses\": 0\r\n                },\r\n                \"documentId\": 1,\r\n                \"uploadDate\": 1722000646,\r\n                \"moduleName\": \"Bank Statement\",\r\n                \"moduleId\": 3,\r\n                \"fileName\": \"Example.pdf\",\r\n                \"source\": \"Web\",\r\n                \"uploadUserEmail\": \"Abc@example.com\"\r\n            },\r\n            \"statement\": {\r\n                \"paymentMethod\": {\r\n                    \"paymentMethodId\": 123,\r\n                    \"bankName\": null,\r\n                    \"displayName\": \"None\",\r\n                    \"accountNumber\": null,\r\n                    \"paymentMode\": \"None\",\r\n                    \"currency\": null,\r\n                    \"bankAddress\": null,\r\n                    \"bankPhoneNumber\": null,\r\n                    \"customerName\": null,\r\n                    \"customerPhoneNumber\": null,\r\n                    \"customerAddress\": null\r\n                },\r\n                \"processingNotes\": [],\r\n                \"transactions\": [\r\n                    {\r\n                        \"uniqueIdentifierId\": 239498,\r\n                        \"transactionId\": 1,\r\n                        \"lineId\": \"01566100001000023\",\r\n                        \"date\": 1640995200,\r\n                        \"description\": \"desc\",\r\n                        \"reference\": \"ref\",\r\n                        \"moneyOut\": 200,\r\n                        \"moneyIn\": 0,\r\n                        \"balance\": 0,\r\n                        \"subAccountReference\": null,\r\n                        \"memoAmount1\": 0,\r\n                        \"memoAmount2\": 0\r\n                    },\r\n                    {\r\n                        \"uniqueIdentifierId\": 239499,\r\n                        \"transactionId\": 2,\r\n                        \"lineId\": \"01566100002000023\",\r\n                        \"date\": 1641081600,\r\n                        \"description\": \"desc\",\r\n                        \"reference\": \"ref\",\r\n                        \"moneyOut\": 199,\r\n                        \"moneyIn\": 0,\r\n                        \"balance\": 0,\r\n                        \"subAccountReference\": null,\r\n                        \"memoAmount1\": 0,\r\n                        \"memoAmount2\": 0\r\n                    }\r\n                ],\r\n                \"closingBalance\": 1000,\r\n                \"dateFrom\": 1640995200,\r\n                \"dateTo\": 1670630400,\r\n                \"recordAs\": null,\r\n                \"openingBalance\": -29399,\r\n                \"processStatus\": \"Exported\",\r\n                \"title\": null,\r\n                \"transactionsCount\": 2,\r\n                \"chargeablePages\": 1\r\n            },\r\n            \"message\": \"Success\",\r\n            \"apiVersionKey\": \"V2\",\r\n            \"businessId\": \"ABC-1234-1234-1234-1234567\",\r\n            \"businessName\": \"Demo Business\",\r\n            \"eventId\": \"EV_0123\",\r\n            \"eventType\": \"StatementDataExport\",\r\n            \"occurredAt\": 1722000910,\r\n            \"trigger\": null,\r\n            \"webhookStatus\": \"Sent\"\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.receipt-bot.com/FileUpload"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Server","value":"Microsoft-IIS/10.0"},{"key":"X-Powered-By","value":"ASP.NET"},{"key":"Date","value":"Sat, 10 Aug 2024 15:13:19 GMT"},{"key":"Content-Length","value":"1245"}],"cookie":[],"responseTime":null,"body":"{}"},{"id":"2b00b60a-543d-4233-ab4d-c013e263b64d","name":"Webhooks Response - Successful Response for File Export","originalRequest":{"method":"POST","header":[{"key":"APIKey","value":"ABC12345678","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"payload\": [\r\n        {\r\n            \"file\": {\r\n                \"parentDocument\": {\r\n                    \"documentId\": null,\r\n                    \"fileName\": null,\r\n                    \"remainingResponses\": 0\r\n                },\r\n                \"documentId\": 1,\r\n                \"uploadDate\": 1724337771,\r\n                \"documentTypeName\": null,\r\n                \"documentTypeId\": 0,\r\n                \"fileContent\": \"The content of the file is converted into a base 64 string\",\r\n                \"fileName\": \"Example.pdf\",\r\n                \"source\": \"Web\",\r\n                \"uploadUserEmail\": \"Abc@example.com\"\r\n            },\r\n            \"businessId\": \"ABC-1234-1234-1234-1234567\",\r\n            \"businessName\": \"Demo Business\",\r\n            \"eventId\": \"EV_31957\",\r\n            \"eventType\": \"StatementDataExport\",\r\n            \"occurredAt\": 1724338171,\r\n            \"trigger\": null,\r\n            \"webhookStatus\": \"Sent\"\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.receipt-bot.com/FileUpload"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Server","value":"Microsoft-IIS/10.0"},{"key":"X-Powered-By","value":"ASP.NET"},{"key":"Date","value":"Fri, 16 Aug 2024 13:17:44 GMT"},{"key":"Content-Length","value":"1245"}],"cookie":[],"responseTime":null,"body":"{}"}],"_postman_id":"59894509-1946-43db-8299-ccf4a40a836a"},{"name":"Get Statement Details","id":"55fa7bdf-af97-434e-b092-ca8a19639244","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"APIKey","value":"Required","type":"text"}],"body":{"mode":"raw","raw":"{\r\n\"businessId\":\"ABC-1234-1234-1234-1234567\", \r\n\"documentId\":1 \r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.receipt-bot.com/StatementDetails","description":"<h1 id=\"introduction\">Introduction</h1>\n<p>This endpoint can be used to get the bank statement details.</p>\n<p><em>Note: The data extraction process takes some time; therefore, avoid hitting the API immediately after uploading the document. It is recommended that you set up a webhook interface so that Receipt Bot automatically sends you extracted data on your endpoint once it is processed.</em></p>\n<h1 id=\"input\"><strong>Input</strong></h1>\n<p>This endpoint requires the following data parameters;</p>\n<h2 id=\"headers-parameters\"><strong>Headers Parameters</strong></h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>APIKey</td>\n<td>The API Key is generated for your integration. (Mandatory)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"body\"><strong>Body</strong></h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>businessId</td>\n<td>The encrypted business ID. (Mandatory)</td>\n</tr>\n<tr>\n<td>documentId</td>\n<td>Retrieve statement details by providing the Document ID. (Optional)</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"output\"><strong>Output</strong></h1>\n<p>The output will follow this structure.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field Name</th>\n<th>Field Path</th>\n<th>Definition</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>API Version</td>\n<td>APIVersionKey</td>\n<td>This key represents the setup of the webhooks version.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>Message</td>\n<td>message</td>\n<td>This key will return a detailed message if the request contains an error. If no error occurs and the request is completed successfully, the system will return \"success\", and the list of possible values is mentioned below.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>Payload</td>\n<td>payload</td>\n<td>This key will return a list of documents.</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"common-messages\"><strong>Common Messages</strong></h2>\n<ul>\n<li><p>If the document ID passed in the input does not exist in the Receipt-Bot, you will get a message \"Document ID doesn't exist\".</p>\n</li>\n<li><p>If any mandatory field is missed or passed with incorrect casing in the request, you will get a message: \"Invalid parameter keys, the keys and values are case sensitive.\"</p>\n</li>\n<li><p>If the APIKey or BusinessID is passed incorrectly, the system will return a message: \"Authentication error, user or business key not found.\"</p>\n</li>\n<li><p>If the document is currently in processing, the system will return a message key under the payload key with the value \"Document is currently queued to be processed\".</p>\n</li>\n<li><p>If the document requested is not processed and the processing has been paused due to any reason, then you will receive a message \"Document processing paused; [reason for pause].\"</p>\n</li>\n</ul>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>If the document ID in the request was modified and split into multiple documents, the payload will return the list of all split documents.</p>\n</li>\n<li><p>Each item in the list will contain the same information received from the webhooks. The definition of keys is under the heading \"Event Details—Statement Data Export.\"</p>\n</li>\n<li><p>If the document you uploaded has been modified and split into multiple files, you will receive data for all the split files created from this document under the payload key.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["StatementDetails"],"host":["api","receipt-bot","com"],"query":[],"variable":[]}},"response":[{"id":"85240ead-61ec-4a9c-b915-42c95980d446","name":"Statement Details","originalRequest":{"method":"POST","header":[{"key":"APIKey","value":"Sample-1234C-527C-B027-C58490C3CD12"}],"body":{"mode":"raw","raw":"{\r\n\"businessId\":\"ABC-1234-1234-1234-1234567\",\r\n\"documentId\":1\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.receipt-bot.com/StatementDetails"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Length","value":"799"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Server","value":"Microsoft-IIS/8.5"},{"key":"X-Rate-Limit-Limit","value":"5s"},{"key":"X-Rate-Limit-Remaining","value":"24"},{"key":"X-Rate-Limit-Reset","value":"2024-04-17T14:51:42.9902230Z"},{"key":"X-Powered-By","value":"ASP.NET"},{"key":"Date","value":"Wed, 17 Apr 2024 14:51:38 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"apiVersionKey\": \"V3\",\n    \"message\": \"Success\",\n    \"payload\": [\n        {\n            \"businessId\": \"ABC-1234-1234-1234-1234567\",\n            \"businessName\": \"Test API\",\n            \"eventId\": \"EV_2810\",\n            \"eventType\": \"GetStatementData\",\n            \"file\": {\n                \"documentId\": 1,\n                \"documentTypeId\": 3,\n                \"documentTypeName\": \"Bank Statement\",\n                \"fileName\": \"Invoice 16042024.pdf\",\n                \"parentDocument\": {\n                    \"documentId\": null,\n                    \"fileName\": null,\n                    \"remainingResponses\": 0\n                },\n                \"source\": \"web\",\n                \"uploadDate\": 1713362127,\n                \"uploadUserEmail\": \"TestUser@receipt-bot.com\"\n            },\n            \"occurredAt\": 1713365502,\n            \"statement\": {\n                \"chargeablePages\": null,\n                \"closingBalance\": null,\n                \"dateFrom\": null,\n                \"dateTo\": null,\n                \"documentSubType\": null,\n                \"openingBalance\": null,\n                \"paymentMethod\": null,\n                \"processingNotes\": [],\n                \"processStatus\": \"Uploaded\",\n                \"title\": null,\n                \"transactions\": [],\n                \"transactionsCount\": 0\n            },\n            \"trigger\": \"Get Statement Export\",\n            \"webhookStatus\": null\n        }\n    ]\n}\n"}],"_postman_id":"55fa7bdf-af97-434e-b092-ca8a19639244"}]}