Documents: Typeless documents
Typeless documents are documents of which the type is not yet known. For example, a document uploaded via email or via the bulk uploader. It is not possible to update a typeless document, except for adding attachments. You will need to set its type first. You cannot set the type of typeless documents using the API yet, but you can do it via the website.
List ids and versions of typeless documents
Returns all documents in the administration. The list contains the document id and the version of the document.
Check if the version of the document is newer than the version you have stored locally, use the POST
variant for fetching documents with the given ids.
Parameters
Parameter | Type | Description |
---|---|---|
filter |
String |
String terms, example: key1:value1,key2:value2. |
Example: retrieves all ids for synchronization
Request
Response
Fetch typeless documents with given ids
Given a list of document ids, returns the document information belonging to the documents. Returns a maximum of 100 documents, even if more ids are provided.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
Array[integer] |
Required |
Example: retrieves documents for given ids
Request
Response
Get typeless documents
Returns a paginated list of documents of this type in the administration.
The filter
argument allows you to filter on the list of documents. Filters are a combination of keys and values,
separated by a comma: key:value,key2:value2
. The most common filter method will be period
: period:this_month
.
Filtering works the same as in the web application, for more advanced examples, change the filtering in the web
application and learn from the resulting URI.
Parameters
Parameter | Type | Description |
---|---|---|
filter |
String |
Required String terms, example: |
new_filter |
String |
String terms, example: |
page |
Integer |
|
per_page |
Integer |
|
exclude_new_general_journal_documents |
Boolean |
Example: returns a list of typeless_documents
Request
Response
Example: returns paginated typeless documents on page 1
Request
Response
Example: returns paginated typeless documents on page 2
Request
Response
Example: returns an error when too many typeless documents are requested
Request
Response
Get typeless documents
Example: returns the wanted typeless_document
Request
Response
Example: only returns typeless_documents
Request
Response
Create a new typeless documents
Parameters
Parameter | Type | Description |
---|---|---|
typeless_document[reference] |
String |
Required |
typeless_document[date] |
String |
Required |
typeless_document[contact_id] |
Integer |
Should be a valid contact id. |
Example: creates the typeless_document
Request
Response
Example: requires all input
Request
Response
Delete a typeless documents
Parameters
Parameter | Type | Description |
---|---|---|
refresh_journal_entries |
Boolean |
Example: deletes the typeless_document
Request
Response
Add attachment to typeless document
Example: uploads an attachment
Request
Response
Download attachment
Download the attachment. The response will be a redirect to a temporarily available URL
where the attachment can be downloaded. Use the Location
header in the response
to download the attachment.
Delete an attachment
Deletes an attachment of an attachable.