Download OpenAPI specification:Download
The REST Document Manager API is a web service that allows the administration, indexing, consultation, compression and download of document files associated with a record of a contact list and also makes it possible to later activate a conversation flow in DANAConnect using said data.
username
and password
in the DANAConnect platform.conversationID
)?For most DANAConnect API requests, you will need to send the Conversation ID as a parameter.
This conversation ID refers to the number assigned to the activation of the flow and can be found by logging into the DANAConnect platform and looking in the activation report for the conversation you need to refer to.
It is important to mention that every time a conversation is reactivated, a new Conversation ID will be generated.
Here is a video explaining how to find the conversation ID:
The API uses the same user credential system that is used to enter the DANAConnect platform.
The method used for all DANAConnect APIs is HTTP BASIC AUTH, which is based on login and password authentication.
Login: The login consists of the username concatenated with an @ and followed by the company code.
Login example:
Security Scheme Type | HTTP |
---|---|
HTTP Authorization Scheme | basic |
This service provides a signed PDF
JSON with the data required to sign a document
url required | string non-empty Document address inside DANAConnect Storage | ||||||||
isQR required | boolean Indicate | ||||||||
idTypeHashAlignW required | integer <int32> [ 1 .. 3 ] Hash horizontal alignment Width
| ||||||||
idTypeHashAlignH required | integer <int32> [ 1 .. 3 ] Hash horizontal alignment Height
| ||||||||
idTypeQRAlignW required | integer <int32> [ 1 .. 3 ] QR horizontal alignment Width
| ||||||||
idTypeQRAlignH required | integer <int32> [ 1 .. 3 ] QR horizontal alignment Height
| ||||||||
idTypePage required | integer <int32> [ 1 .. 3 ] Page insertion type
| ||||||||
info required | string [ 3 .. 255 ] characters Text up to 255 characters, that will show up in hash validation. Words written here can be used to validate the document |
Request with unexpected page type
{- "url": "s3://demos/ArchivoFactura1.pdf",
- "isQR": true,
- "idTypeHashAlignW": 2,
- "idTypeHashAlignH": 3,
- "idTypeQRAlignW": 1,
- "idTypeQRAlignH": 3,
- "idTypePage": 5,
- "info": "Documento enviado a DEMO"
}
Response when the document is not a pdf
{- "responseCode": "16",
- "responseDescription": "Wrong document type"
}
This service provides a URL to download a document
JSON with the data required to get the download URL of a document(s)
configServiceType required | integer <int32> Identifier indicating Document Manager's service configuration type in DANAConnect platform | ||||||||
isStrict required | boolean If set to | ||||||||
isZip required | boolean If set to | ||||||||
urlType required | integer <int32> [ 1 .. 3 ]
| ||||||||
filter1 | string Value that will find the files that were added to the document manager with that keyword in filter1 | ||||||||
filter2 | string Value that will find the files that were added to the document manager with that keyword in filter2 | ||||||||
filter3 | string Value that will find the files that were added to the document manager with that keyword in filter3 | ||||||||
Array of objects (DocumentDTO) |
Exceeded the maximum number of files to be compressed (folder with more than 100 documents) (default value is 100)
{- "configServiceType": 1,
- "isStrict": false,
- "isZip": true,
- "urlType": 1,
- "documentList": [
- {
- "url": "s3://demos/MoreThan100DocumentsInThisFolder/"
}
], - "filter1": "88",
- "filter2": "Demo",
- "filter3": "2021"
}
Exceeded the maximum number of files to be compressed (default value is 100)
{- "codResponse": "09",
- "desResponse": "Exceeded the maximum number of files to be compressed"
}
This service provides a URL to download a document
JSON with the data required to get the download URL of a document(s)
configServiceType required | integer <int32> Identifier indicating Document Manager's service configuration type in DANAConnect platform | ||||||||
isStrict required | boolean If set to | ||||||||
isZip required | boolean If set to | ||||||||
urlType required | integer <int32> [ 1 .. 3 ]
| ||||||||
filter1 | string Value that will find the files that were added to the document manager with that keyword in filter1 | ||||||||
filter2 | string Value that will find the files that were added to the document manager with that keyword in filter2 | ||||||||
filter3 | string Value that will find the files that were added to the document manager with that keyword in filter3 | ||||||||
info | string Value that contains additional information about the files that were added to the document manager | ||||||||
Array of objects (DocumentDTO) |
Exceeded the maximum number of files to be compressed (folder with more than 100 documents) (default value is 100)
{- "configServiceType": 1,
- "isStrict": false,
- "isZip": true,
- "urlType": 1,
- "documentList": [
- {
- "url": "s3://demos/MoreThan100DocumentsInThisFolder/"
}
], - "filter1": "88",
- "filter2": "Demo",
- "filter3": "2021"
}
Exceeded the maximum number of files to be compressed (default value is 100)
{- "codResponse": "09",
- "desResponse": "Exceeded the maximum number of files to be compressed"
}
This service provides a URL to download a document and starts a conversation. The urls are sent through the conversation (They are not returned in the service response)
JSON with the data required to get the download URL of a document(s) and to start a conversation
configServiceType required | integer <int32> Identifier indicating Document Manager's service configuration type in DANAConnect platform | ||||||||
isStrict required | boolean If set to | ||||||||
isZip required | boolean If set to | ||||||||
urlType required | integer <int32> [ 1 .. 3 ]
| ||||||||
idConversation required | integer <int32> >= 1 Conversation id | ||||||||
values required | string This should be a JSON object in which keys are the field identifier inside that the contact list that is related to the conversation. And as values the content that will be inserted in that field.
| ||||||||
Array of objects (DocumentDTO) |
Request the url of a document to be downloaded
{- "configServiceType": 1,
- "isStrict": false,
- "isZip": false,
- "urlType": 1,
- "documentList": [
- {
- "url": "s3://demos/SolicitudDocs/Poliza10-987654321.pdf"
}
], - "idConversation": "165245",
- "values": {
- "MYDB_FIRST_NAME": "John",
- "MYDB_LASTNAME": "Doe",
- "MYDB_EMAIL": "johndoe@dominio.com",
- "MYDB_URLSHORT": "$f{URLSHORT}"
}
}
Successful Response without any warnings
{- "codResponse": "00",
- "desResponse": "OK."
}
This service provides URLs to download documents matching the given filters
JSON with the data required to get the download URL of a document(s)
id_document_type | integer <int32> Document Manager Service's configuration Unique ID number in DANAConnect platform |
type_filter_1 | string Enum: "none" "equals" "contains" "ends" "begins" Filter method that will be used for filter_1 |
filter_1 | string First filter applied when searching for documents |
type_filter_2 | string Enum: "none" "equals" "contains" "ends" "begins" Filter method that will be used for filter_2 |
filter_2 | string Second filter applied when searching for documents |
type_filter_3 | string Enum: "none" "equals" "contains" "ends" "begins" Filter method that will be used for filter_3 |
filter_3 | string Third filter applied when searching for documents |
conditional | string Enum: "and" "or" Indicates if filters will be inclusive or exclusive |
Request with unexpected conditional value
{- "id_document_type": 0,
- "type_filter_1": "none",
- "filter_1": "Test Name",
- "type_filter_2": "none",
- "filter_2": "Test Lastname",
- "type_filter_3": "none",
- "filter_3": "Test Lastname",
- "conditional": "zzz"
}
At least one filter is expected
{- "responseCode": "00",
- "responseDescription": "You must choose at least one option as a filter"
}
This service provides URLs to download documents matching the given filters
JSON with the data required to get the download URL of a document(s)
responseCode | string Enum: "00" "000" "01" "02" "03" "04" "05" "06" "07" "08" "09" "10" "11" "12" "13" "14" "15" Message Code
| ||||||||||||||||||||||||||||||||||||
responseDescription | string Response Description | ||||||||||||||||||||||||||||||||||||
Array of objects (ResponseGetDocumentDTO) Contains the list of documents that were found |
Request with unexpected conditional value
{- "id_document_type": 0,
- "type_filter_1": "none",
- "filter_1": "Test Name",
- "type_filter_2": "none",
- "filter_2": "Test Lastname",
- "type_filter_3": "none",
- "filter_3": "Test Lastname",
- "conditional": "zzz"
}
At least one filter is expected
{- "responseCode": "00",
- "responseDescription": "You must choose at least one option as a filter"
}
This service allows searching text in PDF/Images and perform specific counts and extractions.
JSON with the data required to search for text within documents
file_reference required | string This field should contain the physical path where the PDF or image file is located. It is used to analyze the intelligent text search specified in the query parameters. Example: URL for S3 references to PDFs/Images. |
required | Array of objects (QueryDTO) Search Text AI Parameters for PDF/Image References |
Search for text in a single document
{- "file_reference": "s3://demos/SolicitudDocs/Poliza10-987654321.pdf",
- "queries": [
- {
- "queryParameters": {
- "text_count": "example"
}, - "keyResponse": "CODE_RESPONSE_CUSTOM_1"
}
]
}
Successful search
{- "code_response": "00",
- "page_count": 1,
- "results": {
- "CODE_RESPONSE_CUSTOM_1": 1,
- "CODE_RESPONSE_CUSTOM_2": 1,
- "CODE_RESPONSE_CUSTOM_3": 1,
- "CODE_RESPONSE_CUSTOM_4": "18/02/1983",
- "CODE_RESPONSE_CUSTOM_51": 1
}
}