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
{ "commodity": "Chilled food", "delivery_addresses": [ { "pallets": null, "pieces": 1, "delivery_to_company": "FEDEX-MIDCT", "delivery_date_and_time": "01/30/2023 14:00", "delivery_address": "49 Fedex Dr #49, Middletown, CT 06457" } ], "id_number": "0405727", "pick_up_addresses": [ { "pick_up_from_company": "FACTOR CASTELLINI (KY)", "pick_up_date_and_time": "01/28/2023 13:00", "pick_up_address": "2 Plum St, Wilder, KY 41076" } ], "rate": 3000, "special_instructions": [ "Special instructions here" ], "broker": "AIT Truckload Solutions", "weight": 30000, "temperature": null, "pick_up_order_numbers": [ "CR W05.23SA_KY_FEDEX-MIDCT4", "TN 186533416" ], "delivery_order_numbers": [ "CR W05.23SA_KY_FEDEX-MIDCT4" ], "broker`s address": "PO Box 775379, Chicago, IL 60677-5379" }
EFS Statement Processor
This processor extracts detailed information from EFS Statement documents, including addresses, dates, account summaries, and statement details.
{ "fleetone_address": "FleetOne Holdings, LLC, PO Box 630038, Cincinnati, OH 45263-0038", "own_address": "ACR LOGISTICS LLC, 460 ZION ROAD, EGG HARBOR TOWNSHIP, NJ 08234", "statement_date": "2024-10-28", "statement_period": { "start": "2024-10-22", "end": "2024-10-28" }, "customer_number": "3770002302389", "statement_number": "80722385", "voice_number": null, "fax": null, "email": "[email protected]", "account_summary": { "overall_credit_limit": 4200, "credit_deposit": 0 }, "payment_summary": { "payment": -1318.71, "total": -1318.71 }, "balance_summary": { "beginning_balance": 1318.71, "payment_total": -1318.71, "balance_after_payments": 0, "statement_total": 242.31, "ending_account_balance": 242.31, "past_due_balance": 0 }, "statement_activity": { "diesel": 205.81, "def": 36.5, "statement_total": 242.31 }, "statement_due_date": "2024-10-30", "fuel_transaction_summary": { "Diesel": { "count": 1, "total_volume": 57.9, "gross_ppu": 3.97, "sub_total": 230.4, "discount_amount": 24.59, "net_ppu": 3.55, "total_amount": 205.81 }, "DEF": { "count": 1, "total_volume": 9, "gross_ppu": 4, "sub_total": 36, "discount_amount": 0, "net_ppu": 4.05, "total_amount": 36.5 } }, "statement_details": [ { "date": "2024-10-22", "category": "Beginning Balance 10/22/24", "total_amount": 1318.71 }, { "date": "2024-10-22", "category": "PMT", "description": "Payment Receipt", "total_amount": -1318.71 }, { "date": "2024-10-28", "category": "Diesel", "description": "ULTRA LOW SULFUR DIESEL", "quantity": 57.9, "total_amount": 205.81 }, { "date": "2024-10-28", "category": "DEF", "description": "DIESEL EXHAUST FLUID UREA", "quantity": 8, "total_amount": 36.5 }, { "date": "2024-10-28", "category": "Ending Balance 10/28/24", "total_amount": 242.31 } ] }