PaperOffice API JSON Parameters
.
-
document_category_path
Function
PaperOffice target folderDescription
Specifies the target folder in PaperOffice using an internal path.
The entire folder structure is created automatically if the path does not already exist.
Mandatory
YES (One of the rootdir paths)Parameters
Type Parameter Description Mandatory String
UTF-8 text with characters valid for Windows file names.
Internal names must be used as the root folderrootdir_documents_personal "My documents" of the currently logged in user NO String
UTF-8 text with characters valid for Windows file names.
Internal names must be used as the root folderrootdir_incoming_personal "My inbox" of the currently logged in user NO String
UTF-8 text with characters valid for Windows file names.
Internal names must be used as the root folderrootdir_documents_public "Common documents" NO String
UTF-8 text with characters valid for Windows file names.
Internal names must be used as the root folderrootdir_incoming_public "Gemeinsamer inbox" NO String
Dynamic.
Use of variables in the folder path__YYYY__ Aktuelles Jahr wie z.B. 2018, 2019, 2020 NO String
Dynamic.
Use of variables in the folder path__MMMM__ Current month name such as October, November, December NO String
Dynamic.
Use of variables in the folder path__MM__ Current month with a leading zero such as 09, 10, 11 NO String
Dynamic.
Use of variables in the folder path__DD__ Current day of the month with a leading zero such as 10, 20, 30 NO String
Dynamic.
Use of variables in the folder path__WW__ Current calendar week of the year with a leading zero such as 09, 10 NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"Mein erstes PaperOffice POJOB-Dokument", "document_type":"Rechnung;Rechnung unbezahlt;Auto-Ablage", "document_state": { "name":"Dringend!", "bgcolor":"#FF0000", "fgcolor":"#FFFFFF" }, "oncomplete_open_document":"true" }
-
document_name
Function
Document nameDescription
Defines the name of the new document.Mandatory
YES (one of the parameters)Parameters
Type Parameter Description Mandatory String Any name
UTF-8 text with characters valid for Windows file names.Names the new document NO Dynamic DOCUMENT_FILEPATH_BASENAME Automatically generates the document name from the file name specified in the document_filepath without file extension NO Dynamic DOCUMENT_FILEPATH_FILENAME Automatically generates the document name from the file name specified in the document_filepath with file extension NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_type":"Rechnung;Rechnung unbezahlt;Auto-Ablage", "document_state": { "name":"urgent!", "bgcolor":"#FF0000", "fgcolor":"#FFFFFF" }, "oncomplete_open_document":"true" }
-
document_description
Function
Defines the description of the new documentDescription
Is used to assign the later callback to a unique ID.
In this way the callback_id is connected to the callback_X so that each callback also receives the correct result.
It is recommended to use Microtime or something similar to make the ID unique.Mandatory
NOParameters - JSON-String
Type Parameter Description Mandatory String description Any text without special characters. The description text can optionally be displayed as a post-it. #Document properties NO Boolean showpostit true || false, true shows a Post-It NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_type":"Rechnung;Rechnung unbezahlt;Auto-Ablage", "document_description": { "description":"Unbedingt auf Wiedervorlage setzen!", "showpostit":"true" }, "oncomplete_open_document":"true" }
-
document_keywords
Function
Document-keywordsDescription
Assigns these keywords to the new document and optionally creates them if they are not available.Mandatory
NOParameters
Type Parameter Description Mandatory Integer Unique keyword ID from PaperOffice Multiple entries separated with ";" NO String
DynamicAny text Text in UTF-8 format with characters valid for Windows file names.
The keyword is created automatically, if it does not yet exist, multiple entries separated by ";"NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_keywords":"Projekt Bahnhof;Einkauf;Kulanz;15", "document_type":"Rechnung;Rechnung unbezahlt;Auto-Ablage", "document_description": { "description":"Unbedingt auf Wiedervorlage setzen!", "showpostit":"true" }, "oncomplete_open_document":"true" }
-
document_type
Function
Document-TypeDescription
Assigns this document type to the new document and optionally creates it if it does not exist.Mandatory
NOParameters
Type Parameter Description Mandatory Integer Unique document type ID from PaperOffice, Multiple entries separated with ";" NO String
DynamicAny text Text in UTF-8 format with characters valid for Windows file names.
The document type is created automatically if it does not yet exist, multiple entries separated by ";"NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_keywords":"Projekt Bahnhof;Einkauf;Kulanz;15", "document_type":"Rechnung;Rechnung unbezahlt;Auto-Ablage;9", "document_description": { "description":"Unbedingt auf Wiedervorlage setzen!", "showpostit":"true" }, "oncomplete_open_document":"true" }
-
document_state
Function
Document-StatusDescription
Assigns this document status to the new document and optionally creates it if it does not exist. In addition, the background color and the font color are specified.Mandatory
NOParameters - JSON-String
Type Parameter Description Mandatory String name Unique status ID from PaperOffice.
State name: UTF-8 text with characters valid for Windows file names
NO String bgcolor HEX-Color value for the background color NO String fgcolor HEX-Color value for the font color NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_keywords":"Projekt Bahnhof;Einkauf;Kulanz;15", "document_state": { "name":"Dringend!", "bgcolor":"#FF0000", "fgcolor":"#FFFFFF" }, "oncomplete_open_document":"true" }
-
document_contacts
Function
Contacts associated with the documentDescription
Assigns these contact links to the new document and optionally creates them if they do not exist.Mandatory
NOParameters - JSON-String
Type Parameter Description Mandatory String name Status name: UTF-8 text with characters valid for Windows file names NO String firstname Firstname NO String lastname Lastname NO String company Company NO String department Department NO String position Position NO String custom_field1_name Add custom_field1 value NO String custom_field2_name Add custom_field2 value NO String custom_field5_name Add custom_field5 value NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_keywords":"Projekt Bahnhof;Einkauf;Kulanz;15", "document_contacts": [ { "name":"Genossenschaft Bauen", "firstname":"Hans", "lastname":"Huber" }, { "name":"Name", "firstname":"Firstname", "lastname":"Lastname", "company":"Company-name", "department":"Department", "position":"Position", "fieldName":"value" } ], "oncomplete_open_document":"true" }
-
callback_id
Function
Unique ID for the callback file (required for all callback functions)Description
Is used to assign the later callback to a unique ID.
In this way the callback_id is connected to the callback_X so that each callback also receives the correct result.
It is recommended to use Microtime or something similar to make the ID unique.Mandatory
NOParameters
Type Parameter Description Mandatory String callback_id Any text without special characters NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_keywords":"Projekt Bahnhof;Einkauf;Kulanz;15", "callback_id":"archiving_invoice_number_IV123456 at 16593933105469", "callback_filepath": "c:/PaperOffice Callbacks/16593933105469.callback.pojob.json", "oncomplete_open_document":"true" }
-
callback_filepath
Function
File path to the callback fileDescription
Specifies the full path to the callback file in UNIX format.
The callback file is created automatically after the new document is saved and contains information in JSON format. The file extension must be "callback.pojob.json".
It is recommended to use Microtime or something similar as the file name, otherwise the file will be overwritten. The directory must exist.Mandatory
NOParameters
Type Parameter Description Mandatory String callback_id Absolute file path in UTF-8 and UNIX format NO Type Parameter Description Mandatory String callback_id The self-set callback_id when creating the POJOB NO Integer document_id Dokument-ID from new document NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_keywords":"Projekt Bahnhof;Einkauf;Kulanz;15", "callback_id":"archiving_invoice_number_IV123456 at 16593933105469", "callback_filepath": "c:/PaperOffice Callbacks/16593933105469.callback.pojob.json", "oncomplete_open_document":"true" }
-
callback_exepush
Function
Push callback to an EXE fileDescription
Starts the specified EXE file and passes the callback as a parameter.
The EXE should terminate automatically after the start, otherwise the timeout is 10 seconds.Mandatory
NOParameters
Type Parameter Description Mandatory String callback_exepush Absolute path to the EXE file NO Type Parameter Description Mandatory String callback_id The self-set callback_id when creating the POJOB NO Integer document_id Document ID of the new document NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_keywords":"Projekt Bahnhof;Einkauf;Kulanz;15", "callback_id":"archiving_invoice_number_IV123456 at 16593933105469", "callback_filepath": "c:/PaperOffice Callbacks/16593933105469.callback.pojob.json", "callback_exepush":"c:/Helper/com.paperoffice.push2database.exe", "oncomplete_open_document":"true" }
-
callback_urlpush
Function
Push callback to a URLDescription
Pushes the callback to the specified URL with the GET method.
The callback is appended to the end of the URL address.Mandatory
NOParameters
Type Parameter Description Mandatory String callback_urlpush URL to which the push should be sent NO Type Parameter Description Mandatory String callback_id The self-set callback_id when creating the POJOB NO Integer document_id Document ID of the new document NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_keywords":"Projekt Bahnhof;Einkauf;Kulanz;15", "callback_id":"archiving_invoice_number_IV123456 at 16593933105469", "callback_filepath": "c:/PaperOffice Callbacks/16593933105469.callback.pojob.json", "callback_urlpush":"https://api.paperoffice.com/?command=save_document", "oncomplete_open_document":"true" }
-
document_importance_level
Function
Document importance levelDescription
Sets the importance level of the document.Mandatory
NOParameters
Type Parameter Description Mandatory Integer document_importance_level Values from 1 - 14 NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_importance_level":10, "oncomplete_open_document":"true" }
-
document_classification_level
Function
Document classification levelDescription
Sets the classification level of the document.Mandatory
NOParameters
Type Parameter Description Mandatory Integer document_classification_level Values from 1 - 10 NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_classification_level":10, "oncomplete_open_document":"true" }
-
document_voucher fields
Function
Document voucher flieldsDescription
Sets the value of each individual voucher field.
Currency format needs to match the settings from current user!Mandatory
NOParameters
Type Parameter Description Mandatory String document_voucher_number The desired Invoice number e.g.: IN123456 NO float document_voucher_net Invoice net e.g.: 100.00 NO float document_voucher_gross Invoice gross e.g.: 110.00 NO float document_voucher_vat Invoice VAT %, e.g.: 10.00 NO String document_voucher_debitaccount Debit account number e.g.: DE77 1234 5678 9012 0130 00 NO String document_voucher_creditaccount Credit account number e.g.: DE88 1234 5678 9012 0130 00 NO String document_voucher_costcenter1 Costcenter1 name NO String document_voucher_costcenter2 Costcenter2 name NO String document_voucher_bookingtext The desired booking text NO String document_voucher_comment The desired comment NO String document_voucher_vatnumber The desired VAT number number e.g.: LU26375245 NO Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_voucher_number":"IN123456", "document_voucher_wkz":"EUR", "document_voucher_net":"100.00", "document_voucher_gross":"110.00", "document_voucher_vat":"10.00", "document_voucher_vatsum":"10.00", "document_voucher_debitaccount":"DE77 1234 5678 9012 0130 00", "document_voucher_creditaccount":"DE88 1234 5678 9012 0130 00", "document_voucher_costcenter1":"Production", "document_voucher_costcenter2":"Service", "document_voucher_bookingtext":"AMAZON", "document_voucher_comment":"Amazon payment", "document_voucher_vatnumber":"LU26375245", "oncomplete_open_document":"true" }
-
oncomplete_open_document
Function
Open document after savingDescription
Opens the newly added document in PaperOffice after it has been saved.Mandatory
NOParameters
Type Parameter Description Mandatory Boolean oncomplete_open_document true || false YES Example
{ "document_category_path":"rootdir_documents_personal/Automatische Dokumente/__YYYY__/__MM__", "document_name":"DOCUMENT_FILEPATH_BASENAME", "document_keywords":"Projekt Bahnhof;Einkauf;Kulanz;15", "callback_id":"archiving_invoice_number_IV123456 at 16593933105469", "callback_filepath": "c:/PaperOffice Callbacks/16593933105469.callback.pojob.json", "callback_urlpush":"https://api.paperoffice.com/?command=save_document", "oncomplete_open_document":"true" }