Watch how we transform a rental application PDF into a working API endpoint with AI-powered field mapping that accepts human-readable JSON data and returns completed forms.
This is the JSON data we'll send to our API endpoint
{ "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "phone": "555-123-4567", "moveInDate": "2024-02-15", "monthlyIncome": 5000, "hasPets": true, "emergencyContact": "Jane Doe", "emergencyPhone": "555-987-6543" }
The API returns a completed PDF ready for download
Click "Run Demo" to generate a PDF
Here's how you can integrate PDF generation into your applications:
// JavaScript Example
const response = await fetch('https://docuapi.io/api/submit/rental-app-demo', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'pk_your_api_key_here'
},
body: JSON.stringify({
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "555-123-4567",
"moveInDate": "2024-02-15",
"monthlyIncome": 5000,
"hasPets": true,
"emergencyContact": "Jane Doe",
"emergencyPhone": "555-987-6543"
})
});
const pdfBlob = await response.blob();
const pdfUrl = URL.createObjectURL(pdfBlob);
window.open(pdfUrl); // Opens filled PDF
curl -X POST 'https://docuapi.io/api/submit/rental-app-demo' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: pk_your_api_key_here' \
-d '{
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "555-123-4567",
"moveInDate": "2024-02-15",
"monthlyIncome": 5000,
"hasPets": true,
"emergencyContact": "Jane Doe",
"emergencyPhone": "555-987-6543"
}' \
--output filled-form.pdf
import requests
import json
url = 'https://docuapi.io/api/submit/rental-app-demo'
headers = {
'Content-Type': 'application/json',
'X-API-Key': 'pk_your_api_key_here'
}
data = {
'firstName': 'John',
'lastName': 'Doe',
'email': 'john.doe@example.com',
'phone': '555-123-4567',
'moveInDate': '2024-02-15',
'monthlyIncome': 5000,
'hasPets': true,
'emergencyContact': 'Jane Doe',
'emergencyPhone': '555-987-6543'
}
response = requests.post(url, headers=headers, json=data)
with open('filled-form.pdf', 'wb') as f:
f.write(response.content)
Upload a PDF and get human-readable field names automatically generated by AI.
REST API that works with any programming language or platform.
Scalable infrastructure with authentication and monitoring built-in.