Documents: General journal documents
List ids and versions of general journal 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 journal 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 journal 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_journal_documents
Request
Response
Example: returns paginated general journal documents on page 1
Request
Response
Example: returns paginated general journal documents on page 2
Request
Response
Example: returns an error when too many general journal documents are requested
Request
Response
Get general journal documents
Example: returns the wanted general_journal_document
Request
Response
Example: only returns general_journal_documents
Request
Response
Create a new general journal documents
Parameters
Parameter | Type | Description |
---|---|---|
general_journal_document[reference] |
String |
|
general_journal_document[date] |
String |
Required |
general_journal_document[origin] |
String |
Can be |
general_journal_document[journal_type] |
String |
Can be |
general_journal_document[general_journal_document_entries_attributes][id] |
Integer |
|
general_journal_document[general_journal_document_entries_attributes][ledger_account_id] |
Integer |
Should be a valid ledger account id. |
general_journal_document[general_journal_document_entries_attributes][tax_rate_id] |
Integer |
Should be a valid tax rate id. |
general_journal_document[general_journal_document_entries_attributes][description] |
String |
|
general_journal_document[general_journal_document_entries_attributes][debit] |
Decimal |
Both a decimal and a string ‘10,95’ are accepted. |
general_journal_document[general_journal_document_entries_attributes][credit] |
Decimal |
Both a decimal and a string ‘10,95’ are accepted. |
general_journal_document[general_journal_document_entries_attributes][project_id] |
Integer |
Should be a valid project id. |
general_journal_document[general_journal_document_entries_attributes][row_order] |
Integer |
|
general_journal_document[general_journal_document_entries_attributes][_destroy] |
Boolean |
|
general_journal_document[general_journal_document_entries_attributes][contact_id] |
Integer |
Should be a valid contact id. |
Example: creates the general journal document
Request
Response
Example: requires all input
Request
Response
Delete a general journal documents
Parameters
Parameter | Type | Description |
---|---|---|
refresh_journal_entries |
Boolean |
Example: deletes the general journal document
Request
Response
Update a general journal documents
Parameters
Parameter | Type | Description |
---|---|---|
general_journal_document[reference] |
String |
|
general_journal_document[date] |
String |
Required |
general_journal_document[origin] |
String |
Can be |
general_journal_document[journal_type] |
String |
Can be |
general_journal_document[general_journal_document_entries_attributes][id] |
Integer |
|
general_journal_document[general_journal_document_entries_attributes][ledger_account_id] |
Integer |
Should be a valid ledger account id. |
general_journal_document[general_journal_document_entries_attributes][tax_rate_id] |
Integer |
Should be a valid tax rate id. |
general_journal_document[general_journal_document_entries_attributes][description] |
String |
|
general_journal_document[general_journal_document_entries_attributes][debit] |
Decimal |
Both a decimal and a string ‘10,95’ are accepted. |
general_journal_document[general_journal_document_entries_attributes][credit] |
Decimal |
Both a decimal and a string ‘10,95’ are accepted. |
general_journal_document[general_journal_document_entries_attributes][project_id] |
Integer |
Should be a valid project id. |
general_journal_document[general_journal_document_entries_attributes][row_order] |
Integer |
|
general_journal_document[general_journal_document_entries_attributes][_destroy] |
Boolean |
|
general_journal_document[general_journal_document_entries_attributes][contact_id] |
Integer |
Should be a valid contact id. |
all_taxes |
Boolean |
Example: updates the general journal document
Request
Response
Add attachment to general journal 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. |