curl -X POST https://api.iterationlayer.com/document-extraction/v1/extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"files": [
{
"type": "url",
"name": "rental-application.pdf",
"url": "https://example.com/applications/rental-application.pdf"
}
],
"schema": {
"fields": [
{ "name": "applicant_name", "type": "TEXT", "description": "Full name of the applicant" },
{ "name": "current_address", "type": "ADDRESS", "description": "Applicant current address" },
{ "name": "employer", "type": "TEXT", "description": "Current employer name" },
{ "name": "monthly_income", "type": "CURRENCY_AMOUNT", "description": "Gross monthly income" },
{ "name": "move_in_date", "type": "DATE", "description": "Requested move-in date" },
{ "name": "previous_landlord", "type": "TEXT", "description": "Previous landlord name and contact" }
]
}
}'
import { IterationLayer } from "iterationlayer";
const client = new IterationLayer({ apiKey: "YOUR_API_KEY" });
const result = await client.extract({
files: [
{
type: "url",
name: "rental-application.pdf",
url: "https://example.com/applications/rental-application.pdf",
},
],
schema: {
fields: [
{ name: "applicant_name", type: "TEXT", description: "Full name of the applicant" },
{ name: "current_address", type: "ADDRESS", description: "Applicant current address" },
{ name: "employer", type: "TEXT", description: "Current employer name" },
{ name: "monthly_income", type: "CURRENCY_AMOUNT", description: "Gross monthly income" },
{ name: "move_in_date", type: "DATE", description: "Requested move-in date" },
{ name: "previous_landlord", type: "TEXT", description: "Previous landlord name and contact" },
],
},
});
console.log(result);
from iterationlayer import IterationLayer
client = IterationLayer(api_key="YOUR_API_KEY")
result = client.extract(
files=[
{
"type": "url",
"name": "rental-application.pdf",
"url": "https://example.com/applications/rental-application.pdf",
}
],
schema={
"fields": [
{"name": "applicant_name", "type": "TEXT", "description": "Full name of the applicant"},
{"name": "current_address", "type": "ADDRESS", "description": "Applicant current address"},
{"name": "employer", "type": "TEXT", "description": "Current employer name"},
{"name": "monthly_income", "type": "CURRENCY_AMOUNT", "description": "Gross monthly income"},
{"name": "move_in_date", "type": "DATE", "description": "Requested move-in date"},
{"name": "previous_landlord", "type": "TEXT", "description": "Previous landlord name and contact"},
]
},
)
print(result)
package main
import (
"fmt"
il "github.com/iterationlayer/sdk-go"
)
func main() {
client := il.NewClient("YOUR_API_KEY")
result, err := client.Extract(il.ExtractRequest{
Files: []il.FileInput{
il.NewFileFromURL("rental-application.pdf", "https://example.com/applications/rental-application.pdf"),
},
Schema: il.ExtractionSchema{
"applicant_name": il.NewTextFieldConfig("applicant_name", "Full name of the applicant"),
"current_address": il.NewAddressFieldConfig("current_address", "Applicant current address"),
"employer": il.NewTextFieldConfig("employer", "Current employer name"),
"monthly_income": il.NewCurrencyAmountFieldConfig("monthly_income", "Gross monthly income"),
"move_in_date": il.NewDateFieldConfig("move_in_date", "Requested move-in date"),
"previous_landlord": il.NewTextFieldConfig("previous_landlord", "Previous landlord name and contact"),
},
})
if err != nil {
panic(err)
}
fmt.Println(result)
}