Skip to content
View as Markdown

SloeDoc: read a receipt or invoice into ReceiptV1 fields (vendor, VAT number, date, subtotal, VAT, total, category, l...

POST/v1/abilities/document.extract

SloeDoc: 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.

Required
Yes
Content type
  • application/json
  • inputDocumentExtractInputrequired
    Show 8 properties
    • documentIdstringoptional
    • contentstringoptional

      base64 (or data URL) of the file, instead of documentId

    • contentTypestringoptional
    • filenamestringoptional
    • categoriesstring[]optional

      the expense categories the app offers; the answer is one of them or Other

    • waitbooleanoptional
      Default: true

      false = queue it and return at once; poll with document.get

    • purposestringoptional
    • sourceAppstringoptional
  • contextCallContextoptional

    Optional call context. The tenant always comes from the credential: tenantId is honoured only by a credential allowed to address sub-tenants, and then nests under the credential’s own tenant.

    Show 3 properties
    • tenantIdstringoptional

      Sub-tenant to act for (sub-tenant credentials only).

    • runIdstringoptional

      The trust run (from trust.preflight) this call executes under.

    • verticalIdstringoptional

      Vertical to attribute created records to.

Schema shown for 200 · application/json

  • result

    The ability’s return value. Its shape depends on the ability.