RLS Document Extraction API - Quick Start Guide
Overview
The RLS Document Extraction API is a specialized REST API designed for the construction lending industry. It accepts ANY document type (PDF, JPEG, PNG) and uses AI to automatically identify and classify documents, with particular focus on Statement of Repair (SOR) and Insurance Certificate processing.
Getting Started
1. API Key Authentication
All requests require a valid API key in the Authorization header. You can obtain your API key by logging into the dashboard and navigating to the "API Keys" section.
Authorization: Bearer dk_live_your_api_key_here
2. Base URL
Production: https://api.extractable.xyz
Core Endpoints
Submit Document for Processing
POST /api/rls/extract
Content-Type: multipart/form-data
Authorization: Bearer dk_live_your_api_key_here
file: document.pdf
webhookUrl: https://your-domain.com/webhook (optional)
metadata: {"clientId": "12345"} (optional)
Response (202 Accepted):
{
"service": "RLS Document Extraction API",
"jobId": "123e4567-e89b-12d3-a456-426614174000",
"status": "pending",
"pollingUrl": "https://api.extractable.xyz/api/rls/extract/123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2024-01-01T00:00:00Z",
"message": "Document submitted for processing. RLS specialized extraction pipeline initiated."
}
Check Processing Status
GET /api/rls/extract/{jobId}
Authorization: Bearer dk_live_your_api_key_here
Response (200 OK):
{
"service": "RLS Document Extraction API",
"jobId": "123e4567-e89b-12d3-a456-426614174000",
"status": "completed",
"fileName": "sor_document.pdf",
"fileType": "pdf",
"documentType": "sor",
"classificationConfidence": 0.95,
"progress": 100,
"extractedData": {
"documentMetadata": {
"consultant": "ABC Construction Consulting",
"propertyAddress": "123 Main St, Anytown, ST 12345",
"borrowerName": "John Doe",
"lenderName": "First National Bank"
},
"constructionSections": [
{
"sectionName": "1.0 GENERAL CONDITIONS",
"lineItems": [
{
"description": "Permits and inspections",
"quantity": 1,
"unit": "LS",
"materialCost": 500.00,
"laborCost": 0.00,
"totalCost": 500.00
}
]
}
],
"recapSummary": {
"subtotal": 45000.00,
"generalConditions": 4500.00,
"overheadAndProfit": 7425.00,
"grandTotal": 56925.00
}
},
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:45Z",
"completedAt": "2024-01-01T00:00:45Z"
}
List Supported Document Types
GET /api/rls/types
Response (200 OK):
{
"service": "RLS Document Extraction API",
"version": "2.0",
"description": "Specialized document processing for Statement of Repairs (SOR) and Insurance Certificates",
"company": "RLS",
"supportedTypes": [
{
"typeCode": "sor",
"displayName": "Statement of Repair",
"description": "HUD 203(k) Statement of Repair documents",
"confidenceThreshold": 0.85,
"extractionSupported": true,
"rlsSpecific": "Extracts consultant details, property information, repair sections, and cost breakdowns"
},
{
"typeCode": "insurance_cert",
"displayName": "Insurance Certificate",
"description": "ACORD Insurance Certificate forms",
"confidenceThreshold": 0.80,
"extractionSupported": true,
"rlsSpecific": "Processes ACORD forms and extracts coverage details, policy information, and certificate holders"
}
],
"capabilities": [
"AI-powered document classification",
"Structured data extraction",
"Webhook notifications",
"Secure file processing"
]
}
RLS-Specific Features
Statement of Repair (SOR) Processing
- Specialized Recognition: Identifies HUD 203(k) SOR documents with high accuracy
- Detailed Extraction: Extracts consultant info, property details, construction sections, and cost breakdowns
- Construction Scope Analysis: Parses detailed line items by section (1.0-8.0)
- Financial Calculations: Captures material/labor costs, subtotals, and grand totals
Insurance Certificate Processing
- ACORD Form Support: Recognizes various ACORD certificate formats
- Compliance Focus: Extracts key information required for construction lending
- Coverage Details: Identifies policy numbers, dates, limits, and additional insured status
- Certificate Holder Verification: Ensures proper certificate holder information
Error Handling
Common Error Responses
401 Unauthorized:
{
"error": "unauthorized",
"message": "Invalid or missing API key"
}
400 Bad Request:
{
"error": "invalid_request",
"message": "No file provided"
}
413 File Too Large:
{
"error": "file_too_large",
"message": "File size exceeds limit of 50MB for PDF files"
}
429 Rate Limited:
{
"error": "rate_limit_exceeded",
"message": "Too many requests. Please try again later."
}
Testing
cURL Examples
Submit a document:
curl -X POST https://api.extractable.xyz/api/rls/extract \
-H "Authorization: Bearer dk_live_your_api_key_here" \
-F "file=@statement_of_repair.pdf" \
-F 'metadata={"clientId": "CLIENT123", "loanNumber": "LN456789"}'
Check status:
curl https://api.extractable.xyz/api/rls/extract/123e4567-e89b-12d3-a456-426614174000 \
-H "Authorization: Bearer dk_live_your_api_key_here"
List document types:
curl https://api.extractable.xyz/api/rls/types
Integration Notes
Webhook Configuration
When providing a webhook URL, ensure your endpoint can handle POST requests with the following payload structure:
{
"jobId": "123e4567-e89b-12d3-a456-426614174000",
"status": "completed",
"documentType": "sor",
"confidence": 0.95,
"extractedData": { ... },
"metadata": { ... }
}
Rate Limits
- Per API Key: 10 requests per minute
- Contact support for higher limits
Support
For technical support or questions about the RLS Document Extraction API:
- Documentation: Full API documentation available at
/docs/api/ - Status Page: Check system status and maintenance windows
Next Steps
- Get your API key: Contact your RLS representative
- Review the full API documentation: See
/docs/api-swagger.yaml - Test with sample documents: Use the provided cURL examples
- Set up webhooks: Configure your endpoint to receive results
- Monitor usage: Track API usage through the dashboard
File Requirements
Supported Formats
- PDF: Up to 5MB
- JPEG/JPG: Up to 5MB
- PNG: Up to 5MB