Uploads an invoice file together with its metadata. The system will automatically scan the document, extract relevant data, and create or update the invoice in the database. If any step of the process (upload, scan, or save) fails, an exception is thrown.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unique identifier of the invoice.
Company associated with the invoice. If the ai found a best match company, this will be ignored.
Used to associate the invoice with a building by default if the invoice does not contain it or ai cannot extract it. If the ai found a best match building, this will be ignored.
External identifier for the invoice (optional).
Model used for processing (optional).
Type of document (optional).
Prompt for processing (optional).
Invoice file to be uploaded and scanned.