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
, Form Parameters. JSON Form Body is not Supported at the moment.
Response Codes
200: Success and Warnings
400: Error
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
{ "error": "No document provided.", "code": -1 }
Errors Possible
Error | Resolution |
---|---|
No API ID Provided | Check API ID in Header or Parameters. See https://esotech.atlassian.net/wiki/spaces/EXTDOC/pages/186744846/API#Using-API-ID-and-API-Key |
No API Key Provided | Check API Key in Headers or Parameters. See https://esotech.atlassian.net/wiki/spaces/EXTDOC/pages/186744846/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 |