Import Document
Import a document (the API equivalent of dropping a file in the interface).
The body is the file, and only the file: type is a query parameter because it does not
describe the document — the stored type stays unknown until the asynchronous chain
classifies it — it decides how the import is processed.
Only the new document’s id is returned: every other field is still empty at creation.
The document is enriched asynchronously (type, amounts, third party) — poll
GET /documents/{id} to follow it. In sandbox mode the file is validated exactly as in
live mode but nothing is stored, so the returned id is not resolvable.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Role of the document: purchase (default), sale or other. purchase and sale are analysed automatically; other is stored as-is, without analysis.
Body
The file to import. Allowed extensions: .pdf, .xml, .jpg, .jpeg, .png (max 10 MB).
Response
Successful Response
Identifier of a freshly imported document.
Nothing else is returned: at creation every other field still holds its default value
(no type, no amounts, no third party) — they are filled by the asynchronous chain.
Read the document itself with GET /documents/{id} to follow its enrichment.
Opaque unique identifier of the created document.