File: usage.rst

package info (click to toggle)
tryton-modules-document-incoming 7.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 540 kB
  • sloc: python: 791; xml: 290; makefile: 11; sh: 3
file content (25 lines) | stat: -rw-r--r-- 795 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
*****
Usage
*****

.. _Push documents:

Push documents
==============

You can push `Incoming Documents <model-document.incoming>` into Tryton using a
Web service.

You need first to create a `User Application Key
<trytond:topics-user_application>` from the user preferences.
Then you can post documents on the `URL <https://en.wikipedia.org/wiki/URL>`_
path ``/<database_name>/document_incoming`` with the key in the
``Authorization`` header.
See `Post incoming document` for all the options.

For example using `curl <https://curl.se/>`_, you can push piped document and
process it with:

.. code-block:: shell

   | curl -X POST "https://<host>:<port>/<database_name>/document_incoming?process=1" -H "Authorization: bearer xxxxx" -H "Content-Type:  application/octet-stream" --data-binary @-