Skip to main content
Version: v2026.0.0

The DocumentClassService service exhibits all available operations around DocumentClass type components.

Retrieving document classes

Retrieving all document classes

The examples below show how to retrieve all document classes.

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
curl -X GET "<CORE_HOST>/rest/documentclass" \
-H "token: <TOKEN>"

Retrieving a defined list of document classes

The examples below show how to retrieve a list of document classes from their identifiers.

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
# <IDS>: list of document class identifiers
curl -X GET "<CORE_HOST>/rest/documentclass/<IDS>" \
-H "token: <TOKEN>"

Creating document classes

The examples below show how to create a document class.

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
curl -X POST "<CORE_HOST>/rest/documentclass" \
-H "token: <TOKEN>" \
-H "Content-Type: application/json" \
-d '[
{
"id": "CourrierTest",
"data": {
"owner": "fadmin",
"creationDate": "2024-03-07 13:59:53.401 +0100",
"lastUpdateDate": "2024-03-07 13:59:53.401 +0100",
"ACL": "acl-courrier"
},
"tagCategories": [
"InfoCourrier",
"InfoClient"
],
"tagReferences": [
{
"tagName": "RefClient",
"mandatory": false,
"multivalued": false,
"technical": false,
"readonly": false,
"order": 0,
"descriptions": [
{
"value": "Internal customer reference allowing to classify it",
"language": "EN"
},
{
"value": "Référence interne du client permettant de faire le lien avec son dossier",
"language": "FR"
}
]
}
],
"displayNames": [
{
"value": "Courrier Test",
"language": "FR"
}
],
"descriptions": [
{
"value": "Test Document issu d'\''une chaîne d'\''acquisition",
"language": "FR"
}
],
"RetentionDuration": {
"value": 0,
"unit": "MONTH"
},
"category": "DOCUMENT",
"technical": false
}
]'

Updating document classes

The examples below show how to update a document class.

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
# <IDS>: list of document class identifiers to update, separated by commas
curl -X POST "<CORE_HOST>/rest/documentclass/<IDS>" \
-H "token: <TOKEN>" \
-H "Content-Type: application/json" \
-d '[
{
"id": "CourrierTest",
"data": {
"owner": "fadmin",
"creationDate": "2024-03-07 13:59:53.401 +0100",
"lastUpdateDate": "2024-03-07 13:59:53.401 +0100",
"ACL": "acl-courrier"
},
"tagCategories": [
"InfoClient"
],
"tagReferences": [
{
"tagName": "RefClient",
"mandatory": true,
"multivalued": false,
"technical": false,
"readonly": false,
"order": 0
}
],
"displayNames": [
{
"value": "Courrier Test",
"language": "FR"
}
],
"descriptions": [
{
"value": "Test Document issu d'\''une chaîne d'\''acquisition",
"language": "FR"
}
],
"RetentionDuration": {
"value": 0,
"unit": "MONTH"
},
"category": "DOCUMENT",
"technical": false
}
]'
warning

When using the REST service, unset fields will be cleared: you must send the entire document class, not just the fields to modify.

Deleting document classes

The examples below show how to delete a list of document classes.

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
# <IDS>: list of document class identifiers to delete, separated by commas
curl -X DELETE "<CORE_HOST>/rest/documentclass/<IDS>" \
-H "token: <TOKEN>"
warning

Deletion does not perform any checks: you must verify that there are no existing instances before deleting a document class.