JSON / XML interface

Philipp Kaestner

Philipp Kaestner

PaperOffice Europe

Description

These special control files contain the POJOB-JSON format and can either be created manually via the area in PaperOffice "Document templates and storage masks", then "Manage storage masks" or using external scripts / applications.

For manual creation, go to the storage mask management as described above, create a new storage mask and click on "Export" in the storage mask overview to export the POJOB.JSON file.

Functional principle

Check the JSON parameters of the PaperOffice API

1. Save files in the monitored folder

The monitored folder must be set up with PIA "Switched off and optimized for bulk imports".

To do this, go to your settings and select "Automation and monitoring", then select "Add new monitoring" and in the next step the monitorable folder.
After the folder has been selected, check the "Switched off and optimized for bulk imports" option.

Folder monitoring PIA switched off and optimized for mass imports

First save the pojob.json file and then the new document that is to be saved.

2. Detect and assign POJOB file
The name of the POJOB file is always identical to the target document, but with the ending pojob.json

3. Get parameters from POJOB file
PaperOffice takes all added parameters from the POJOB file and then removes it.

4. Finished! Document has been saved
PaperOffice saves your document fully automatically according to all specifications.

Example for installation

PaperOffice will automatically save the document in accordance with all of the specified specifications.

{
    "document_name":"DOCUMENT_FILEPATH_FILENAME", 
    "document_category_path":"rootdir_documents_public/APIMonitoring/__YYYY__/__MMMM__/From JSON file", 
    "document_keywords":"Project station;purchase;goodwill", 
    "document_type":"Invoice;Invoice unpaid", 
    "document_state":
        {
            "name":"Urgent!", 
            "bgcolor":"#FF0000",
            "fgcolor":"#FFFFFF"
        }, 
    "document_contacts":
        [
            {
                "name":"Cooperative Construction",
                "firstname":"Hans",
                "lastname":"Huber"
            },
            {
                "name":"Electro Inc",
                "firstname":"Adolf",
                "lastname":"Cable"
            }
        ],	
    "oncomplete_open_document":"true"
}


Examples to try out

You will find the test files prepared with POJOB-JSON control tags in the PaperOffice installation directory under „/lib/POJOB-JSON sample files/en“:

- /lib/POJOB-JSON sample files/en/Mein erstes PaperOffice Dokument.pdf - /lib/POJOB-JSON sample files/en/Mein erstes PaperOffice Dokument.pdf.pojob.json

1. Make sure that you are logged into PaperOffice.
2. Copy first the .pojob.json file into the watchable folder.
3. Only then copy the .pdf file into the monitorable folder.

PaperOffice will automatically save the document as a PDF document for long-term archiving (PDF / A) in accordance with all of the specified specifications.

Was the article helpful?

Yes No

Thank you for your feedback!

Leave a change or addition proposal

Other topics in API Schnittstelle

Contact support team Call +44 20 39361675
Location London, Monday to Friday 11:00 - 17:00

You did not find what you have searched for?

  • Location London, Monday to Friday 11:00 - 17:00
  • Phone +44 20 39361675
  • PaperOffice®, PaperOffice paperless office® and the PaperOffice logo are registered trademarks of PaperOffice Limited Europe in Europe and/or other countries
    © Copyright 2004-2020 PaperOffice Limited Europe, All rights reserved