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
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XGET \
https://moneybird.com/api/v2/123/documents/general_journal_documents/synchronization.json?
Response
Status: 200 OK
[
{
"id": "446241577758623095",
"version": 1739789153
},
{
"id": "446241577801614722",
"version": 1739789153
},
{
"id": "446241577847752077",
"version": 1739789153
}
]
Example: retrieves all ids for synchronization using a filter
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XGET \
https://moneybird.com/api/v2/123/documents/general_journal_documents/synchronization.json?filter=period%3Athis_month
Response
Status: 200 OK
[
{
"id": "446241578093118885",
"version": 1739789153
},
{
"id": "446241578146596272",
"version": 1739789153
},
{
"id": "446241578187490747",
"version": 1739789153
}
]
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
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XPOST \
-d '{"ids":[446241578433906142,446241578480043497]}' \
https://moneybird.com/api/v2/123/documents/general_journal_documents/synchronization.json
Response
Status: 200 OK
[
{
"id": "446241578433906142",
"administration_id": 123,
"reference": "Deprecations",
"date": "2025-02-17",
"journal_type": null,
"created_at": "2025-02-17T10:45:53.985Z",
"updated_at": "2025-02-17T10:45:53.985Z",
"version": 1739789153,
"general_journal_document_entries": [
{
"id": "446241578436003295",
"administration_id": 123,
"ledger_account_id": "446241578406643165",
"project_id": null,
"contact_id": null,
"debit": "100.0",
"credit": "0.0",
"row_order": 1,
"created_at": "2025-02-17T10:45:53.988Z",
"updated_at": "2025-02-17T10:45:53.988Z",
"description": "First"
},
{
"id": "446241578438100448",
"administration_id": 123,
"ledger_account_id": "446241578406643165",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "100.0",
"row_order": 2,
"created_at": "2025-02-17T10:45:53.990Z",
"updated_at": "2025-02-17T10:45:53.990Z",
"description": "Second"
},
{
"id": "446241578439149025",
"administration_id": 123,
"ledger_account_id": "446241578406643165",
"project_id": null,
"contact_id": null,
"debit": "50.0",
"credit": "0.0",
"row_order": 3,
"created_at": "2025-02-17T10:45:53.991Z",
"updated_at": "2025-02-17T10:45:53.991Z",
"description": "Third"
},
{
"id": "446241578440197602",
"administration_id": 123,
"ledger_account_id": "446241578406643165",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "50.0",
"row_order": 4,
"created_at": "2025-02-17T10:45:53.992Z",
"updated_at": "2025-02-17T10:45:53.992Z",
"description": "Fourth"
}
],
"notes": [],
"attachments": [],
"events": [
{
"administration_id": 123,
"user_id": 17397890963220,
"action": "document_saved",
"link_entity_id": null,
"link_entity_type": null,
"data": {},
"created_at": "2025-02-17T10:45:53.995Z",
"updated_at": "2025-02-17T10:45:53.995Z"
}
]
},
{
"id": "446241578480043497",
"administration_id": 123,
"reference": "Deprecations",
"date": "2025-02-17",
"journal_type": null,
"created_at": "2025-02-17T10:45:54.030Z",
"updated_at": "2025-02-17T10:45:54.030Z",
"version": 1739789154,
"general_journal_document_entries": [
{
"id": "446241578481092074",
"administration_id": 123,
"ledger_account_id": "446241578454877672",
"project_id": null,
"contact_id": null,
"debit": "100.0",
"credit": "0.0",
"row_order": 1,
"created_at": "2025-02-17T10:45:54.031Z",
"updated_at": "2025-02-17T10:45:54.031Z",
"description": "First"
},
{
"id": "446241578482140651",
"administration_id": 123,
"ledger_account_id": "446241578454877672",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "100.0",
"row_order": 2,
"created_at": "2025-02-17T10:45:54.032Z",
"updated_at": "2025-02-17T10:45:54.032Z",
"description": "Second"
},
{
"id": "446241578483189228",
"administration_id": 123,
"ledger_account_id": "446241578454877672",
"project_id": null,
"contact_id": null,
"debit": "50.0",
"credit": "0.0",
"row_order": 3,
"created_at": "2025-02-17T10:45:54.033Z",
"updated_at": "2025-02-17T10:45:54.033Z",
"description": "Third"
},
{
"id": "446241578484237805",
"administration_id": 123,
"ledger_account_id": "446241578454877672",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "50.0",
"row_order": 4,
"created_at": "2025-02-17T10:45:54.034Z",
"updated_at": "2025-02-17T10:45:54.034Z",
"description": "Fourth"
}
],
"notes": [],
"attachments": [],
"events": [
{
"administration_id": 123,
"user_id": 17397890963220,
"action": "document_saved",
"link_entity_id": null,
"link_entity_type": null,
"data": {},
"created_at": "2025-02-17T10:45:54.036Z",
"updated_at": "2025-02-17T10:45:54.036Z"
}
]
}
]
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
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XGET \
https://moneybird.com/api/v2/123/documents/general_journal_documents.json?
Response
Status: 200 OK
[
{
"id": "446241571646474148",
"administration_id": 123,
"reference": "Deprecations",
"date": "2025-02-17",
"journal_type": null,
"created_at": "2025-02-17T10:45:47.512Z",
"updated_at": "2025-02-17T10:45:47.512Z",
"version": 1739789147,
"general_journal_document_entries": [
{
"id": "446241571647522725",
"administration_id": 123,
"ledger_account_id": "446241571618162595",
"project_id": null,
"contact_id": null,
"debit": "100.0",
"credit": "0.0",
"row_order": 1,
"created_at": "2025-02-17T10:45:47.514Z",
"updated_at": "2025-02-17T10:45:47.514Z",
"description": "First"
},
{
"id": "446241571648571302",
"administration_id": 123,
"ledger_account_id": "446241571618162595",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "100.0",
"row_order": 2,
"created_at": "2025-02-17T10:45:47.515Z",
"updated_at": "2025-02-17T10:45:47.515Z",
"description": "Second"
},
{
"id": "446241571650668455",
"administration_id": 123,
"ledger_account_id": "446241571618162595",
"project_id": null,
"contact_id": null,
"debit": "50.0",
"credit": "0.0",
"row_order": 3,
"created_at": "2025-02-17T10:45:47.517Z",
"updated_at": "2025-02-17T10:45:47.517Z",
"description": "Third"
},
{
"id": "446241571651717032",
"administration_id": 123,
"ledger_account_id": "446241571618162595",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "50.0",
"row_order": 4,
"created_at": "2025-02-17T10:45:47.518Z",
"updated_at": "2025-02-17T10:45:47.518Z",
"description": "Fourth"
}
],
"notes": [],
"attachments": [],
"events": [
{
"administration_id": 123,
"user_id": 17397890963220,
"action": "document_saved",
"link_entity_id": null,
"link_entity_type": null,
"data": {},
"created_at": "2025-02-17T10:45:47.520Z",
"updated_at": "2025-02-17T10:45:47.520Z"
}
]
},
{
"id": "446241571597191065",
"administration_id": 123,
"reference": "Deprecations",
"date": "2025-02-17",
"journal_type": null,
"created_at": "2025-02-17T10:45:47.466Z",
"updated_at": "2025-02-17T10:45:47.466Z",
"version": 1739789147,
"general_journal_document_entries": [
{
"id": "446241571599288218",
"administration_id": 123,
"ledger_account_id": "446241571569928088",
"project_id": null,
"contact_id": null,
"debit": "100.0",
"credit": "0.0",
"row_order": 1,
"created_at": "2025-02-17T10:45:47.468Z",
"updated_at": "2025-02-17T10:45:47.468Z",
"description": "First"
},
{
"id": "446241571600336795",
"administration_id": 123,
"ledger_account_id": "446241571569928088",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "100.0",
"row_order": 2,
"created_at": "2025-02-17T10:45:47.469Z",
"updated_at": "2025-02-17T10:45:47.469Z",
"description": "Second"
},
{
"id": "446241571602433948",
"administration_id": 123,
"ledger_account_id": "446241571569928088",
"project_id": null,
"contact_id": null,
"debit": "50.0",
"credit": "0.0",
"row_order": 3,
"created_at": "2025-02-17T10:45:47.471Z",
"updated_at": "2025-02-17T10:45:47.471Z",
"description": "Third"
},
{
"id": "446241571603482525",
"administration_id": 123,
"ledger_account_id": "446241571569928088",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "50.0",
"row_order": 4,
"created_at": "2025-02-17T10:45:47.472Z",
"updated_at": "2025-02-17T10:45:47.472Z",
"description": "Fourth"
}
],
"notes": [],
"attachments": [],
"events": [
{
"administration_id": 123,
"user_id": 17397890963220,
"action": "document_saved",
"link_entity_id": null,
"link_entity_type": null,
"data": {},
"created_at": "2025-02-17T10:45:47.474Z",
"updated_at": "2025-02-17T10:45:47.474Z"
}
]
},
{
"id": "446241571550005134",
"administration_id": 123,
"reference": "Deprecations",
"date": "2025-02-17",
"journal_type": null,
"created_at": "2025-02-17T10:45:47.421Z",
"updated_at": "2025-02-17T10:45:47.421Z",
"version": 1739789147,
"general_journal_document_entries": [
{
"id": "446241571552102287",
"administration_id": 123,
"ledger_account_id": "446241571517499277",
"project_id": null,
"contact_id": null,
"debit": "100.0",
"credit": "0.0",
"row_order": 1,
"created_at": "2025-02-17T10:45:47.423Z",
"updated_at": "2025-02-17T10:45:47.423Z",
"description": "First"
},
{
"id": "446241571554199440",
"administration_id": 123,
"ledger_account_id": "446241571517499277",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "100.0",
"row_order": 2,
"created_at": "2025-02-17T10:45:47.425Z",
"updated_at": "2025-02-17T10:45:47.425Z",
"description": "Second"
},
{
"id": "446241571555248017",
"administration_id": 123,
"ledger_account_id": "446241571517499277",
"project_id": null,
"contact_id": null,
"debit": "50.0",
"credit": "0.0",
"row_order": 3,
"created_at": "2025-02-17T10:45:47.426Z",
"updated_at": "2025-02-17T10:45:47.426Z",
"description": "Third"
},
{
"id": "446241571557345170",
"administration_id": 123,
"ledger_account_id": "446241571517499277",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "50.0",
"row_order": 4,
"created_at": "2025-02-17T10:45:47.428Z",
"updated_at": "2025-02-17T10:45:47.428Z",
"description": "Fourth"
}
],
"notes": [],
"attachments": [],
"events": [
{
"administration_id": 123,
"user_id": 17397890963220,
"action": "document_saved",
"link_entity_id": null,
"link_entity_type": null,
"data": {},
"created_at": "2025-02-17T10:45:47.430Z",
"updated_at": "2025-02-17T10:45:47.430Z"
}
]
}
]
Example: returns paginated general journal documents on page 1
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XGET \
https://moneybird.com/api/v2/123/documents/general_journal_documents.json?per_page=1
Response
Status: 200 OK
[
{
"id": "446241572057515997",
"administration_id": 123,
"reference": "Deprecations",
"date": "2025-02-17",
"journal_type": null,
"created_at": "2025-02-17T10:45:47.904Z",
"updated_at": "2025-02-17T10:45:47.904Z",
"version": 1739789147,
"general_journal_document_entries": [
{
"id": "446241572060661726",
"administration_id": 123,
"ledger_account_id": "446241572023961564",
"project_id": null,
"contact_id": null,
"debit": "100.0",
"credit": "0.0",
"row_order": 1,
"created_at": "2025-02-17T10:45:47.907Z",
"updated_at": "2025-02-17T10:45:47.907Z",
"description": "First"
},
{
"id": "446241572061710303",
"administration_id": 123,
"ledger_account_id": "446241572023961564",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "100.0",
"row_order": 2,
"created_at": "2025-02-17T10:45:47.909Z",
"updated_at": "2025-02-17T10:45:47.909Z",
"description": "Second"
},
{
"id": "446241572062758880",
"administration_id": 123,
"ledger_account_id": "446241572023961564",
"project_id": null,
"contact_id": null,
"debit": "50.0",
"credit": "0.0",
"row_order": 3,
"created_at": "2025-02-17T10:45:47.910Z",
"updated_at": "2025-02-17T10:45:47.910Z",
"description": "Third"
},
{
"id": "446241572063807457",
"administration_id": 123,
"ledger_account_id": "446241572023961564",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "50.0",
"row_order": 4,
"created_at": "2025-02-17T10:45:47.911Z",
"updated_at": "2025-02-17T10:45:47.911Z",
"description": "Fourth"
}
],
"notes": [],
"attachments": [],
"events": [
{
"administration_id": 123,
"user_id": 17397890963220,
"action": "document_saved",
"link_entity_id": null,
"link_entity_type": null,
"data": {},
"created_at": "2025-02-17T10:45:47.914Z",
"updated_at": "2025-02-17T10:45:47.914Z"
}
]
}
]
Example: returns paginated general journal documents on page 2
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XGET \
https://moneybird.com/api/v2/123/documents/general_journal_documents.json?page=2&per_page=1
Response
Status: 200 OK
[
{
"id": "446241572612211723",
"administration_id": 123,
"reference": "Deprecations",
"date": "2025-02-17",
"journal_type": null,
"created_at": "2025-02-17T10:45:48.433Z",
"updated_at": "2025-02-17T10:45:48.433Z",
"version": 1739789148,
"general_journal_document_entries": [
{
"id": "446241572616406028",
"administration_id": 123,
"ledger_account_id": "446241572565025802",
"project_id": null,
"contact_id": null,
"debit": "100.0",
"credit": "0.0",
"row_order": 1,
"created_at": "2025-02-17T10:45:48.437Z",
"updated_at": "2025-02-17T10:45:48.437Z",
"description": "First"
},
{
"id": "446241572617454605",
"administration_id": 123,
"ledger_account_id": "446241572565025802",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "100.0",
"row_order": 2,
"created_at": "2025-02-17T10:45:48.439Z",
"updated_at": "2025-02-17T10:45:48.439Z",
"description": "Second"
},
{
"id": "446241572619551758",
"administration_id": 123,
"ledger_account_id": "446241572565025802",
"project_id": null,
"contact_id": null,
"debit": "50.0",
"credit": "0.0",
"row_order": 3,
"created_at": "2025-02-17T10:45:48.441Z",
"updated_at": "2025-02-17T10:45:48.441Z",
"description": "Third"
},
{
"id": "446241572622697487",
"administration_id": 123,
"ledger_account_id": "446241572565025802",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "50.0",
"row_order": 4,
"created_at": "2025-02-17T10:45:48.443Z",
"updated_at": "2025-02-17T10:45:48.443Z",
"description": "Fourth"
}
],
"notes": [],
"attachments": [],
"events": [
{
"administration_id": 123,
"user_id": 17397890963220,
"action": "document_saved",
"link_entity_id": null,
"link_entity_type": null,
"data": {},
"created_at": "2025-02-17T10:45:48.447Z",
"updated_at": "2025-02-17T10:45:48.447Z"
}
]
}
]
Example: returns an error when too many general journal documents are requested
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XGET \
https://moneybird.com/api/v2/123/documents/general_journal_documents.json?per_page=101
Response
Status: 400 Bad Request
{
"error": "Per Page is too big",
"symbolic": {
"per_page": "max"
}
}
Get general journal documents
Example: returns the wanted general_journal_document
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XGET \
https://moneybird.com/api/v2/123/documents/general_journal_documents/446241573442684007.json?
Response
Status: 200 OK
{
"id": "446241573442684007",
"administration_id": 123,
"reference": "Deprecations",
"date": "2025-02-17",
"journal_type": null,
"created_at": "2025-02-17T10:45:49.226Z",
"updated_at": "2025-02-17T10:45:49.226Z",
"version": 1739789149,
"general_journal_document_entries": [
{
"id": "446241573443732584",
"administration_id": 123,
"ledger_account_id": "446241573419615334",
"project_id": null,
"contact_id": null,
"debit": "100.0",
"credit": "0.0",
"row_order": 1,
"created_at": "2025-02-17T10:45:49.227Z",
"updated_at": "2025-02-17T10:45:49.227Z",
"description": "First"
},
{
"id": "446241573444781161",
"administration_id": 123,
"ledger_account_id": "446241573419615334",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "100.0",
"row_order": 2,
"created_at": "2025-02-17T10:45:49.228Z",
"updated_at": "2025-02-17T10:45:49.228Z",
"description": "Second"
},
{
"id": "446241573445829738",
"administration_id": 123,
"ledger_account_id": "446241573419615334",
"project_id": null,
"contact_id": null,
"debit": "50.0",
"credit": "0.0",
"row_order": 3,
"created_at": "2025-02-17T10:45:49.229Z",
"updated_at": "2025-02-17T10:45:49.229Z",
"description": "Third"
},
{
"id": "446241573446878315",
"administration_id": 123,
"ledger_account_id": "446241573419615334",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "50.0",
"row_order": 4,
"created_at": "2025-02-17T10:45:49.230Z",
"updated_at": "2025-02-17T10:45:49.230Z",
"description": "Fourth"
}
],
"notes": [],
"attachments": [],
"events": [
{
"administration_id": 123,
"user_id": 17397890963220,
"action": "document_saved",
"link_entity_id": null,
"link_entity_type": null,
"data": {},
"created_at": "2025-02-17T10:45:49.232Z",
"updated_at": "2025-02-17T10:45:49.232Z"
}
]
}
Example: only returns general_journal_documents
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XGET \
https://moneybird.com/api/v2/123/documents/general_journal_documents/446241573729993846.json?
Response
Status: 404 Not Found
{
"error": "record not found",
"symbolic": {
"id": "not_found"
}
}
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
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XPOST \
-d '{"general_journal_document":{"reference":"foobar","general_journal_document_entries_attributes":{"0":{"ledger_account_id":446241574369625291,"debit":100,"credit":0},"1":{"ledger_account_id":446241574430442712,"debit":0,"credit":100}}}}' \
https://moneybird.com/api/v2/123/documents/general_journal_documents.json
Response
Status: 201 Created
{
"id": "446241574500697306",
"administration_id": 123,
"reference": "foobar",
"date": "2025-02-17",
"journal_type": null,
"created_at": "2025-02-17T10:45:50.234Z",
"updated_at": "2025-02-17T10:45:50.234Z",
"version": 1739789150,
"general_journal_document_entries": [
{
"id": "446241574503843035",
"administration_id": 123,
"ledger_account_id": "446241574369625291",
"project_id": null,
"contact_id": null,
"debit": "100.0",
"credit": "0.0",
"row_order": null,
"created_at": "2025-02-17T10:45:50.237Z",
"updated_at": "2025-02-17T10:45:50.237Z",
"description": null
},
{
"id": "446241574504891612",
"administration_id": 123,
"ledger_account_id": "446241574430442712",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "100.0",
"row_order": null,
"created_at": "2025-02-17T10:45:50.239Z",
"updated_at": "2025-02-17T10:45:50.239Z",
"description": null
}
],
"notes": [],
"attachments": [],
"events": [
{
"administration_id": 123,
"user_id": 17397890963220,
"action": "document_saved",
"link_entity_id": null,
"link_entity_type": null,
"data": {},
"created_at": "2025-02-17T10:45:50.242Z",
"updated_at": "2025-02-17T10:45:50.242Z"
}
]
}
Example: requires all input
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XPOST \
-d '{}' \
https://moneybird.com/api/v2/123/documents/general_journal_documents.json
Response
Status: 400 Bad Request
{
"error": "General Journal Document is required",
"symbolic": {
"general_journal_document": "required"
}
}
Delete a general journal documents
Parameters
Parameter | Type | Description |
---|---|---|
refresh_journal_entries |
Boolean |
Example: deletes the general journal document
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XDELETE \
-d '{}' \
https://moneybird.com/api/v2/123/documents/general_journal_documents/446241575429735745.json
Response
Status: 200 OK
200
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
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XPATCH \
-d '{"general_journal_document":{"reference":"updated reference"}}' \
https://moneybird.com/api/v2/123/documents/general_journal_documents/446241574861407494.json
Response
Status: 200 OK
{
"id": "446241574861407494",
"administration_id": 123,
"reference": "updated reference",
"date": "2025-02-17",
"journal_type": null,
"created_at": "2025-02-17T10:45:50.578Z",
"updated_at": "2025-02-17T10:45:50.652Z",
"version": 1739789150,
"general_journal_document_entries": [
{
"id": "446241574862456071",
"administration_id": 123,
"ledger_account_id": "446241574838338821",
"project_id": null,
"contact_id": null,
"debit": "100.0",
"credit": "0.0",
"row_order": 1,
"created_at": "2025-02-17T10:45:50.580Z",
"updated_at": "2025-02-17T10:45:50.580Z",
"description": "First"
},
{
"id": "446241574863504648",
"administration_id": 123,
"ledger_account_id": "446241574838338821",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "100.0",
"row_order": 2,
"created_at": "2025-02-17T10:45:50.581Z",
"updated_at": "2025-02-17T10:45:50.581Z",
"description": "Second"
},
{
"id": "446241574863504649",
"administration_id": 123,
"ledger_account_id": "446241574838338821",
"project_id": null,
"contact_id": null,
"debit": "50.0",
"credit": "0.0",
"row_order": 3,
"created_at": "2025-02-17T10:45:50.582Z",
"updated_at": "2025-02-17T10:45:50.582Z",
"description": "Third"
},
{
"id": "446241574864553226",
"administration_id": 123,
"ledger_account_id": "446241574838338821",
"project_id": null,
"contact_id": null,
"debit": "0.0",
"credit": "50.0",
"row_order": 4,
"created_at": "2025-02-17T10:45:50.582Z",
"updated_at": "2025-02-17T10:45:50.582Z",
"description": "Fourth"
}
],
"notes": [],
"attachments": [],
"events": [
{
"administration_id": 123,
"user_id": 17397890963220,
"action": "document_saved",
"link_entity_id": null,
"link_entity_type": null,
"data": {},
"created_at": "2025-02-17T10:45:50.584Z",
"updated_at": "2025-02-17T10:45:50.584Z"
},
{
"administration_id": 123,
"user_id": 17397890963220,
"action": "document_updated",
"link_entity_id": null,
"link_entity_type": null,
"data": {},
"created_at": "2025-02-17T10:45:50.653Z",
"updated_at": "2025-02-17T10:45:50.653Z"
}
]
}
Add attachment to general journal document
Example: uploads an attachment
Request
curl -s -H "Content-Type: multipart/mixed" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XPOST \
-F file=@/tmp/upload.pdf \
https://moneybird.com/api/v2/123/documents/general_journal_documents/446241575641548126/attachments.json
Response
Status: 200 OK
200
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
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XDELETE \
-d '{}' \
https://moneybird.com/api/v2/123/documents/general_journal_documents/446241578681370113/attachments/446241578803004939.json
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. |
Example: create a note
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XPOST \
-d '{"note":{"note":"Text of the note","assignee_id":446241573990040737,"todo":true}}' \
https://moneybird.com/api/v2/123/documents/general_journal_documents/446241573970117783/notes.json
Response
Status: 201 Created
{
"id": "446241574051906723",
"administration_id": 123,
"entity_id": "446241573970117783",
"entity_type": "Document",
"user_id": 17397890963220,
"assignee_id": "446241573990040737",
"todo": true,
"note": "Text of the note",
"completed_at": null,
"completed_by_id": null,
"todo_type": null,
"data": {},
"created_at": "2025-02-17T10:45:49.806Z",
"updated_at": "2025-02-17T10:45:49.806Z"
}
Destroys note from entity
Example: destroy a note
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XDELETE \
-d '{}' \
https://moneybird.com/api/v2/123/documents/general_journal_documents/446241574169347251/notes/446241574185075901.json