Webhook Integration

Receive real-time notifications when your document processing is complete. Configure webhooks to automatically receive extracted data in your application.

Overview

The platform processes uploaded images and PDF files asynchronously. Instead of waiting for processing to finish, users submit a job request and receive the final result automatically through a configured webhook URL.

Key Benefits

  • ✓ Real-time result delivery via webhook
  • ✓ No need for API polling - results are pushed to you
  • ✓ Automated integration with your system
  • ✓ Fast, non-blocking job submission
  • ✓ Supports images and multi-page PDFs

How It Works

1. Configure Your Webhook

Configure a webhook URL from the frontend dashboard for your template. This URL is saved with the template and will be used to deliver processing results. You can also set custom headers for authentication.

2. Submit a Processing Job

Submit a job using the POST /process-job API with:

  • template_id - UUID of the template to use
  • actual_image - Image or PDF (base64 or file upload)

The system creates a unique job_id and queues the job with status NEW.

3. Background Processing

The uploaded file is stored securely in S3 and queued for processing. During this time the job status is updated to PROCESSING. Credits are deducted based on the document type (1 credit per page for multi-page PDFs).

4. Webhook Result Delivery

Once processing is completed, a POST request is sent to your configured webhook URL with the extracted data in JSON format. The file is automatically deleted from storage after successful delivery.

API Reference

POST /process-job

Submit a document for asynchronous processing with webhook delivery.

Authentication

Requires API key in the x-auth header.

JSON Body

{
  "template_id": "550e8400-e29b-41d4-a716-446655440000",
  "actual_image": "<base64-encoded-image-or-pdf>"
}

Multipart Form Data

template_id: 550e8400-e29b-41d4-a716-446655440000
actual_image: [file upload]

Response (202 Accepted)

{
  "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "template_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "queued",
  "webhook_url": "https://your-app.com/webhook"
}

GET /job-status

Check the current status of a processing job.

{
  "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "template_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "PROCESSING"
}
Possible Status Values:

NEW • PROCESSING • SUCCESS • FAILED

Webhook Payload

Success Payload

{
 "job_id": job_id,
 "template_id": template_id,
 "status": "SUCCESS",
 "success": true,
 "message": "Document processed successfully",
 "results": {
   "document_data": result
 }
}

Security & Reliability

  • 🔒 API authentication required for job submission
  • 🔒 Webhook URLs and headers stored securely
  • 🔒 Automatic retry mechanism for failed webhooks
  • 🔒 Files automatically deleted after processing
  • 🔒 Designed for high-scale workloads