Documents: General documents
General documents are documents that are not invoices, estimates, or other specific document types. They can be used to store other financial 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.
Required scope(s)
documents
path Parameters
administration_id^\d+$ · requiredThe unique identifier of the administration
A unique record identifier
format^(.(json|xml))?$ · requiredThe format in which the response is given, can be empty to use the default format
query Parameters
filterComma-separated key:value filter terms. Same syntax as GET /documents/general_documents — see that operation's description for the available keys.
List ids and versions of general documents › Responses
IDs and versions of records
idversionFetch 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.
Required scope(s)
documents
path Parameters
administration_id^\d+$ · requiredThe unique identifier of the administration
A unique record identifier
format^(.(json|xml))?$ · requiredThe format in which the response is given, can be empty to use the default format
Fetch general documents with given ids › Responses
A list of general documents
id^\d+$A unique record identifier
administration_id^\d+$A unique record identifier
contact_id^\d+$A unique record identifier
referencedatedue_dateentry_numberstateexchange_ratecreated_atupdated_atversionDestroys note from entity
Deletes a note from the general document.
Required scope(s)
documents
path Parameters
administration_id^\d+$ · requiredThe unique identifier of the administration
A unique record identifier
general_document_id^\d+$ · requiredA unique record identifier
id^\d+$ · requiredA unique record identifier
format^(.(json|xml))?$ · requiredThe format in which the response is given, can be empty to use the default format
Destroys note from entity › Responses
Note deleted
Adds note to entity
Adds a note to the general document.
Required scope(s)
documents
path Parameters
administration_id^\d+$ · requiredThe unique identifier of the administration
A unique record identifier
general_document_id^\d+$ · requiredA unique record identifier
format^(.(json|xml))?$ · requiredThe format in which the response is given, can be empty to use the default format
Adds note to entity › Responses
Note created
id^\d+$A unique record identifier
administration_id^\d+$A unique record identifier
entity_id^\d+$A unique record identifier
entity_typeuser_id^\d+$A unique record identifier
assignee_id^\d+$A unique record identifier
todonotecompleted_atcompleted_by_id^\d+$A unique record identifier
todo_typedatacreated_atupdated_atDownload 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.
Required scope(s)
documents
path Parameters
administration_id^\d+$ · requiredThe unique identifier of the administration
A unique record identifier
id^\d+$ · requiredA unique record identifier
attachment_id^\d+$ · requiredA unique record identifier
format^(.(json|xml))?$ · requiredThe format in which the response is given, can be empty to use the default format
Download attachment › Responses
Found
Delete an attachment
Deletes an attachment of an attachable.
Required scope(s)
documents
path Parameters
administration_id^\d+$ · requiredThe unique identifier of the administration
A unique record identifier
id^\d+$ · requiredA unique record identifier
attachment_id^\d+$ · requiredA unique record identifier
format^(.(json|xml))?$ · requiredThe format in which the response is given, can be empty to use the default format
Delete an attachment › Responses
Attachment deleted
Add attachment to general document
Add an attachment to a general document.
Required scope(s)
documents
path Parameters
administration_id^\d+$ · requiredThe unique identifier of the administration
A unique record identifier
id^\d+$ · requiredA unique record identifier
format^(.(json|xml))?$ · requiredThe format in which the response is given, can be empty to use the default format
Add attachment to general document › Responses
Status code
Get general document
Returns a general document by id.
Required scope(s)
documents
path Parameters
administration_id^\d+$ · requiredThe unique identifier of the administration
A unique record identifier
id^\d+$ · requiredA unique record identifier
format^(.(json|xml))?$ · requiredThe format in which the response is given, can be empty to use the default format
Get general document › Responses
A general document
id^\d+$A unique record identifier
administration_id^\d+$A unique record identifier
contact_id^\d+$A unique record identifier
referencedatedue_dateentry_numberstateexchange_ratecreated_atupdated_atversionDelete a general document
Deletes a general document.
Required scope(s)
documents
path Parameters
administration_id^\d+$ · requiredThe unique identifier of the administration
A unique record identifier
id^\d+$ · requiredA unique record identifier
format^(.(json|xml))?$ · requiredThe format in which the response is given, can be empty to use the default format
Delete a general document › Responses
Status code
Update a general document
Updates a general document.
Required scope(s)
documents
path Parameters
administration_id^\d+$ · requiredThe unique identifier of the administration
A unique record identifier
id^\d+$ · requiredA unique record identifier
format^(.(json|xml))?$ · requiredThe format in which the response is given, can be empty to use the default format
Update a general document › Responses
General document updated
id^\d+$A unique record identifier
administration_id^\d+$A unique record identifier
contact_id^\d+$A unique record identifier
referencedatedue_dateentry_numberstateexchange_ratecreated_atupdated_atversionGet 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: period:this_year,state:open. The available options for filtering are:
| Filter | Type | Default | Description |
|---|---|---|---|
| period | String | this_year | A named period (this_month, prev_month, next_month, this_quarter, prev_quarter, next_quarter, this_year, prev_year, next_year) or a custom range (201301..201302, 20130101..20130131) |
| state | String | all | all, new, saved, open, paid, late or pending_payment. paid, late and pending_payment only apply to documents with a payment lifecycle (purchase invoices and receipts) |
| recurring | String | all | all, enabled or disabled |
| attachment | String | all | all, with or without |
| reference | String | Documents with the given reference value | |
| contact_id | Integer | Documents belonging to the given contact | |
| ledger_account_id | Integer | Documents booking against the given ledger account | |
| updated_after | String | ISO 8601 timestamp in UTC; documents updated strictly after this time |
Multiple values for state, recurring and attachment can be combined with a pipe, e.g. state:open|paid.
The new_filter argument accepts the same key:value vocabulary as filter; keys present in new_filter override the corresponding key in filter. Useful for changing one value (such as period) without restating the rest.
Required scope(s)
documents
path Parameters
administration_id^\d+$ · requiredThe unique identifier of the administration
A unique record identifier
format^(.(json|xml))?$ · requiredThe format in which the response is given, can be empty to use the default format
query Parameters
filterString terms, example: key1:value1,key2:value2.
new_filterString terms, example: key1:value1,key2:value2.
pageper_page^\d+$Get general documents › Responses
A list of general documents
id^\d+$A unique record identifier
administration_id^\d+$A unique record identifier
contact_id^\d+$A unique record identifier
referencedatedue_dateentry_numberstateexchange_ratecreated_atupdated_atversionCreate a new general document
Creates a new general document.
Required scope(s)
documents
path Parameters
administration_id^\d+$ · requiredThe unique identifier of the administration
A unique record identifier
format^(.(json|xml))?$ · requiredThe format in which the response is given, can be empty to use the default format
Create a new general document › Responses
General document created
id^\d+$A unique record identifier
administration_id^\d+$A unique record identifier
contact_id^\d+$A unique record identifier
referencedatedue_dateentry_numberstateexchange_ratecreated_atupdated_atversion