diff --git a/docs/code_samples/expense_receipts_v5_async.txt b/docs/code_samples/expense_receipts_v5_async.txt new file mode 100644 index 00000000..be79ae80 --- /dev/null +++ b/docs/code_samples/expense_receipts_v5_async.txt @@ -0,0 +1,21 @@ +const mindee = require("mindee"); +// for TS or modules: +// import * as mindee from "mindee"; + +// Init a new client +const mindeeClient = new mindee.Client({ apiKey: "my-api-key" }); + +// Load a file from disk +const inputSource = mindeeClient.docFromPath("/path/to/the/file.ext"); + +// Parse the file +const apiResponse = mindeeClient.enqueueAndParse( + mindee.product.ReceiptV5, + inputSource +); + +// Handle the response Promise +apiResponse.then((resp) => { + // print a string summary + console.log(resp.document.toString()); +}); diff --git a/docs/energy_bill_fra_v1.md b/docs/energy_bill_fra_v1.md index 485520b6..890d1556 100644 --- a/docs/energy_bill_fra_v1.md +++ b/docs/energy_bill_fra_v1.md @@ -6,8 +6,8 @@ parentDoc: 609809574212d40077a040f1 --- The Node.js OCR SDK supports the [Energy Bill API](https://platform.mindee.com/mindee/energy_bill_fra). -Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/energy_bill_fra/default_sample.jpg), we are going to illustrate how to extract the data that we want using the OCR SDK. -![Energy Bill sample](https://github.com/mindee/client-lib-test-data/blob/main/products/energy_bill_fra/default_sample.jpg?raw=true) +Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/energy_bill_fra/default_sample.pdf), we are going to illustrate how to extract the data that we want using the OCR SDK. +![Energy Bill sample](https://github.com/mindee/client-lib-test-data/blob/main/products/energy_bill_fra/default_sample.pdf?raw=true) # Quick-Start ```js diff --git a/docs/expense_receipts_v5.md b/docs/expense_receipts_v5.md index c20c4eaf..bc3f64f0 100644 --- a/docs/expense_receipts_v5.md +++ b/docs/expense_receipts_v5.md @@ -34,6 +34,32 @@ apiResponse.then((resp) => { }); ``` +You can also call this product asynchronously: + +```js +const mindee = require("mindee"); +// for TS or modules: +// import * as mindee from "mindee"; + +// Init a new client +const mindeeClient = new mindee.Client({ apiKey: "my-api-key" }); + +// Load a file from disk +const inputSource = mindeeClient.docFromPath("/path/to/the/file.ext"); + +// Parse the file +const apiResponse = mindeeClient.enqueueAndParse( + mindee.product.ReceiptV5, + inputSource +); + +// Handle the response Promise +apiResponse.then((resp) => { + // print a string summary + console.log(resp.document.toString()); +}); +``` + **Output (RST):** ```rst ######## @@ -51,7 +77,7 @@ Prediction ========== :Expense Locale: en-GB; en; GB; GBP; :Purchase Category: food -:Purchase Subcategory: +:Purchase Subcategory: restaurant :Document Type: EXPENSE RECEIPT :Purchase Date: 2016-02-26 :Purchase Time: 15:20 @@ -85,7 +111,7 @@ Page 0 ------ :Expense Locale: en-GB; en; GB; GBP; :Purchase Category: food -:Purchase Subcategory: +:Purchase Subcategory: restaurant :Document Type: EXPENSE RECEIPT :Purchase Date: 2016-02-26 :Purchase Time: 15:20 diff --git a/docs/financial_document_v1.md b/docs/financial_document_v1.md index eaa62a1e..f9397150 100644 --- a/docs/financial_document_v1.md +++ b/docs/financial_document_v1.md @@ -65,23 +65,25 @@ apiResponse.then((resp) => { ######## Document ######## -:Mindee ID: 3859a462-e05f-4f4c-a736-febca66b9aa9 +:Mindee ID: 340ee4ae-b4da-41f0-b5ea-81ae29852b57 :Filename: default_sample.jpg Inference ######### -:Product: mindee/financial_document v1.9 +:Product: mindee/financial_document v1.10 :Rotation applied: Yes Prediction ========== :Locale: en; en; USD; :Invoice Number: INT-001 +:Purchase Order Number: 2412/2019 :Receipt Number: :Document Number: INT-001 :Reference Numbers: 2412/2019 :Purchase Date: 2019-11-02 :Due Date: 2019-02-26 +:Payment Date: 2019-02-26 :Total Net: 195.00 :Total Amount: 204.75 :Taxes: @@ -127,11 +129,13 @@ Page 0 ------ :Locale: en; en; USD; :Invoice Number: INT-001 +:Purchase Order Number: 2412/2019 :Receipt Number: :Document Number: INT-001 :Reference Numbers: 2412/2019 :Purchase Date: 2019-11-02 :Due Date: 2019-02-26 +:Payment Date: 2019-02-26 :Total Net: 195.00 :Total Amount: 204.75 :Taxes: diff --git a/docs/invoices_v4.md b/docs/invoices_v4.md index 95d0bc1f..fbb1f8bc 100644 --- a/docs/invoices_v4.md +++ b/docs/invoices_v4.md @@ -65,21 +65,23 @@ apiResponse.then((resp) => { ######## Document ######## -:Mindee ID: 372d9d08-59d8-4e1c-9622-06648c1c238b +:Mindee ID: 651b6417-bc50-496e-aa81-207219f0b9f4 :Filename: default_sample.jpg Inference ######### -:Product: mindee/invoices v4.7 +:Product: mindee/invoices v4.8 :Rotation applied: Yes Prediction ========== :Locale: en; en; CAD; :Invoice Number: 14 +:Purchase Order Number: AD29094 :Reference Numbers: AD29094 :Purchase Date: 2018-09-25 :Due Date: +:Payment Date: :Total Net: 2145.00 :Total Amount: 2608.20 :Total Tax: 193.20 @@ -95,7 +97,7 @@ Prediction :Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7 :Supplier Phone Number: 4165551212 :Supplier Website: -:Supplier Email: ldoi@example.com +:Supplier Email: j_coi@example.com :Customer Name: JIRO DOI :Customer Company Registrations: :Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada @@ -121,9 +123,11 @@ Page 0 ------ :Locale: en; en; CAD; :Invoice Number: 14 +:Purchase Order Number: AD29094 :Reference Numbers: AD29094 :Purchase Date: 2018-09-25 :Due Date: +:Payment Date: :Total Net: 2145.00 :Total Amount: 2608.20 :Total Tax: 193.20 @@ -139,7 +143,7 @@ Page 0 :Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7 :Supplier Phone Number: 4165551212 :Supplier Website: -:Supplier Email: ldoi@example.com +:Supplier Email: j_coi@example.com :Customer Name: JIRO DOI :Customer Company Registrations: :Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada