The following actions are available for interacting with edoc documents service:
-
document\DeleteDocument - edoc automate -
document\GetDocument - edoc automate -
document\GetDocumentAttributes - edoc automate -
document\GetDocumentContent - edoc automate -
document\GetDocumentsBySchema - edoc automate -
document\GetNewDocumentsBySchema - edoc automate -
document\GetSchema - edoc automate -
document\GetSchemaDetails - edoc automate -
document\SaveDocument - edoc automate -
document\UpdateAttributes - edoc automate -
document\NewDocument - edoc automate -
document\GetDocumentByExternalId - edoc automate -
document\GetDocumentOcr - edoc automate
Things to know
The functions in connection with schemas were not created as actions due to their complexity. Instead, you can create an instance of the DocumentService class in the PHP code (e.g. in a plug-in action) and use the following functions:
-
getSchemas(): array -
getSchema(string $schemaName): array -
saveSchema(string $schemaName, array $data): void -
deleteSchema(string $schemaName): void -
getSchemaWebhooks(string $schemaName, string $appName): array -
saveSchemaWebhooks(string $schemaName, string $appName, array $data): void -
deleteSchemaWebhooks(string $schemaName, string $appName): void
Example:
PHP
$dsClient = \edoc\appserver\services\DocumentService::GetInstance();
$dsClient->saveSchema(
'order-confirmation.active',
[
"label": [
"de": "Auftragsbestätigung | Aktiv",
"en": "Order confirmation | Active"
],
"attributes" => [
"order_description": [
"type": "nullable|string",
"label": [
"de": "Beschreibung",
"en": "Description"
]
],
"vendor_id": [
"type": "nullable|string",
"label": [
"de": "Lieferanten-Nr.",
"en": "Vendor ID"
]
]
]
]
);