Documents: General documents
List ids and versions of general 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
Example: retrieves all ids for synchronization using a filter
Request
Response
Fetch general 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 general 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 general_documents
Request
Response
Example: returns paginated general documents on page 1
Request
Response
Example: returns paginated general documents on page 2
Request
Response
Example: returns an error when too many general documents are requested
Request
Response
Get general documents
Example: returns the wanted general_document
Request
Response
Example: only returns general_documents
Request
Response
Create a new general documents
Parameters
Parameter | Type | Description |
---|---|---|
general_document[reference] |
String |
Required. |
general_document[date] |
String |
Required Required. |
general_document[due_date] |
String |
|
general_document[reminder_date] |
String |
|
general_document[contact_id] |
Integer |
Should be a valid contact id. |
general_document[reminder][date] |
String |
Required |
general_document[reminder][message] |
String |
Example: creates the general_document
Request
Response
Example: requires all input
Request
Response
Delete a general documents
Parameters
Parameter | Type | Description |
---|---|---|
refresh_journal_entries |
Boolean |
Example: deletes the general_document
Request
Response
Update a general documents
Parameters
Parameter | Type | Description |
---|---|---|
general_document[reference] |
String |
Required. |
general_document[date] |
String |
Required Required. |
general_document[due_date] |
String |
|
general_document[reminder_date] |
String |
|
general_document[contact_id] |
Integer |
Should be a valid contact id. |
general_document[reminder][date] |
String |
Required |
general_document[reminder][message] |
String |
|
remove_contact |
Boolean |
Example: updates the general_document
Request
Response
Add attachment to general 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.
Example: destroys an attachment
Request
Response
Adds note to entity
Parameters
Parameter | Type | Description |
---|---|---|
note[note] |
String |
Required. Text for the note or to-do. |
note[todo] |
Boolean |
If |
note[assignee_id] |
Integer |
Assign to-do to user. Should be a valid user id. If assignee_id is provided the note will be a to-do. |