Invoice with line items
Extracting metadata and line items from invoices with examples in Python and Node.
Overview
This guide covers how to extract metadata and line items from multiple supplier invoices with examples in Python and Node. For this example, we will use the Pretrained model.
You will extract the following metadata fields:
Name of the supplier
Name of the receiver
Invoice number
Purchase order number
Issue date
Pay due date
Total amount
You will extract the following line item fields:
Product number
Product description
Quantity
Price
This guide shows you how to
Getting your API Key
The Authorization header for your API key is: Token YOUR-API-KEY (Login if you do not see one).
You can also obtain the API key by visiting the Settings page.
1. Create a new document type
Before you start extracting data, you need to define a document type. Navigate to the Dashboard page and click on the New document type button in the top right corner of the table. Next, select the Pretrained model, followed by Use a Predefined Template. Next, click on Line item invoice card. The wizard will already pre-fill all the needed extraction fields along with the document type configuration. Click on the Create document type.
This will create a new document type with name line-item-invoice with the following fields:
supplier_namesupplier_vat_idbuyer_namebuyer_vat_idinvoice_numberpayment_referenceinvoice_datepayment_due_dateservice_datetotal_amountnet_amountvat_amountIBANpayment_purpose_codepurchasing_ordercurrency
and line items fields:
item_codeitem_descriptionunitnet_amountvat_amountgross_amountdiscount_percentagediscountunit_pricequantityvat_rate
2. Extract data from documents
👍 For the Pretrained model, we do not need to train the suppliers - we can start extracting data right away.
Here are two examples of invoices that you can use for data extraction:
Download them and extract the data using the code:
Response:
Running Typless live
The only thing that you need to do to automate your manual data entry is to integrate those simple API calls into your system.
Have any questions or need some help? Contact us via chat or email support@typless.com
Last updated