Create Transactions by Uploading Documents

Overview

Norman uses OCR (Optical Character Recognition) for financial documents such as receipts or invoices to extract data and reconcile.

How does it work?

When a user uploads a financial document (receipt/invoice), Norman automatically extracts relevant data, attempts to match it with existing transactions, or suggests reconciliation. If no matching transaction is found, Norman can automatically convert the document into a new transaction and attach it to the user’s company account, along with the linked document.


Step-by-Step Process:

1. Upload the Document

Your user uploads a financial document (e.g., receipt or invoice) from your client side.

2. Trigger Document Processing

On the backend, use the following API endpoint to process the uploaded document: Upload a Document

Example Request:

curl -X 'POST'  
  '<https://sandbox.norman.finance/api/v1/assistant/upload-retrieval/'>  
  -H 'accept: application/json'  
  -H 'Authorization: Bearer <accessToken>'  
  -F 'file=<binaryFile>'

Example Response:

{  
  "response": [  
    {  
      "content": [  
        {  
          "text": {  
            "annotations": [],  
            "value": "We couldn't find a transaction that matches the uploaded file, but we added it to the list of your attachments. Please try to match it manually instead."  
          },  
          "type": "text"  
        }  
      ]  
    }  
  ],  
  "responseType": "TRANSACTION",  
  "args": {  
    "type": "receipt",  
    "brandName": "Supersupply Berlin GmbH",  
    "number": "296525",  
    "date": "2024-06-04",  
    "total": "3.70€",  
    "vatAmount": "0.24€",  
    "vatPercentage": "7",  
    "currency": "EUR",  
    "supplierCountry": "DE",  
    "saleType": "SERVICES",  
    "description": "1x Batch Brew (To Go)"  
  },  
  "customFunctionResultData": {  
    "attachment": {  
      "publicId": "3ce744f5-dded-4fc1-ac37-785bc17b9d61",  
      "type": "receipt",  
      "file": "/storage/dec25987-a572-440f-8030-d4ddeaa05a73/attachments/receipt/2024-06-26\_\_mAxWCFZ.jpg",  
      "description": "1x Batch Brew (To Go)",  
      "brandName": "Supersupply Berlin GmbH",  
      "vatRate": 7,  
      "attachmentNumber": "296525",  
      "supplierCountry": "DE",  
      "valueDate": "2024-06-04T00:00:00",  
      "saleType": "SERVICES",  
      "currencyOriginal": "EUR",  
      "amountOriginal": 3.7,  
      "vatSumAmountOriginal": 0.24,  
      "currencyExchange": "EUR",  
      "amountExchanged": 3.7,  
      "vatSumAmountExchanged": 0.24  
    },  
    "suggestedTransactions": [],  
    "attachedTransaction": null  
  }  
}

3. Review and Convert

Based on the response, you can either convert the extracted data into a transaction or manually link it with an existing transaction in the user’s account.