For all operations listed below you will need to provide HTTP Request Header Authorization param. For more details see Login/Auth page.
Get the list of Documents
Route: /document
Method: GET
Required query parameters:
- customer_id array of customer IDs. (See customer section, for more details how to get customer IDs associated with your account)
Example result
{
"entities": [
{
"real_name": "Original name of the file",
"download_link": "file download full path",
"document_type_id": "",
"document_type_name": "",
"user_created_id": "",
"user_created_name": ""
"is_active": "1",
"id": "1",
"created_at": "2017-08-21 19:54:15",
"updated_at": "2017-11-10 22:12:26",
"pp_id": "",
},
{
...
}
...
"total": 123,
"result": true
}
Get document by internal ID
Route: /contact/{internal$_id}
Method: GET
{
"record":{
"real_name": "Original name of the file",
"download_link": "file download full path",
"document_type_id": "",
"document_type_name": "",
"user_created_id": "",
"user_created_name": ""
"is_active": "1",
"id": "1",
"created_at": "2017-08-21 19:54:15",
"updated_at": "2017-11-10 22:12:26",
"pp_id": "",
},
"result": true
}
Uploading new document
Route: /document
Method: POST
Data requirements & limitations
- id - Not allowed.
- document_type_id - Unsigned integer between 0 and 4294967295.
- document (required) - File with max 10Mb and once of the types: pdf, Ms Word, Ms Excel.
- is_active - Boolean (1 or 0).
API response examples:
RESPONSE 200 - OK, SUCCESS
{
"msg": "Successfully created entity.",
"id": "1",
"result": true
}
RESPONSE 200 - OK, FAILURE (EMPTY REQUEST)
In case if you don't provide any field, you'll get the following error:
{
"error": "Nothing sent for request.",
"result": false
}
OTHER FAILURE RESPONSES MIGHT RETURN
- errors:
- field_name: Field is required.
- field_name: validation error, when field does not validate against the rules listed above
- result: false