API Documentation


1. Create a New Job

POST https://doc2data.io/api/jobs

URL Query Parameters

Parameter Description Required Sample
api_key The API Key for the account Yes Your API key
processor_id The Processor ID to use Yes Create processor first

Body Parameters

Parameter Description Required Sample
input_file The PDF file to process Yes A file to upload

Sample

Request

POST https://doc2data.io/api/jobs?api_key=<Your API key>&processor_id=12
{
  "input_file": "efs_statement_2024_10_12.pdf"
}

Response

{
  "id": 14, 
  "status": "new"
}

2. Check Job Results

GET https://doc2data.io/api/jobs/:job_id

URL Route Parameters

Parameter Description Required Sample
job_id The Job ID to retrieve Yes Received during job creation process

URL Query Parameters

Parameter Description Required Sample
api_key The API Key for the account Yes Your API key

Sample

Request

GET https://doc2data.io/api/jobs/5?api_key=<Your API key>
{}

Response

{
  "id": 14, 
  "status": "completed",
  "output": "{\"Date\":\"08/29/24\",\"Order\":\"WA489498\"}"
}

3. Available Templates

AI (Any Document)

This processor can extract information from any kind of document using AI.
To use this, follow these steps through the web interface:

  • Create AI processor
  • Specify the fields you want to extract from the document
  • For each field, specify the key in the JSON object
  • Define the type it has
  • Apply a post-processor for correct formatting
  • Specify if it is a sub-field of another field

EFS Statement

FleetOne Holdings

Description

e-Statement for fuel costs from FleetOne

W4 Form

Department of the Treasury Internal Revenue Service

Description

Employee Withholding Certificate form W4

RBC Statement

Royal Bank of Canada

Description

e-Statement from Royal Bank of Canada

AWS Invoice

Amazon Web Services

Description

Invoice for Amazon Web Services

AWS Statement

Amazon Web Services

Description

Monthly e-Statement for Amazon Web Services

Adobe Cloud Invoice

Adobe

Description

Invoice for Adobe Cloud services

Google Cloud Platform Invoice

Google Cloud Platform

Description

Invoice for Google Cloud Platform services

Read more about templates