The DOCBOX® REST API makes it possible to integrate the DOCBOX® into third-party programs such as ERP or CRM applications. The third-party programs can access certain DOCBOX® functions, for example to archive documents in the DOCBOX® or to search for documents in it.
The api is available under https://{docbox-host}:{api-port}/api/v2. The default port is 8081 and should not be mistaken with the port of the webapp.
To authenticate to the API you must pass the API-Key header. Api keys can be configured by administrators in the modules->API section. If you are using the cloud version of DOCBOX® you must also pass the Cloud-ID header with your Cloudid.
For more information, please visit https://www.docbox.eu/service-kontakt/kontakt.html.
PHP 7.4 and later. Should also work with PHP 8.0.
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: cloudId
$config = OpenAPI\Client\Docbox\Configuration::getDefaultConfiguration()->setApiKey('Cloud-ID', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Docbox\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Cloud-ID', 'Bearer');
// Configure API key authorization: apiKeyAuth
$config = OpenAPI\Client\Docbox\Configuration::getDefaultConfiguration()->setApiKey('API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Docbox\Configuration::getDefaultConfiguration()->setApiKeyPrefix('API-Key', 'Bearer');
$apiInstance = new OpenAPI\Client\Docbox\Api\ArchiveApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$parentFolderId = 56; // int | Parent folder id. If omitted the whole archive is returned.
$lazy = false; // bool
try {
$result = $apiInstance->archivestructure($parentFolderId, $lazy);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ArchiveApi->archivestructure: ', $e->getMessage(), PHP_EOL;
}
All URIs are relative to https://localhost:8081/api/v2
Class | Method | HTTP request | Description |
---|---|---|---|
ArchiveApi | archivestructure | GET /archivestructure | Archive structure |
DocumentApi | documentArchive | POST /document/{id}/archive | Archives a INBOX-document |
DocumentApi | documentAutoExportStatus | POST /document/auto_export_status/set | Set auto export status |
DocumentApi | documentData | GET /document/{id}/data | |
DocumentApi | documentIdDeletePost | POST /document/{id}/delete | Deletes a inbox document |
DocumentApi | documentIdReplacePost | POST /document/{id}/replace | Replaces a document in Inbox. |
DocumentApi | documentKeywordsPost | POST /document/{id}/keywords | |
DocumentApi | documentList | GET /document/list | Document list |
DocumentApi | documentMetadataGet | GET /document/{id}/metadata | |
DocumentApi | documentMetadataPost | POST /document/{id}/metadata | |
DocumentApi | documentOcrResult | GET /document/{id}/ocr-result | Returns the OCR-result of a document |
DocumentApi | documentPdf | GET /document/{id}/pdf | Document |
DocumentApi | documentRename | POST /document/{id}/rename | |
DocumentApi | documentUploadedWith | GET /document/{id}/uploaded-with | |
FileUploadApi | fileUpload | POST /file-upload | File upload |
FolderApi | folderCreate | POST /folder/create | Create folder |
InboxApi | inboxList | GET /inboxes | Inbox list |
PageApi | pageOcrResult | GET /page/{id}/ocr-result | Returns the OCR-result of a page |
PageApi | pagePreview | GET /page/{id}/preview | Page preview |
SearchApi | searchPOST | POST /search |
- DocboxArchive
- Document
- DocumentPage
- DocumentPageNotesInner
- DocumentPageStampsInner
- ExtendedDocument
- ExtendedDocumentExternal
- ExtendedDocumentWorkflowsInner
- ExternalMetadata
- Folder
- FolderCreate
- InboxFolder
- InboxStructure
- SearchPOST200Response
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: API-Key
- Location: HTTP header
- Type: API key
- API key parameter name: Cloud-ID
- Location: HTTP header
To run the tests, use:
composer install
vendor/bin/phpunit
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
7.6.0
- Generator version:
7.5.0
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen