Reference
Documents
GET/api/v1/documentsSearch documents
Searches filed documents (invoices, contracts, minutes, …) by meaning and by exact terms such as invoice numbers. Returns the best documents with matching passages and SharePoint links. Use get_document for the full text of one.scope documents:read
Query
| queryrequired | stringA question or words to find. |
| document_type | stringE.g. Eingangsrechnung, Vertrag, Protokoll. |
| company_id | string |
| order_id | string |
| from | stringDocument date from, YYYY-MM-DD. |
| to | stringDocument date to, YYYY-MM-DD. |
| limit | integer |
Response 200
| id | string |
| file_name | string |
| url | string | null |
| document_type | string | null |
| document_date | string | null |
| company | string | null |
| order | string | null |
| passages | string[] |
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"file_name": {
"type": "string"
},
"url": {
"type": [
"string",
"null"
]
},
"document_type": {
"type": [
"string",
"null"
]
},
"document_date": {
"type": [
"string",
"null"
]
},
"company": {
"type": [
"string",
"null"
]
},
"order": {
"type": [
"string",
"null"
]
},
"passages": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"file_name",
"url",
"document_type",
"document_date",
"company",
"order",
"passages"
],
"additionalProperties": false
}
}Refusals are problems with a code — see Errors.
GET/api/v1/documents/{id}Get document
The full text, metadata and SharePoint link of one filed document, by the id search_documents returned.scope documents:read
Path
| idrequired | string |
Response 200
| id | string |
| file_name | string | null |
| path | string | null |
| url | string | null |
| document_type | string | null |
| document_date | string | null |
| company | object | null |
| company.id | string |
| company.name | string |
| order | object | null |
| order.id | string |
| order.number | string |
| metadata | any |
| tasks | string[] |
| text | string | null |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"file_name": {
"type": [
"string",
"null"
]
},
"path": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"document_type": {
"type": [
"string",
"null"
]
},
"document_date": {
"type": [
"string",
"null"
]
},
"company": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"order": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": "string"
}
},
"required": [
"id",
"number"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"metadata": {},
"tasks": {
"type": "array",
"items": {
"type": "string"
}
},
"text": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"file_name",
"path",
"url",
"document_type",
"document_date",
"company",
"order",
"metadata",
"tasks",
"text"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.