entity_type and entity_id filter on the document's links. entity_id is appliedlimit if you expect sparse matches.curl --location 'https://api.gigstack.io/v2/documents?limit=undefined&cursor=undefined&document_type=undefined&compliance_status=undefined&entity_type=undefined&entity_id=undefined' \
--header 'Authorization: <api-key>'{
"success": true,
"data": {
"data": [
{
"id": "doc_1234567890",
"document_type": "contract",
"name": "Contrato de servicios 2026 — Cliente ACME",
"description": "string",
"file_url": "https://storage.googleapis.com/gigstack-docs/team_123/contrato-acme.pdf",
"file_name": "contrato-acme.pdf",
"file_size": 284913,
"mime_type": "application/pdf",
"linked_entities": [
{
"entity_type": "invoice",
"entity_id": "client_1234567890",
"linked_at": 1767225600000
}
],
"compliance_status": "pending_review",
"compliance_notes": "string",
"valid_from": 1767225600000,
"valid_until": 1798761600000,
"ai_extraction": {
"extracted_at": 1767225600000,
"model": "gemini-2.5-flash",
"confidence": 0.92,
"extracted_data": {
"property1": "string",
"property2": "string"
}
},
"tags": [
"contrato",
"acme"
],
"metadata": {
"property1": "string",
"property2": "string"
},
"created_at": 1767225600000,
"created_by": "user_1234567890",
"updated_at": 1767225600000,
"livemode": true
}
],
"has_more": false,
"next_cursor": "doc_1234567890"
},
"message": "Operation completed successfully",
"timestamp": 1767225600000
}