{"componentChunkName":"component---src-templates-redoc-operation-js","path":"/openapi/docmanager-reference/v2.0/","result":{"data":{"contentItem":{"type":"redoc-info","link":"/openapi/docmanager-reference/v2.0/","data":{"redocStoreStr":"{\"menu\":{\"activeItemIdx\":-1},\"definition\":{\"data\":{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Index Document API\",\"description\":\"Document Management and Search Service with OpenSearch Integration.\\n\\nThis API provides intelligent document indexing, advanced search capabilities,\\nand secure file management within the DANAConnect platform.\\n\\n**Key Features:**\\n- Document indexing with metadata enrichment\\n- Advanced full-text search with filtering\\n- Secure document storage and retrieval\\n- URL shortening for secure document sharing\\n\",\"contact\":{\"name\":\"DANAConnect Team\",\"email\":\"support@danaconnect.com\"},\"license\":{\"name\":\"Proprietary\",\"url\":\"https://www.danaconnect.com\"},\"version\":\"2.0\"},\"servers\":[{\"url\":\"https://indexdocument.danaconnect.com\",\"description\":\"Production\"}],\"tags\":[{\"name\":\"Document Management API V2.0\",\"description\":\"Operations for indexing, searching, and managing documents\"},{\"name\":\"Document Management API V2.0\",\"description\":\"Advanced Document Management and Search Service with OpenSearch Integration.\\n\\nThis enhanced version provides intelligent document indexing, advanced search capabilities,\\nand secure file management within a scalable architecture. Leveraging OpenSearch for\\nhigh-performance indexing and retrieval, it enables sophisticated document operations\\nwhile maintaining enterprise-grade security and auditability.\\n\\nKey capabilities include:\\n- Intelligent document indexing and metadata enrichment\\n- Advanced full-text search with filtering and faceting\\n- Secure document storage and retrieval with access control\\n- Automated compression and packaging of document collections\\n- URL shortening for secure document sharing\\n- Comprehensive audit logging and download tracking\\n- Seamless integration with DANAConnect conversation flows\"}],\"paths\":{\"/document/2.0/search\":{\"post\":{\"tags\":[\"Document Management API V2.0\"],\"summary\":\"Search Documents\",\"description\":\"Advanced document search in OpenSearch with support for:\\n- Filter-based search (key-value) with 'contains' matching\\n- Text search in additionalInfo field\\n- Date ranges (createDate, validUntilDate)\\n- Logical operators AND/OR to combine conditions\\n\\nResults are limited by configuration (index-document.search.limit)\\n\",\"operationId\":\"searchDocuments\",\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/SearchDocumentRequestDTO\"}}},\"required\":true},\"responses\":{\"200\":{\"description\":\"Search completed successfully. The response body contains a business status code:\\n\\n| Code | Description |\\n|------|-------------|\\n| 200  | OK |\\n\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/SearchDocumentResponseDTO\"}}}},\"400\":{\"description\":\"Invalid search request. The response body contains a business error code:\\n\\n| Code | Description |\\n|------|-------------|\\n| 6    | Unknown error |\\n| 14   | Unexpected filter operator |\\n| 65   | No documents match the provided search criteria |\\n\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorMessage\"}}}},\"401\":{\"description\":\"Unauthorized - invalid or missing JWT token\"},\"500\":{\"description\":\"Internal server error during search operation\"}},\"security\":[{\"oauth2\":[]}]}},\"/document/2.0/index_document\":{\"post\":{\"tags\":[\"Document Management API V2.0\"],\"summary\":\"Index Document\",\"description\":\"Indexes one or more documents in OpenSearch and stores them in S3. Returns secure download URLs for each indexed document.\",\"operationId\":\"indexDocument\",\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/RequestIndexDocumentDTO\"}}},\"required\":true},\"responses\":{\"200\":{\"description\":\"Documents indexed successfully. The response body contains a business status code:\\n\\n| Code | Description |\\n|------|-------------|\\n| 0    | OK |\\n| 100  | OK with warning (partial success in non-strict mode) |\\n\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ResponseIndexDocumentDTO\"}}}},\"400\":{\"description\":\"Invalid request. The response body contains a business error code:\\n\\n| Code | Description |\\n|------|-------------|\\n| 3    | Exceeded the maximum number of documents allowed |\\n| 4    | Document not found |\\n| 6    | Unknown error |\\n| 7    | Duplicated URL on document list |\\n| 9    | Exceeded the maximum number of files to be compressed |\\n| 10   | The service configuration is incorrect or not assigned |\\n| 30   | You must include the 'filters' field with at least one configured filter |\\n| 31   | No filters are configured for this document type |\\n| 32   | Each filter must contain a valid 'key' |\\n| 33   | The filter with key is not allowed |\\n| 34   | The document list must not be empty |\\n| 35   | The 'isZip' must not be null |\\n| 37   | The configuration Document Type is incorrect |\\n| 38   | The configuration Document Type is not assigned |\\n| 39   | The configuration Document Type is not enabled |\\n| 40   | Client configuration not found |\\n| 57   | Client configuration version is invalid |\\n| 500  | At the moment, we cannot establish a connection |\\n\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorMessage\"}}}},\"401\":{\"description\":\"Unauthorized - invalid or missing JWT token\"},\"500\":{\"description\":\"Internal server error during document processing\"}},\"security\":[{\"oauth2\":[]}]}}},\"components\":{\"schemas\":{\"FilterSearchDTO\":{\"type\":\"object\",\"properties\":{\"key\":{\"type\":\"string\",\"description\":\"Filter key (normalized lowercase in index)\"},\"value\":{\"type\":\"string\",\"description\":\"Filter value (normalized lowercase in index)\"},\"operator\":{\"type\":\"string\",\"description\":\"Filter operator. Valid values: NONE, EQUAL, CONTAINS, BEGINS_WITH, ENDS_WITH\",\"enum\":[\"NONE\",\"EQUAL\",\"CONTAINS\",\"BEGINS_WITH\",\"ENDS_WITH\"]}}},\"SearchDocumentRequestDTO\":{\"type\":\"object\",\"description\":\"Search criteria including filters, text queries, and date ranges\",\"properties\":{\"filters\":{\"type\":\"array\",\"description\":\"List of filters to search documents by key-value pairs. Supports 'contains' matching on values.\",\"example\":[{\"key\":\"tipo\",\"value\":\"factura\"},{\"key\":\"departamento\",\"value\":\"ventas\"}],\"items\":{\"$ref\":\"#/components/schemas/FilterSearchDTO\"}},\"documentTypeId\":{\"type\":\"integer\",\"format\":\"int64\",\"description\":\"Filter documents by document type ID\"},\"servicesId\":{\"type\":\"integer\",\"format\":\"int64\",\"description\":\"Filter documents by service ID\"},\"operator\":{\"type\":\"string\",\"description\":\"Logical operator to combine search conditions. Valid values: 'AND', 'OR'. Default: 'AND'\",\"enum\":[\"AND\",\"OR\"],\"example\":\"AND\"}}},\"FilterDTO\":{\"type\":\"object\",\"properties\":{\"key\":{\"type\":\"string\",\"description\":\"Filter key (normalized lowercase in index)\"},\"value\":{\"type\":\"string\",\"description\":\"Filter value (normalized lowercase in index)\"}}},\"ResultSearchDocumentDTO\":{\"type\":\"object\",\"properties\":{\"pathS3\":{\"type\":\"string\",\"description\":\"S3 storage path for the document\"},\"url\":{\"type\":\"string\",\"description\":\"Download URL for the document, or null if unavailable\"},\"codeUrl\":{\"type\":\"string\",\"description\":\"Code Hash Download\"},\"isZip\":{\"type\":\"boolean\",\"description\":\"If set to `true`, all found files will be provided as a zip file, otherwise only the individual list download URL is generated\"},\"filters\":{\"type\":\"array\",\"description\":\"Key-value filter pairs associated with the document\",\"items\":{\"$ref\":\"#/components/schemas/FilterDTO\"}},\"createDate\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"Creation date\"},\"validUntilDate\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"Validity end date\"},\"documentTypeId\":{\"type\":\"integer\",\"format\":\"int64\",\"description\":\"Document type identifier\"},\"servicesId\":{\"type\":\"integer\",\"format\":\"int64\",\"description\":\"Services identifier\"},\"configServiceName\":{\"type\":\"string\",\"description\":\"Configuration service name\"}}},\"SearchDocumentResponseDTO\":{\"type\":\"object\",\"description\":\"Response containing search results from OpenSearch\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Response code indicating success or error\",\"example\":200},\"description\":{\"type\":\"string\",\"description\":\"Response description message\",\"example\":\"Search completed successfully\"},\"documentsList\":{\"type\":\"array\",\"description\":\"List of documents found matching the search criteria\",\"items\":{\"$ref\":\"#/components/schemas/ResultSearchDocumentDTO\"}},\"totalHits\":{\"type\":\"integer\",\"format\":\"int64\",\"description\":\"Total number of documents found matching the search criteria\",\"example\":42}}},\"ErrorMessage\":{\"type\":\"object\",\"properties\":{\"description\":{\"type\":\"string\"},\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Error code\",\"example\":400}}},\"DocumentDTO\":{\"type\":\"object\",\"description\":\"Contains the document's repository URL in DANAConnect's platform, where the document is stored\",\"properties\":{\"url\":{\"type\":\"string\"}}},\"RequestIndexDocumentDTO\":{\"type\":\"object\",\"description\":\"Document indexing request containing document metadata and content\",\"properties\":{\"servicesId\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Identifier indicating Document Manager's service configuration type in DANAConnect platform\"},\"isStrict\":{\"type\":\"boolean\",\"description\":\"If set to `true`, the operation runs in strict mode and aborts if any document URL is not found. If `false`, found documents are processed and missing ones are reported in the response.\"},\"isZip\":{\"type\":\"boolean\",\"description\":\"If set to `true`, all found files will be provided as a zip file, otherwise only the individual list download URL is generated\"},\"documentList\":{\"type\":\"array\",\"description\":\"List of documents to be indexed\",\"items\":{\"$ref\":\"#/components/schemas/DocumentDTO\"}},\"filters\":{\"type\":\"array\",\"description\":\"Key-value filter pairs to associate with the indexed documents\",\"items\":{\"$ref\":\"#/components/schemas/FilterDTO\"}},\"additionalInfo\":{\"type\":\"string\",\"description\":\"Additional information to store with the document\"}}},\"ResponseIndexDocumentDTO\":{\"type\":\"object\",\"description\":\"Response containing the indexed document results and download URLs\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"description\":\"Response Code\"},\"description\":{\"type\":\"string\",\"description\":\"Response Description\"},\"documentList\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/ResultIndexDocumentDTO\"}}}},\"ResultIndexDocumentDTO\":{\"type\":\"object\",\"properties\":{\"pathS3\":{\"type\":\"string\",\"description\":\"S3 storage path for the document\"},\"url\":{\"type\":\"string\",\"description\":\"Download URL for the document, or null if unavailable\"},\"objectExist\":{\"type\":\"boolean\"}}}},\"securitySchemes\":{\"oauth2\":{\"type\":\"oauth2\",\"description\":\"OAuth2 Client Credentials flow for machine-to-machine authentication.\\n\\n**How to authenticate:**\\n1. Obtain client credentials (`client_id` and `client_secret`) from your DANAConnect Account Manager\\n2. Request an access token from the token endpoint using the client_credentials grant type\\n3. Include the access token in the `Authorization` header as a Bearer token\\n\\n**Token Endpoints:**\\n- **Production:** `https://auth.danaconnect.com/oauth2/token`\\n\\n**Example token request:**\\n```\\nPOST /oauth2/token\\nContent-Type: application/x-www-form-urlencoded\\n\\ngrant_type=client_credentials\\n&client_id=YOUR_CLIENT_ID\\n&client_secret=YOUR_CLIENT_SECRET\\n&scope=document:access2documentmanager\\n```\\n\\n**Example API request:**\\n```\\nAuthorization: Bearer <access_token>\\n```\\n\\n**Required scope:** `document:access2documentmanager`\\n\",\"flows\":{\"clientCredentials\":{\"tokenUrl\":\"https://auth.danaconnect.com/oauth2/token\",\"scopes\":{\"document:access2documentmanager\":\"Access to Document Management API - allows indexing, searching, and retrieving documents\"}}}}}}}},\"options\":{\"hideTryItPanel\":false,\"pagination\":\"none\",\"corsProxyUrl\":\"https://cors.redoc.ly\",\"generateCodeSamples\":{\"languages\":[{\"lang\":\"JavaScript\",\"label\":\"JS\"},{\"lang\":\"C#\"},{\"lang\":\"Java\"},{\"lang\":\"curl\"},{\"lang\":\"Node.js\"},{\"lang\":\"Python\"}]},\"disableSearch\":true,\"ctrlFHijack\":false,\"disableSidebar\":true,\"theme\":{\"overrides\":{\"DownloadButton\":{\"custom\":\"\"},\"NextSectionButton\":{\"custom\":\"\"}},\"codeBlock\":{\"tokens\":{}},\"schema\":{\"constraints\":{},\"examples\":{}},\"rightPanel\":{\"textColor\":\"#eeeeee\"},\"typography\":{\"heading1\":{},\"heading2\":{},\"heading3\":{},\"rightPanelHeading\":{}}}}}","redocHasSecurityDefinitions":false,"redocInfoPageLink":"","redocItemId":"overview","redocHasInfoPage":true,"settings":{"pagination":"none","corsProxyUrl":"https://cors.redoc.ly","generateCodeSamples":{"languages":[{"lang":"JavaScript","label":"JS"},{"lang":"C#"},{"lang":"Java"},{"lang":"curl"},{"lang":"Node.js"},{"lang":"Python"}]}},"requestLogin":false,"lastModified":"2026-06-01T21:05:14.000Z"},"seo":{"title":"Index Document API"}}},"pageContext":{"id":"923f24c6-226a-57ef-b121-9ca78b1f8779overview__redocly content/openapi/docmanager-reference/v2.0/overview/","seo":{"title":"Index Document API","description":null,"image":"","keywords":null,"jsonLd":null,"lang":null,"siteUrl":null},"pageId":"openapi/docmanager-reference.page.yaml#overview","pageBaseUrl":"/openapi/docmanager-reference","type":"redoc-info","toc":{"enable":true,"maxDepth":4,"headings":null},"data":{},"catalogInfo":null,"link":"/openapi/docmanager-reference/v2.0/","sidebarName":"DANAConnectAPIs","isLanding":false,"showPrevButton":null,"showNextButton":null,"apiVersions":[{"definitionId":"docmanager","id":"v1","title":"v1.0","isDefault":false,"apiId":null},{"definitionId":"docmanager-v2","id":"v2.0","title":"v2.0 (latest)","isDefault":true,"apiId":null}],"apiVersionId":"v2.0","isDefaultApiVersion":true}},"staticQueryHashes":["1123603147","1302185487","1344209882","1398840060","1520077861","1975142765","2667623876","2950305614","3240152602","3743992808","561138138"]}