Mindee API Helper Library for Node.js
Quickly and easily connect to Mindee's API services using Node.js.
Quick Start
Here's the TL;DR of getting started.
First, get an API Key
Then, install this library:
npm install mindee
Finally, Node.js away!
Loading a File and Parsing It
Global Documents
const mindee = require("mindee");
const mindeeClient = new mindee.Client({ apiKey: "my-api-key" });
const apiResponse = mindeeClient
.docFromPath("/path/to/the/file.ext")
.parse(mindee.InvoiceV4);
Region-Specific Documents
const mindee = require("mindee");
const mindeeClient = new mindee.Client({ apiKey: "my-api-key" });
const apiResponse = mindeeClient
.docFromPath("/path/to/the/file.ext")
.parse(mindee.fr.IdCardV1);
Custom Documents (API Builder)
const mindee = require("mindee");
const mindeeClient = new mindee.Client({ apiKey: "my-api-key" })
.addEndpoint({
accountName: "john",
endpointName: "wsnine",
});
const apiResponse = mindeeClient
.docFromPath("/path/to/the/file.ext")
.parse(mindee.CustomV1, { endpointName: "wsnine" });
Handling the Return
apiResponse.then((resp) => {
if (resp.document === undefined) return;
console.log(resp.document);
console.log(resp.document.toString());
});
Further Reading
There's more to it than that for those that need more features, or want to
customize the experience.
All the juicy details are described in the
Official Guide.
License
Copyright © Mindee
Available as open source under the terms of the MIT License.