API reference

Document AI

Masttro Document AI (DAI) extracts data from uploaded statements and notices. These endpoints return what was extracted from valuation documents and cash-flow documents, filtered by the month each file was uploaded.

Common parameters

NameInTypeDescription
idpathintegerrequiredClient id. 0 returns all clients you can access.
initUploadDatequeryintegerrequiredFirst upload month, YYYYMM.
endUploadDatequeryintegerrequiredLast upload month, YYYYMM.
tenantIdquerystringoptionalTenant to query, from /Tenants. Default: your user's main tenant.

Response format

Both endpoints return a JSON array with one object per extracted record. Field names come straight from the extraction and depend on the document type. Fields without a value are left out of the object rather than set to null. Read fields defensively and ignore ones you do not recognize.

Valuation documents

GET/DAI/Valuation/{id}
REST onlyFull license only

Returns valuation data extracted from documents processed by DAI.

Cash-flow documents

GET/DAI/CashFlow/{id}
REST onlyFull license only

Returns cash-flow data extracted from documents processed by DAI. Parameters and response format are the same as valuation documents.

Errors

StatusBody
400"The user does not have access to this client or the client does not exist."
400Validation problem when initUploadDate or endUploadDate is missing or not a number.
400"The user does not have access to this tenant or the tenant does not exist."

Plus the common 401 and 429 responses. See Errors.