const leadId = '4ef30123-90c2-4dc0-bd28-b43eee8664ea';
const options = {
method: 'GET',
headers: {
'x-api-key': '<your-api-key>',
},
};
fetch(`https://api-v2.getomni.ai/api/v1/leads/${leadId}/documents`, options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
import requests
lead_id = '4ef30123-90c2-4dc0-bd28-b43eee8664ea'
url = f"https://api-v2.getomni.ai/api/v1/leads/{lead_id}/documents"
headers = {
"x-api-key": "<your-api-key>"
}
response = requests.request("GET", url, headers=headers)
print(response.json())
curl --request GET \
--url https://api-v2.getomni.ai/api/v1/leads/4ef30123-90c2-4dc0-bd28-b43eee8664ea/documents \
--header 'x-api-key: <your-api-key>'
[
{
"id": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
"filename": "vital-checking-june-25.pdf",
"mimeType": "application/pdf",
"size": 153143,
"metadata": {
"extractionStatus": "completed",
"Matched checklist items": [
{
"leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
"label": "Bank Statements"
}
]
},
"signedUrl": "https://omniai-server-v2-prod.s3.us-east-2.amazonaws.com/...",
"leadChecklistItemDocument": [
{
"id": "0e66ab12-af87-4dbc-956a-2063b4ecb552",
"leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
"documentId": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
"overallValid": true,
"validationResult": {
"otherNotes": "",
"overallValid": true,
"validationResults": [
{
"isValid": true,
"ruleName": "Files must be business bank statements",
"isValidReason": "The document is a business bank statement..."
}
]
}
}
]
}
]
Leads
Get Lead Documents
Fetch all documents associated with a specific lead
GET
/
api
/
v1
/
leads
/
{leadId}
/
documents
const leadId = '4ef30123-90c2-4dc0-bd28-b43eee8664ea';
const options = {
method: 'GET',
headers: {
'x-api-key': '<your-api-key>',
},
};
fetch(`https://api-v2.getomni.ai/api/v1/leads/${leadId}/documents`, options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
import requests
lead_id = '4ef30123-90c2-4dc0-bd28-b43eee8664ea'
url = f"https://api-v2.getomni.ai/api/v1/leads/{lead_id}/documents"
headers = {
"x-api-key": "<your-api-key>"
}
response = requests.request("GET", url, headers=headers)
print(response.json())
curl --request GET \
--url https://api-v2.getomni.ai/api/v1/leads/4ef30123-90c2-4dc0-bd28-b43eee8664ea/documents \
--header 'x-api-key: <your-api-key>'
[
{
"id": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
"filename": "vital-checking-june-25.pdf",
"mimeType": "application/pdf",
"size": 153143,
"metadata": {
"extractionStatus": "completed",
"Matched checklist items": [
{
"leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
"label": "Bank Statements"
}
]
},
"signedUrl": "https://omniai-server-v2-prod.s3.us-east-2.amazonaws.com/...",
"leadChecklistItemDocument": [
{
"id": "0e66ab12-af87-4dbc-956a-2063b4ecb552",
"leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
"documentId": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
"overallValid": true,
"validationResult": {
"otherNotes": "",
"overallValid": true,
"validationResults": [
{
"isValid": true,
"ruleName": "Files must be business bank statements",
"isValidReason": "The document is a business bank statement..."
}
]
}
}
]
}
]
This endpoint fetches all documents associated with a specific lead.
Path Parameters
string
required
The unique identifier of the lead
Response
array
Array of document objects
Show documents
Show documents
string
Unique identifier for the document
string
Original filename of the document
string
MIME type of the document (e.g., “application/pdf”, “image/jpeg”)
number
File size in bytes
string
Pre-signed URL for accessing the document (expires after 1 hour)
object
array
Array of checklist item document associations with validation results
Show leadChecklistItemDocument
Show leadChecklistItemDocument
string
Unique identifier for the checklist item document association
string
ID of the checklist item this document is associated with
string
ID of the document
boolean
Whether the document passed overall validation
object
Detailed validation result for the document
Show validationResult
Show validationResult
string
Additional notes about the validation
boolean
Whether the document passed overall validation
Signed URLs expire after 1 hour. Use Get Document API
to get a fresh signed URL.
const leadId = '4ef30123-90c2-4dc0-bd28-b43eee8664ea';
const options = {
method: 'GET',
headers: {
'x-api-key': '<your-api-key>',
},
};
fetch(`https://api-v2.getomni.ai/api/v1/leads/${leadId}/documents`, options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
import requests
lead_id = '4ef30123-90c2-4dc0-bd28-b43eee8664ea'
url = f"https://api-v2.getomni.ai/api/v1/leads/{lead_id}/documents"
headers = {
"x-api-key": "<your-api-key>"
}
response = requests.request("GET", url, headers=headers)
print(response.json())
curl --request GET \
--url https://api-v2.getomni.ai/api/v1/leads/4ef30123-90c2-4dc0-bd28-b43eee8664ea/documents \
--header 'x-api-key: <your-api-key>'
[
{
"id": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
"filename": "vital-checking-june-25.pdf",
"mimeType": "application/pdf",
"size": 153143,
"metadata": {
"extractionStatus": "completed",
"Matched checklist items": [
{
"leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
"label": "Bank Statements"
}
]
},
"signedUrl": "https://omniai-server-v2-prod.s3.us-east-2.amazonaws.com/...",
"leadChecklistItemDocument": [
{
"id": "0e66ab12-af87-4dbc-956a-2063b4ecb552",
"leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
"documentId": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
"overallValid": true,
"validationResult": {
"otherNotes": "",
"overallValid": true,
"validationResults": [
{
"isValid": true,
"ruleName": "Files must be business bank statements",
"isValidReason": "The document is a business bank statement..."
}
]
}
}
]
}
]
⌘I