Archives a file in the DOCBOX® or places it in an input tray.
**INFO:** Bitte beachten Sie, dass
* bei einer Splittarchivierung aus dem Eingangsfach in das Archiv mehrere Dokumenten-ID's
entstehen.
Beispiel: Es liegt ein 5-seitiges Dokument mit der Dokumenten ID 1036 im Eingangsfach.
Nun archivieren man Seite 1-2 und am Schluss Seite 3-5. Die Seiten 3-5 behalten die
Dokumenten-ID 1036, die Seiten 1-2 erhalten eine neue Dokumenten-ID.
* Wenn Sie ein Dokument im Eingangsfach in Einzelseiten auftrennen (Symbol Schere) entstehen
neue Dokumenten-ID's und die ursprüngliche ID wird verworfen.
curl -X POST \
-H "Authorization: Basic [[basicHash]]" \
-H "API-Key: [[apiKey]]" \
-H "Accept: text/plain" \
-H "Content-Type: multipart/form-data" \
"http://localhost/docbox.webapp/api/file-upload"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.FileUploadApi;
import java.io.File;
import java.util.*;
public class FileUploadApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: apiKeyAuth
ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth");
apiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKeyAuth.setApiKeyPrefix("Token");
// Create an instance of the API class
FileUploadApi apiInstance = new FileUploadApi();
String targetMandatorName = targetMandatorName_example; // String | Name of the mandator where the document should be archived
String targetFolderPath = targetFolderPath_example; // String | Path to the target folder starting at the mandator. Either this or `target-folder-id` is required. Example: "/Eingangsrechnungen/2018/"
Long targetFolderId = 789; // Long | Id of the target folder. Either this or `target-folder-path` is required.
String targetDocumentName = targetDocumentName_example; // String |
File uploadData = BINARY_DATA_HERE; // File | The file to upload. Either this or `upload-data-base64` is required.
byte[] uploadDataBase64 = BYTE_ARRAY_DATA_HERE; // byte[] | Base64 encoded content of the upload-data. When using this parameter `target-document-name` is required. Either this or `upload-data` is required.
String keywords = keywords_example; // String | Comma separated list of keywords. Commas can be escaped by prepending \\.
String documentTypes = documentTypes_example; // String | Comma separated list of document types (or their alias). Commas can be escaped by prepending \\. Ignores values where no document-type was found.
String externalId = externalId_example; // String |
String externalMetadatas = externalMetadatas_example; // String | Comma separated list of key=value pairs. Comma and equals signs can be escaped by prepending \\.
String emailImportOrder = emailImportOrder_example; // String |
Boolean forceNewDocument = true; // Boolean |
try {
Long result = apiInstance.fileUpload(targetMandatorName, targetFolderPath, targetFolderId, targetDocumentName, uploadData, uploadDataBase64, keywords, documentTypes, externalId, externalMetadatas, emailImportOrder, forceNewDocument);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FileUploadApi#fileUpload");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final String targetMandatorName = new String(); // String | Name of the mandator where the document should be archived
final String targetFolderPath = new String(); // String | Path to the target folder starting at the mandator. Either this or `target-folder-id` is required. Example: "/Eingangsrechnungen/2018/"
final Long targetFolderId = new Long(); // Long | Id of the target folder. Either this or `target-folder-path` is required.
final String targetDocumentName = new String(); // String |
final File uploadData = new File(); // File | The file to upload. Either this or `upload-data-base64` is required.
final byte[] uploadDataBase64 = new byte[](); // byte[] | Base64 encoded content of the upload-data. When using this parameter `target-document-name` is required. Either this or `upload-data` is required.
final String keywords = new String(); // String | Comma separated list of keywords. Commas can be escaped by prepending \\.
final String documentTypes = new String(); // String | Comma separated list of document types (or their alias). Commas can be escaped by prepending \\. Ignores values where no document-type was found.
final String externalId = new String(); // String |
final String externalMetadatas = new String(); // String | Comma separated list of key=value pairs. Comma and equals signs can be escaped by prepending \\.
final String emailImportOrder = new String(); // String |
final Boolean forceNewDocument = new Boolean(); // Boolean |
try {
final result = await api_instance.fileUpload(targetMandatorName, targetFolderPath, targetFolderId, targetDocumentName, uploadData, uploadDataBase64, keywords, documentTypes, externalId, externalMetadatas, emailImportOrder, forceNewDocument);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->fileUpload: $e\n');
}
import org.openapitools.client.api.FileUploadApi;
public class FileUploadApiExample {
public static void main(String[] args) {
FileUploadApi apiInstance = new FileUploadApi();
String targetMandatorName = targetMandatorName_example; // String | Name of the mandator where the document should be archived
String targetFolderPath = targetFolderPath_example; // String | Path to the target folder starting at the mandator. Either this or `target-folder-id` is required. Example: "/Eingangsrechnungen/2018/"
Long targetFolderId = 789; // Long | Id of the target folder. Either this or `target-folder-path` is required.
String targetDocumentName = targetDocumentName_example; // String |
File uploadData = BINARY_DATA_HERE; // File | The file to upload. Either this or `upload-data-base64` is required.
byte[] uploadDataBase64 = BYTE_ARRAY_DATA_HERE; // byte[] | Base64 encoded content of the upload-data. When using this parameter `target-document-name` is required. Either this or `upload-data` is required.
String keywords = keywords_example; // String | Comma separated list of keywords. Commas can be escaped by prepending \\.
String documentTypes = documentTypes_example; // String | Comma separated list of document types (or their alias). Commas can be escaped by prepending \\. Ignores values where no document-type was found.
String externalId = externalId_example; // String |
String externalMetadatas = externalMetadatas_example; // String | Comma separated list of key=value pairs. Comma and equals signs can be escaped by prepending \\.
String emailImportOrder = emailImportOrder_example; // String |
Boolean forceNewDocument = true; // Boolean |
try {
Long result = apiInstance.fileUpload(targetMandatorName, targetFolderPath, targetFolderId, targetDocumentName, uploadData, uploadDataBase64, keywords, documentTypes, externalId, externalMetadatas, emailImportOrder, forceNewDocument);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FileUploadApi#fileUpload");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
// Configure API key authorization: (authentication scheme: apiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"API-Key"];
// Create an instance of the API class
FileUploadApi *apiInstance = [[FileUploadApi alloc] init];
String *targetMandatorName = targetMandatorName_example; // Name of the mandator where the document should be archived (optional) (default to null)
String *targetFolderPath = targetFolderPath_example; // Path to the target folder starting at the mandator. Either this or `target-folder-id` is required. Example: "/Eingangsrechnungen/2018/" (optional) (default to null)
Long *targetFolderId = 789; // Id of the target folder. Either this or `target-folder-path` is required. (optional) (default to null)
String *targetDocumentName = targetDocumentName_example; // (optional) (default to null)
File *uploadData = BINARY_DATA_HERE; // The file to upload. Either this or `upload-data-base64` is required. (optional) (default to null)
byte[] *uploadDataBase64 = BYTE_ARRAY_DATA_HERE; // Base64 encoded content of the upload-data. When using this parameter `target-document-name` is required. Either this or `upload-data` is required. (optional) (default to null)
String *keywords = keywords_example; // Comma separated list of keywords. Commas can be escaped by prepending \\. (optional) (default to null)
String *documentTypes = documentTypes_example; // Comma separated list of document types (or their alias). Commas can be escaped by prepending \\. Ignores values where no document-type was found. (optional) (default to null)
String *externalId = externalId_example; // (optional) (default to null)
String *externalMetadatas = externalMetadatas_example; // Comma separated list of key=value pairs. Comma and equals signs can be escaped by prepending \\. (optional) (default to null)
String *emailImportOrder = emailImportOrder_example; // (optional) (default to null)
Boolean *forceNewDocument = true; // (optional) (default to null)
// File upload
[apiInstance fileUploadWith:targetMandatorName
targetFolderPath:targetFolderPath
targetFolderId:targetFolderId
targetDocumentName:targetDocumentName
uploadData:uploadData
uploadDataBase64:uploadDataBase64
keywords:keywords
documentTypes:documentTypes
externalId:externalId
externalMetadatas:externalMetadatas
emailImportOrder:emailImportOrder
forceNewDocument:forceNewDocument
completionHandler: ^(Long output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var DocboxXmlApi = require('docbox_xml_api');
var defaultClient = DocboxXmlApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
// Configure API key authorization: apiKeyAuth
var apiKeyAuth = defaultClient.authentications['apiKeyAuth'];
apiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKeyAuth.apiKeyPrefix['API-Key'] = "Token";
// Create an instance of the API class
var api = new DocboxXmlApi.FileUploadApi()
var opts = {
'targetMandatorName': targetMandatorName_example, // {String} Name of the mandator where the document should be archived
'targetFolderPath': targetFolderPath_example, // {String} Path to the target folder starting at the mandator. Either this or `target-folder-id` is required. Example: "/Eingangsrechnungen/2018/"
'targetFolderId': 789, // {Long} Id of the target folder. Either this or `target-folder-path` is required.
'targetDocumentName': targetDocumentName_example, // {String}
'uploadData': BINARY_DATA_HERE, // {File} The file to upload. Either this or `upload-data-base64` is required.
'uploadDataBase64': BYTE_ARRAY_DATA_HERE, // {byte[]} Base64 encoded content of the upload-data. When using this parameter `target-document-name` is required. Either this or `upload-data` is required.
'keywords': keywords_example, // {String} Comma separated list of keywords. Commas can be escaped by prepending \\.
'documentTypes': documentTypes_example, // {String} Comma separated list of document types (or their alias). Commas can be escaped by prepending \\. Ignores values where no document-type was found.
'externalId': externalId_example, // {String}
'externalMetadatas': externalMetadatas_example, // {String} Comma separated list of key=value pairs. Comma and equals signs can be escaped by prepending \\.
'emailImportOrder': emailImportOrder_example, // {String}
'forceNewDocument': true // {Boolean}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.fileUpload(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class fileUploadExample
{
public void main()
{
// Configure HTTP basic authorization: basicAuth
Configuration.Default.Username = "YOUR_USERNAME";
Configuration.Default.Password = "YOUR_PASSWORD";
// Configure API key authorization: apiKeyAuth
Configuration.Default.ApiKey.Add("API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("API-Key", "Bearer");
// Create an instance of the API class
var apiInstance = new FileUploadApi();
var targetMandatorName = targetMandatorName_example; // String | Name of the mandator where the document should be archived (optional) (default to null)
var targetFolderPath = targetFolderPath_example; // String | Path to the target folder starting at the mandator. Either this or `target-folder-id` is required. Example: "/Eingangsrechnungen/2018/" (optional) (default to null)
var targetFolderId = 789; // Long | Id of the target folder. Either this or `target-folder-path` is required. (optional) (default to null)
var targetDocumentName = targetDocumentName_example; // String | (optional) (default to null)
var uploadData = BINARY_DATA_HERE; // File | The file to upload. Either this or `upload-data-base64` is required. (optional) (default to null)
var uploadDataBase64 = BYTE_ARRAY_DATA_HERE; // byte[] | Base64 encoded content of the upload-data. When using this parameter `target-document-name` is required. Either this or `upload-data` is required. (optional) (default to null)
var keywords = keywords_example; // String | Comma separated list of keywords. Commas can be escaped by prepending \\. (optional) (default to null)
var documentTypes = documentTypes_example; // String | Comma separated list of document types (or their alias). Commas can be escaped by prepending \\. Ignores values where no document-type was found. (optional) (default to null)
var externalId = externalId_example; // String | (optional) (default to null)
var externalMetadatas = externalMetadatas_example; // String | Comma separated list of key=value pairs. Comma and equals signs can be escaped by prepending \\. (optional) (default to null)
var emailImportOrder = emailImportOrder_example; // String | (optional) (default to null)
var forceNewDocument = true; // Boolean | (optional) (default to null)
try {
// File upload
Long result = apiInstance.fileUpload(targetMandatorName, targetFolderPath, targetFolderId, targetDocumentName, uploadData, uploadDataBase64, keywords, documentTypes, externalId, externalMetadatas, emailImportOrder, forceNewDocument);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling FileUploadApi.fileUpload: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');
// Configure API key authorization: apiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('API-Key', 'Bearer');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\FileUploadApi();
$targetMandatorName = targetMandatorName_example; // String | Name of the mandator where the document should be archived
$targetFolderPath = targetFolderPath_example; // String | Path to the target folder starting at the mandator. Either this or `target-folder-id` is required. Example: "/Eingangsrechnungen/2018/"
$targetFolderId = 789; // Long | Id of the target folder. Either this or `target-folder-path` is required.
$targetDocumentName = targetDocumentName_example; // String |
$uploadData = BINARY_DATA_HERE; // File | The file to upload. Either this or `upload-data-base64` is required.
$uploadDataBase64 = BYTE_ARRAY_DATA_HERE; // byte[] | Base64 encoded content of the upload-data. When using this parameter `target-document-name` is required. Either this or `upload-data` is required.
$keywords = keywords_example; // String | Comma separated list of keywords. Commas can be escaped by prepending \\.
$documentTypes = documentTypes_example; // String | Comma separated list of document types (or their alias). Commas can be escaped by prepending \\. Ignores values where no document-type was found.
$externalId = externalId_example; // String |
$externalMetadatas = externalMetadatas_example; // String | Comma separated list of key=value pairs. Comma and equals signs can be escaped by prepending \\.
$emailImportOrder = emailImportOrder_example; // String |
$forceNewDocument = true; // Boolean |
try {
$result = $api_instance->fileUpload($targetMandatorName, $targetFolderPath, $targetFolderId, $targetDocumentName, $uploadData, $uploadDataBase64, $keywords, $documentTypes, $externalId, $externalMetadatas, $emailImportOrder, $forceNewDocument);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FileUploadApi->fileUpload: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::FileUploadApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';
# Configure API key authorization: apiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'API-Key'} = "Bearer";
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::FileUploadApi->new();
my $targetMandatorName = targetMandatorName_example; # String | Name of the mandator where the document should be archived
my $targetFolderPath = targetFolderPath_example; # String | Path to the target folder starting at the mandator. Either this or `target-folder-id` is required. Example: "/Eingangsrechnungen/2018/"
my $targetFolderId = 789; # Long | Id of the target folder. Either this or `target-folder-path` is required.
my $targetDocumentName = targetDocumentName_example; # String |
my $uploadData = BINARY_DATA_HERE; # File | The file to upload. Either this or `upload-data-base64` is required.
my $uploadDataBase64 = BYTE_ARRAY_DATA_HERE; # byte[] | Base64 encoded content of the upload-data. When using this parameter `target-document-name` is required. Either this or `upload-data` is required.
my $keywords = keywords_example; # String | Comma separated list of keywords. Commas can be escaped by prepending \\.
my $documentTypes = documentTypes_example; # String | Comma separated list of document types (or their alias). Commas can be escaped by prepending \\. Ignores values where no document-type was found.
my $externalId = externalId_example; # String |
my $externalMetadatas = externalMetadatas_example; # String | Comma separated list of key=value pairs. Comma and equals signs can be escaped by prepending \\.
my $emailImportOrder = emailImportOrder_example; # String |
my $forceNewDocument = true; # Boolean |
eval {
my $result = $api_instance->fileUpload(targetMandatorName => $targetMandatorName, targetFolderPath => $targetFolderPath, targetFolderId => $targetFolderId, targetDocumentName => $targetDocumentName, uploadData => $uploadData, uploadDataBase64 => $uploadDataBase64, keywords => $keywords, documentTypes => $documentTypes, externalId => $externalId, externalMetadatas => $externalMetadatas, emailImportOrder => $emailImportOrder, forceNewDocument => $forceNewDocument);
print Dumper($result);
};
if ($@) {
warn "Exception when calling FileUploadApi->fileUpload: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: apiKeyAuth
openapi_client.configuration.api_key['API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['API-Key'] = 'Bearer'
# Create an instance of the API class
api_instance = openapi_client.FileUploadApi()
targetMandatorName = targetMandatorName_example # String | Name of the mandator where the document should be archived (optional) (default to null)
targetFolderPath = targetFolderPath_example # String | Path to the target folder starting at the mandator. Either this or `target-folder-id` is required. Example: "/Eingangsrechnungen/2018/" (optional) (default to null)
targetFolderId = 789 # Long | Id of the target folder. Either this or `target-folder-path` is required. (optional) (default to null)
targetDocumentName = targetDocumentName_example # String | (optional) (default to null)
uploadData = BINARY_DATA_HERE # File | The file to upload. Either this or `upload-data-base64` is required. (optional) (default to null)
uploadDataBase64 = BYTE_ARRAY_DATA_HERE # byte[] | Base64 encoded content of the upload-data. When using this parameter `target-document-name` is required. Either this or `upload-data` is required. (optional) (default to null)
keywords = keywords_example # String | Comma separated list of keywords. Commas can be escaped by prepending \\. (optional) (default to null)
documentTypes = documentTypes_example # String | Comma separated list of document types (or their alias). Commas can be escaped by prepending \\. Ignores values where no document-type was found. (optional) (default to null)
externalId = externalId_example # String | (optional) (default to null)
externalMetadatas = externalMetadatas_example # String | Comma separated list of key=value pairs. Comma and equals signs can be escaped by prepending \\. (optional) (default to null)
emailImportOrder = emailImportOrder_example # String | (optional) (default to null)
forceNewDocument = true # Boolean | (optional) (default to null)
try:
# File upload
api_response = api_instance.file_upload(targetMandatorName=targetMandatorName, targetFolderPath=targetFolderPath, targetFolderId=targetFolderId, targetDocumentName=targetDocumentName, uploadData=uploadData, uploadDataBase64=uploadDataBase64, keywords=keywords, documentTypes=documentTypes, externalId=externalId, externalMetadatas=externalMetadatas, emailImportOrder=emailImportOrder, forceNewDocument=forceNewDocument)
pprint(api_response)
except ApiException as e:
print("Exception when calling FileUploadApi->fileUpload: %s\n" % e)
extern crate FileUploadApi;
pub fn main() {
let targetMandatorName = targetMandatorName_example; // String
let targetFolderPath = targetFolderPath_example; // String
let targetFolderId = 789; // Long
let targetDocumentName = targetDocumentName_example; // String
let uploadData = BINARY_DATA_HERE; // File
let uploadDataBase64 = BYTE_ARRAY_DATA_HERE; // byte[]
let keywords = keywords_example; // String
let documentTypes = documentTypes_example; // String
let externalId = externalId_example; // String
let externalMetadatas = externalMetadatas_example; // String
let emailImportOrder = emailImportOrder_example; // String
let forceNewDocument = true; // Boolean
let mut context = FileUploadApi::Context::default();
let result = client.fileUpload(targetMandatorName, targetFolderPath, targetFolderId, targetDocumentName, uploadData, uploadDataBase64, keywords, documentTypes, externalId, externalMetadatas, emailImportOrder, forceNewDocument, &context).wait();
println!("{:?}", result);
}