api/v1/listValue

ListValue model represents directory values in the elDoc system. This REST API Reference describes available methods for the ListValue objects.

API overview

Method

API endpoint

Get list valuesGET api/v1/listValue
Get list valueGET api/v1/listValue/{id}
Create or update list valuePOST api/v1/listValue



Get list values

URL & Method & Description

GET api/v1/listValue

Retrieves all list values filtered with provided kfid.

Request:

Request (sample)
GET https://eldoc.domain.com/api/v1/listValue?kfid={kfid}
ParamTypeDescriptionSample values (comma separated)
{kfid}Query paramFull id (24 hex-character) of the list value required list values related to (parent). If no value provided response will contain all list values from top level (Directories)59e0c3e47b827239691c670b, 59e0c3e47b827239691c670a

Response:

Response headers
Content-Type: application/json
Response body (sample)
[    
    {
        "_id": "59e0c3e47b827239691c6700",
        "owner": "usr-3adcf315-918c-4818-bf4c-5863d60c5e1b",
        "kfunid": "59e0c3e47b827239691c670a",
        "valuedata": "Retail"
    },
    {
        "_id": "59e0c3e47b827239691c6701",
        "owner": "usr-3adcf315-918c-4818-bf4c-5863d60c5e1b",
        "kfunid": "59e0c3e47b827239691c670a",
        "valuedata": "Banks"
    },
    {
        "_id": "59e0c3e47b827239691c6702",
        "owner": "usr-3adcf315-918c-4818-bf4c-5863d60c5e1b",
        "kfunid": "59e0c3e47b827239691c670a",
        "valuedata": "Supplier"
    }
]

Response body keys

Description

Sample values (comma separated)

{valuedata}
"{TAG}": "{VALUE}"

ListValue data, can be provided along with localized values assigned to {TAG} which is in format valuedata_xx keys, where xx - short name of localisation language

"valuedata_en": "Banks",
"valuedata_ru": "Банки"

Get list value

URL & Method & Description

GET api/v1/listValue/{id}

Retrieves list value by id

Request:

Request (sample)
GET https://eldoc.domain.com/api/v1/listValue/{id}
ParamTypeDescriptionSample values (comma separated)
{id}Path paramFull id (24 hex-character) of the list value 59e0c3e47b827239691c6700, 59e0c3e47b827239691c6701

Response:

Response headers
Content-Type: application/json
Response body (sample)
{
    "_id": "59e0c3e47b827239691c6700",
    "owner": "usr-3adcf315-918c-4818-bf4c-5863d60c5e1b",
    "kfunid": "59e0c3e47b827239691c670a",
    "valuedata": "Retail"
}

Response body keys

Description

Sample values (comma separated)

{valuedata}
"{TAG}": "{VALUE}"

ListValue data, can be provided along with localized values assigned to {TAG} which is in format valuedata_xx keys, where xx - short name of localisation language

"valuedata_en": "Banks",
"valuedata_ru": "Банки"

Create or update list value

URL & Method & Description

POST api/v1/listValue

Creates or updates list value object in system

Access rights requirement

Method requires [elAdminDocRW] role

Request:

Request (sample)
POST https://eldoc.domain.com/api/v1/listValue
Request body (sample)
{
    "_id_ext": "id-1234567890",
    "valuedata": "Consulting",
    "kfunid": "59e0c3e47b827239691c670a",
}

Request body keys

Description

Sample values (comma separated)

{valuedata}
"{TAG}": "{VALUE}"

ListValue data, can be provided along with localized values assigned to {TAG} which is in format valuedata_xx keys, where xx - short name of localisation language

"valuedata_en": "Banks",
"valuedata_ru": "Банки"

Response:

Response headers
Content-Type: application/json
Response body (sample)
{
    "_id": "59e0c3e47b827239691c67fa",
    "owner": "usr-3adcf315-918c-4818-bf4c-5863d60c5e1b",
    "kfunid": "59e0c3e47b827239691c670a",
    "valuedata": "Consulting",
	"_id_ext": "id-1234567890"
}

Response body keys

Description

Sample values (comma separated)

{valuedata}
"{TAG}": "{VALUE}"

ListValue data, can be provided along with localized values assigned to {TAG} which is in format valuedata_xx keys, where xx - short name of localisation language

"valuedata_en": "Banks",
"valuedata_ru": "Банки"

Last modified: April 28, 2023