Document Collections
Upload files to existing collection
Changed onThe endpoint uploads additional files to an existing collection. Documents are provided as base64-encoded content in JSON format. Each uploaded file is automatically validated and queued for AI-powered categorization.
post/v1/documents/collections/{collection_id}/upload/
Request
- Base URLhttps://prod.truv.com
- URLhttps://prod.truv.com/v1/documents/collections/{collection_id}/upload/
- AuthAPI key in header X-Access-Client-Id and API key in header X-Access-Secret
Request body
Example request
{
"documents": [
{
"filename": "paystub.pdf",
"mime_type": "application/pdf",
"content": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwo...",
"user_id": "a1b2c3d4e5f6478899aabbccddeeff00",
"external_user_id": "ext_user_789"
}
]
}Response
Example response
{
"collection_id": "a1b2c3d4e5f6478899aabbccddeeff00",
"uploaded_files": [
{
"file_id": "f1234567890abcdef1234567890abcde",
"filename": "paystub.pdf",
"mime_type": "application/pdf",
"validations": {
"is_viable_size": true,
"is_supported_type": true,
"is_accessible": true,
"is_valid": true,
"is_readable": true,
"is_unique": true
},
"status": "validated",
"user_id": "a1b2c3d4e5f6478899aabbccddeeff00",
"external_user_id": "ext_user_789"
}
],
"documents": [
{
"document_id": "d0c1234567890abcdef1234567890abc",
"file_id": "f1234567890abcdef1234567890abcde",
"document_type": "PAYSTUB",
"status": "successful",
"first_name": "John",
"last_name": "Doe",
"user_id": "a1b2c3d4e5f6478899aabbccddeeff00",
"external_user_id": "ext_user_789",
"start_page": 1,
"end_page": 2
}
],
"users": [
{
"id": "a1b2c3d4e5f6478899aabbccddeeff00",
"external_user_id": "ext_user_789",
"first_name": "John",
"last_name": "Doe"
}
]
}Changes
- warning
added the new
PCS_ORDERSenum value to the//response property for the response status
- warning
- warning
added the new
F1099_Benum value to the//response property for the response status - warning
added the new
F1099_Kenum value to the//response property for the response status
- warning