SloeDoc: read a receipt or invoice into ReceiptV1 fields (vendor, VAT number, date, subtotal, VAT, total, category, l...
/v1/abilities/document.extractSloeDoc: read a receipt or invoice into ReceiptV1 fields (vendor, VAT number, date, subtotal, VAT, total, category, line items), each with a confidence, plus deterministic checks (subtotal + VAT = total, 15% or 0% VAT, SA VAT number format, plausible date) and the list of fields a person must review. Pass a documentId from document.upload, or content (base64, up to 6 MB) to upload and read in one call. Cheap-first: a PDF text layer is read as text; otherwise Flash-Lite, then 3.8 Flash only for doubtful fields. Nothing is posted anywhere; the app decides.
Request body
Section titled “Request body”inputDocumentExtractInputrequiredShow 8 properties
documentIdstringoptionalcontentstringoptionalbase64 (or data URL) of the file, instead of documentId
contentTypestringoptionalfilenamestringoptionalcategoriesstring[]optionalthe expense categories the app offers; the answer is one of them or Other
waitbooleanoptionalDefault:truefalse = queue it and return at once; poll with document.get
purposestringoptionalsourceAppstringoptional
contextCallContextoptionalOptional call context. The tenant always comes from the credential:
tenantIdis honoured only by a credential allowed to address sub-tenants, and then nests under the credential’s own tenant.Show 3 properties
tenantIdstringoptionalSub-tenant to act for (sub-tenant credentials only).
runIdstringoptionalThe trust run (from trust.preflight) this call executes under.
verticalIdstringoptionalVertical to attribute created records to.
Returns
Section titled “Returns”Schema shown for 200 · application/json
resultThe ability’s return value. Its shape depends on the ability.