This example demonstrates how to import batch records using the QbDVision REST API with Node.js.
- Node.js 20.x or higher
- A QbDVision API key
- Install the dependencies
npm install- Edit
import_batch_records.jsand replaceYOUR_API_KEYwith your QbDVision API key. - Modify
BASE_URLto point to your QbDVision environment if you're not using Sandbox. - Create a directory called
./batchRecordDocsand place the batch record documents you want to import in this directory.
mkdir batchRecordDocs
cp /path/to/your/batch/record/files/* ./batchRecordDocs- Edit
batchRecordDocsToProcessIds.jsonto map the batch record documents to the (existing) process IDs in QbDVision.
{
"batch_record_1.pdf": 1,
"batch_record_2.pdf": 42
}- Run the script
node import_batch_records.js- Use environment variables for API keys
- Implement proper error handling and retries
- Add logging/reporting according to your company's standards
- Use the latest versions of all libraries