api/v2/sysForm

SysForm model represents document forms in the elDoc system. This REST API Reference describes available methods for the SysForm objects.

API overview

Method

API endpoint

Get all available document formsGET api/v2/sysForm
Get document form dataGET api/v2/sysForm/{id}


Get all available document forms 

URL & Method & Description

GET api/v2/sysFrom

Retrieves all active system forms data 

Access rights requirement

Method requires [elAdminDocsR] role

Request (sample)
GET https://eldoc.domain.com/api/v2/sysFrom

Response:

Response headers
Content-Type: application/json
Response body (sample)
[
    {
        "_id": "59e351b5805645140093625",
        "_id_web": "fd1",
        "docformtype": "docForm",
    	"doctitle": "合同",
        "doctitle_en": "Contract",
        "status": 1,
        "doccf": {
            "customFields": [
                {
                    "type": "crmOrg",
                    "required": false,
                    "prefix": "cf",
                    "fieldName": "",
                    "name": {
                        "en": "Counterpart"
                    }
                },
                {...}
            ]
        },
        "docsf": {
            "docNum": {
                "enabled": true,
                "required": true,
                "autoReg": true,
                "autoRegState": 1,
            },
            "description": {
                "enabled": true,
                "required": false,
                "useRTeditor": true,
                "name": {
                    "en": "Description"
                },
            },
            "docTopic": {
                "enabled": true,
                "required": true,
            },
            "dateCreated": {
                "enabled": true,
                "editable": false,
            },        
            "dateDue": {
                "enabled": true,
                "editable": false,
            }
        },
        "sysprocessunid": "59fa52aa805645146009372b"
    },
    {...}
]

Response body keys

Description

Sample values (comma separated)

{doctitle}
"{TAG}": "{VALUE}"

Title of the form, can be provided along with localized values assigned to {TAG} which is in format doctitle_xx , where xx - short name of localisation language

"doctitle_ru": "Контракт", 
"doctitle_en": "Contract"
{name}
"name": {
    "{TAG}": "{VALUE}", 
    ...
}

Array of localized values for field name. {TAG} - short localization name

"name": {
    "ru": "Комментарии", 
    "en": "Description"   
}

Get document form data 

URL & Method & Description

GET api/v2/sysFrom/{id}

Retrieves stem form data 

Access rights requirement

Method requires [elAdminDocsR] role

Request:

Request (sample)
GET https://eldoc.domain.com/api/v2/sysFrom/{id}
ParamTypeDescriptionSample values (comma separated)
{id}Path paramFull id (24 hex-character) of the SystemForm59e351b5805645140093625, 59e351b5805645140093626

Response:

Response headers
Content-Type: application/json
Response body (sample)
{
    "_id": "59e351b5805645140093625",
    "_id_web": "fd1",
    "docformtype": "docForm",
	"doctitle": "合同",
    "doctitle_en",
    "status": 1,
    "doccf": {
        "customFields": [
            {
                "type": "crmOrg",
                "required": false,
                "prefix": "cf",
                "fieldName": "",
                "name": {
                    "en": "Counterpart"
                }
            },
            {...}
        ]
    },
    "docsf": {
        "docNum": {
            "enabled": true,
            "required": true,
            "autoReg": true,
            "autoRegState": 1,
        },
        "description": {
            "enabled": true,
            "required": false,
            "useRTeditor": true,
            "name": {
                "en": "Description"
            },
        },
        "docTopic": {
            "enabled": true,
            "required": true,
        },
        "dateCreated": {
            "enabled": true,
            "editable": false,
        },        
        "dateDue": {
            "enabled": true,
            "editable": false,
        }
    },
    "sysprocessunid": "59fa52aa805645146009372b"
}

Response body keys

Description

Sample values (comma separated)

{doctitle}
"{TAG}": "{VALUE}"

Title of the form, can be provided along with localized values assigned to {TAG} which is in format doctitle_xx , where xx - short name of localisation language

"doctitle_ru": "Контракт", 
"doctitle_en": "Contract"
{name}
"name": {
    "{TAG}": "{VALUE}", 
    ...
}

Array of localized values for field name. {TAG} - short localization name

"name": {
    "ru": "Комментарии", 
    "en": "Description"   
}

Last modified: April 28, 2023