Skip to content

Commit e0d66e9

Browse files
committed
[IMP] extract_api: few minor improvements/corrections
- Add links to the IAP documentation. - Remove BMP from supported file format (it never was supported ?). - Rewording of some descriptions in the `/parse` documentation. - More consistent abbreviations for "IAP" and "OCR". closes #12278 X-original-commit: 1a33d8e Signed-off-by: Louis Baudoux (lba) <[email protected]>
1 parent 7bacd32 commit e0d66e9

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

content/developer/reference/extract_api.rst

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@
22
Extract API
33
===========
44

5+
.. |IAP| replace:: :abbr:`IAP (In-app purchases)`
6+
.. |OCR| replace:: :abbr:`OCR (Optical Character Recognition)`
7+
58
Odoo provides a service to automate the processing of documents of type **invoices**, **bank statements**,
69
**expenses** or **resumes**.
710

8-
The service scans documents using an :abbr:`OCR (Optical Character Recognition)` engine and then
11+
The service scans documents using an |OCR| engine and then
912
uses :abbr:`AI(Artificial Intelligence)`-based algorithms to extract fields of interest such as the
1013
total, due date, or invoice lines for *invoices*, the initial and final balances, the date for
1114
*bank statements*, the total, date for *expenses*, or the name, email, phone number for *resumes*.
1215

13-
This service is a paid service. Each document processing will cost you one credit.
14-
Credits can be bought on `iap.odoo.com <https://iap.odoo.com/iap/in-app-services/259?sortby=date>`_.
16+
This service is a paid service. Each document processing will cost you one credit from your
17+
document digitization |IAP| account. More information about |IAP| accounts can be found
18+
:doc:`here </applications/essentials/in_app_purchase>`.
1519

1620
You can either use this service directly in the Accounting, Expense, or Recruitment App or through
1721
the API. The Extract API, which is detailed in the next section, allows you to integrate our
@@ -59,8 +63,8 @@ testing is provided in the
5963
Parse
6064
=====
6165

62-
Request the processing of a document from the OCR. The route will return a `document_token`,
63-
you can use it to obtain the result of your request.
66+
Request the digitization of a document. The route will return a `document_token` that you can use
67+
to fetch the result of your request.
6468

6569
.. _extract_api/parse:
6670

@@ -87,17 +91,15 @@ Request
8791
.. rst-class:: o-definition-list
8892

8993
``account_token`` (required)
90-
The token of the account from which credits will be taken. Each successful call costs one
91-
token.
94+
The token of the :doc:`IAP </applications/essentials/in_app_purchase>` account from which
95+
credits will be charged. Each successful call costs one credit.
9296
``version`` (required)
9397
The version will determine the format of your requests and the format of the server response.
9498
You should use the :ref:`latest version available <extract_api/version>`.
9599
``documents`` (required)
96-
The document must be provided as a string in the ASCII encoding. The list should contain
97-
only one string. If multiple strings are provided only the first string corresponding to a
98-
pdf will be processed. If no pdf is found, the first string will be processed. This field
99-
is a list only for legacy reasons. The supported extensions are *pdf*, *png*, *jpg* and
100-
*bmp*.
100+
The document must be provided as a Base64 string in the ASCII encoding.
101+
The list should contain only one document. This field is a list only for legacy reasons.
102+
The supported formats are *pdf*, *png* and *jpg*.
101103
``dbuuid`` (optional)
102104
Unique identifier of the Odoo database.
103105
``webhook_url`` (optional)
@@ -238,7 +240,7 @@ Request
238240
``document_token`` (required)
239241
The ``document_token`` for which you want to get the current parsing status.
240242
``account_token`` (required)
241-
The token of the account that was used to submit the document.
243+
The token of the |IAP| account that was used to submit the document.
242244

243245
.. code-block:: js
244246
@@ -279,7 +281,7 @@ are the name of the field and the value is the value of the field.
279281
.. rst-class:: o-definition-list
280282

281283
``full_text_annotation``
282-
Contains the unprocessed full result from the OCR for the document
284+
Contains the unprocessed full result from the |OCR| for the document.
283285

284286
================================ =============================================================
285287
status status_msg

0 commit comments

Comments
 (0)