PaperOffice-afstandsbediening

<h3 class="uk-heading-divider"><small class="fas fa-terminal"></small> Commandline API</h3> <br> <h4>Function</h4> <div xss="removed"> Receive commands to PaperOffice via CMD description </div>

<br> <h4>Description</h4> <div xss="removed"> PaperOffice accepts commands via the command line, automatically creates a POAPI-JSON file and executes the commands in it. The variables are identical to the structure of the POAPI-JSON. </div>

<br> <h4>Functionality</h4> <div xss="removed">

<p> Run "C:\PaperOffice\com.paperoffice.launcher.exe" from the terminal with the desired argument parameters. </p> <p> The argument structure is as follows: "<i>main_command</i>=<i>command</i> <i>sub_command</i>=<i>value</i>" and always starts with "useapi = 1"<br> Example:</p><div class="cm">useapi=1 command=open_document document_id=42</div> <br> <img src="https://api.paperoffice.ai/latest/knowledge/image/15/9019d562a0a632b68943011b31981e5d15fa306d31eaccda0de3cd201eefbec5" alt="Terminal" xss="removed">

</div>

<h4><small class="fas fa-terminal"></small> </h4><h4 class="uk-heading-divider" xss="removed"><br></h4><h4 class="uk-heading-divider" xss="removed">POJOB-JSON file</h4>

<div xss="removed"> <p> Alternatively, you can add the arguments to a JSON object file and save them under "<b>shellpipe<i>filename</i>.json</b>" in the PaperOffice root installation folder. <br> PaperOffice monitors the internal folder for files with the filename "shellpipe<i>filename</i>.json" and processes the API commands contained inside. </p> <p class="remark yellow"> The argument "useapi=1" is not required in the json file. </p> <p> <b>Example:</b><br> </p><pre class="jsf">{ "command":"open_document", "document_id":42 } </pre>

</div>

<hr>

<h4><br></h4><h4>Search</h4> Usage: <div class="cm">useapi=1 command=<i>search</i> searchfor=<i>"text to search"</i></div> <table class="uk-table uk-table-striped apitd" xss="removed"> <tbody><tr> <th>Command</th> <th>Type</th> <th>Description</th> </tr> <tr> <td>search</td> <td>String</td> <td>Main command</td> </tr> <tr> <td>searchfor</td> <td>String</td> <td>Sub command<br><small>Text to search</small></td> </tr> <tr> <td colspan="3"> CMD Example: <div class="cm">c:>C:\PaperOffice\com.paperoffice.launcher.exe useapi=1 command=search searchfor="Invoice 12345"</div> </td> </tr> <tr> <td colspan="3"> JSON File Example: <pre class="jsf">{ "command":"search", "searchfor":"Invoice 12345" } </pre> </td> </tr> </tbody></table>

<hr>

<h4><br></h4><h4>Open Document</h4> There are two ways to open documents. <ul> <li> <b>By entering the document ID directly.</b><br> Usage: <div class="cm">useapi=1 command=<i>open_document</i> document_id=<i>ID</i></div> <table class="uk-table uk-table-striped apitd" xss="removed"> <tbody><tr> <th>Command</th> <th>Type</th> <th>Description</th> </tr> <tr> <td>open_document</td> <td>String<br></td> <td>Main command</td> </tr> <tr> <td>document_id</td> <td>Integer</td> <td>Sub command</td> </tr> <tr> <td colspan="3"> Example: <div class="cm">c:>C:\PaperOffice\com.paperoffice.launcher.exe useapi=1 command=open_document document_id=42</div> </td> </tr> <tr> <td colspan="3"> JSON File Example: <pre class="jsf">{ "command":"open_document", "document_id":42 } </pre> </td> </tr> </tbody></table> </li> <li> <b>By searching for a specific field value.</b><br> Usage: <div class="cm">useapi=1 command=<i>open_document</i> name=<i>field_name</i> value=<i>text to search</i></div> <div class="remark yellow">
By opening a document via a search, the document will be opened from the first search hit! </div> <div class="remark success">
<b>Advice:</b> You can search for values by using the placeholder "%" together with the argument "querymode=LIKE": <code>querymode=LIKE value="%text_to_search%"</code> </div> <table class="uk-table uk-table-striped apitd" xss="removed"> <tbody><tr> <th>Command</th> <th>Type</th> <th>Description</th> </tr> <tr> <td>open_document</td> <td>String<br></td> <td>Main command</td> </tr> <tr> <td>name</td> <td>String</td> <td>Sub command<br><small>Field name to search</small></td> </tr> <tr> <td>value</td> <td>String</td> <td>Text to search</td> </tr> <tr> <td>querymode=LIKE</td> <td>String</td> <td>Optional<br>Use when searching with "%" wildcard</td> </tr> <tr> <td colspan="4"> Example: <div class="cm" xss="removed">c:>C:\PaperOffice\com.paperoffice.launcher.exe useapi=1 command=open_document name=voucher_number querymode=LIKE value="3456%"</div> </td> </tr> <tr> <td colspan="3"> JSON File Example: <pre class="jsf">{ "command":"open_document", "name":"voucher_number", "querymode":"LIKE", "value":"3456%" } </pre> </td> </tr> </tbody></table> </li> </ul>

<hr>

<h4>Opening folders</h4> Usage: <div class="cm">useapi=1 command=<i>open_folder</i> category_id=<i>ID</i></div> <table class="uk-table uk-table-striped apitd" xss="removed"> <tbody><tr> <th>Command</th> <th>Type</th> <th>Description</th> </tr> <tr> <td>open_folder</td> <td>String</td> <td>Main command</td> </tr> <tr> <td>category_id</td> <td>Integer</td> <td>Sub command<br><small>Folder ID to open</small></td> </tr> <tr> <td colspan="3"> Examplee: <div class="cm">c:>C:\PaperOffice\com.paperoffice.launcher.exe useapi=1 command=open_folder category_id=639</div> </td> </tr> <tr> <td colspan="3"> JSON File Examplee: <pre class="jsf">{ "command":"open_folder", "category_id":639 } </pre> </td> </tr> </tbody></table>