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 values | GET api/v1/listValue |
| Get list value | GET api/v1/listValue/{id} |
| Create or update list value | POST api/v1/listValue |
Get list values
GET api/v1/listValue
Retrieves all list values filtered with provided kfid.
Request:
GET https://eldoc.domain.com/api/v1/listValue?kfid={kfid}
| Param | Type | Description | Sample values (comma separated) |
|---|---|---|---|
{kfid} | Query param | Full 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:
Content-Type: application/json
[
{
"_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 | "valuedata_en": "Banks", "valuedata_ru": "Банки" |
Get list value
GET api/v1/listValue/{id}
Retrieves list value by id
Request:
GET https://eldoc.domain.com/api/v1/listValue/{id}
| Param | Type | Description | Sample values (comma separated) |
|---|---|---|---|
{id} | Path param | Full id (24 hex-character) of the list value | 59e0c3e47b827239691c6700, 59e0c3e47b827239691c6701 |
Response:
Content-Type: application/json
{
"_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 | "valuedata_en": "Banks", "valuedata_ru": "Банки" |
Create or update list value
POST api/v1/listValue
Creates or updates list value object in system
Access rights requirement
Method requires [elAdminDocRW] role
Request:
POST https://eldoc.domain.com/api/v1/listValue
{
"_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 | "valuedata_en": "Banks", "valuedata_ru": "Банки" |
Response:
Content-Type: application/json
{
"_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 | "valuedata_en": "Banks", "valuedata_ru": "Банки" |
Last modified: April 28, 2023