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
| Name | In | Type | Description | |
|---|---|---|---|---|
id | path | integer | required | Client id. 0 returns all clients you can access. |
initUploadDate | query | integer | required | First upload month, YYYYMM. |
endUploadDate | query | integer | required | Last upload month, YYYYMM. |
tenantId | query | string | optional | Tenant 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
Returns valuation data extracted from documents processed by DAI.
Cash-flow documents
Returns cash-flow data extracted from documents processed by DAI. Parameters and response format are the same as valuation documents.
Errors
| Status | Body |
|---|---|
400 | "The user does not have access to this client or the client does not exist." |
400 | Validation 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.