Ingress Documents
You can send Files directly to TLDCRM and attach them to any Lead or Policy in the system. This is useful for third party systems that are being used to collect document data and need to store and attach it to a record in TLD securely.
Endpoints: /api/ingress/documents/upload/lead
,/api/ingress/documents/policy
Method: POST
API Version Support: v1
Security Notice: Please make sure to use
When giving this access to third party systems as API Keys are unprotected unless specified.
The proper endpoint protection to set for an API using this Endpoint is /api/ingress/documents/upload*
Make sure to include the *
Data Formats Supported
multipart/form-data
,application/json
Response Codes
200: Success and Warnings
400: Error
Allowed File Extensions
7z
, avi
, bmp
, doc
, docx
, gif
, jpeg
, jpg
, json
, mov
, m4a
, mp3
, mp4
, mpg
, mpeg
, ogg
, ogv
, pdf
, png
, rar
, tiff
, txt
, wav
, xls
, xlsx
, zip
Allowed File MIME Types
application/pdf
, application/msword
, application/vnd.openxmlformats-officedocument.wordprocessingml.document
, application/vnd.ms-excel
, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
, application/zip
, application/x-7z-compressed
, application/x-rar-compressed
, application/json
audio/wav
, audio/x-wav
, audio/mp4
, audio/mpeg
, audio/ogg
, video/ogg
image/jpeg
, image/gif
, image/png
, image/bmp
, image/tiff
text/plain
video/mp4
, video/quicktime
, video/x-msvideo
Upload: Add a Document to a Lead
Endpoint: /api/ingress/documents/upload/lead
Parameter | Required | Format | Description |
---|---|---|---|
| ✓ | integer | A Valid Lead ID. |
| ✓ | A “File” type multipart/form-data file | TLD Will only accept one file per call. The first file found in the form-data will be used as well as it’s name. The form-data key does not need to be file as long as it is sent as a file type in can be of any non-conflicting form key. |
| ✘ | string | A text description of the file. |
| ✘ | integer | A Document Type ID. You can find these by going to |
| ✘ | integer, 0, 1, 2 | Default 1. Valid Options are |
Return Parameters
JSON Success Object
{
"result": "Document Added",
"code": 1,
"document_id": "3107"
}
JSON Error Object
{
"error": "No document provided.",
"code": -1
}
Upload: Add a Document to a Policy
Endpoint: /api/ingress/documents/upload/policy
Parameter | Required | Format | Description |
---|---|---|---|
| ✓ | integer | A Valid Policy ID. |
| ✓ | A “File” type multipart/form-data file | TLD Will only accept one file per call. The first file found in the form-data will be used as well as it’s name. The form-data key does not need to be file as long as it is sent as a file type in can be of any non-conflicting form key. |
| ✘ | string | A text description of the file. |
| ✘ | integer | A Document Type ID. You can find these by going to |
| ✘ | integer, 0, 1, 2 | Default 1. Valid Options are |
Return Parameters
JSON Success Object
{
"result": "Document Added",
"code": 1,
"document_id": "3108"
}
JSON Error Object
Alternate File Parameters
If you can’t send using multipart/form-data
you an send a generic post with the Base64 Encoded String as a Value in the following two formats. It is even possible to send this as JSON.
Format 1
Parameter | Required | Format | Description |
---|---|---|---|
| ✓ | string, base64 | string, data-uri | Your file can be based as Raw Base64 Encoded Data or Bae64 Encoded data in Data URI format |
| ✓ | string | The file name including the extension for example |
JSON Request Object - Base64
JSON Request Object - Data URL Base64
Format 2
Parameter | Required | Format | Description |
---|---|---|---|
| ✓ | string, base64 | string, data-uri | Your file can be based as Raw Base64 Encoded Data or Bae64 Encoded data in Data URI format |
| ✓ | string | The file name including the extension for example |
JSON Request Object - Base64
JSON Request Object - Data URL Base64
Errors Possible
Error | Resolution |
---|---|
No API ID Provided | Check API ID in Header or Parameters. See API | Using API ID and API Key |
No API Key Provided | Check API Key in Headers or Parameters. See API | Using API ID and API Key |
Lead ID is required. | Check |
Policy ID is required. | Check |
Lead does not Exist | Check |
Policy does not Exist | Check |
Invalid Document Type ID Provided | Check |
No Document provided | Check |
Error Inserting Document | Check |