Financial statements
Create a new financial statement
Creates a new financial statement. Provided financial mutations will be grouped in the statement.
Parameters
Parameter | Type | Description |
---|---|---|
financial_statement[financial_account_id] |
Integer |
Should be a valid financial account id. |
financial_statement[reference] |
String |
Required |
financial_statement[official_date] |
Date |
|
financial_statement[official_balance] |
Decimal |
Both a decimal and a string ‘10,95’ are accepted. Should be a number -1,000,000,000 <= n <= 1,000,000,000. |
financial_statement[importer_key] |
String |
|
financial_statement[financial_mutations_attributes][date] |
Date |
|
financial_statement[financial_mutations_attributes][valutation_date] |
Date |
|
financial_statement[financial_mutations_attributes][message] |
String |
|
financial_statement[financial_mutations_attributes][amount] |
Decimal |
Both a decimal and a string ‘10,95’ are accepted. |
financial_statement[financial_mutations_attributes][code] |
String |
|
financial_statement[financial_mutations_attributes][contra_account_name] |
String |
|
financial_statement[financial_mutations_attributes][contra_account_number] |
String |
|
financial_statement[financial_mutations_attributes][batch_reference] |
String |
|
financial_statement[financial_mutations_attributes][offset] |
Integer |
|
financial_statement[financial_mutations_attributes][account_servicer_transaction_id] |
String |
|
financial_statement[financial_mutations_attributes][account_servicer_metadata] |
Duck |
|
financial_statement[financial_mutations_attributes][adyen_payment_instrument_id] |
Integer |
Should be a valid adyen payment instrument id. |
financial_statement[financial_mutations_attributes][_destroy] |
Boolean |
|
financial_statement[financial_mutations_attributes][smart_transfer] |
Boolean |
Example: creates a financial statement
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XPOST \
-d '{"financial_statement":{"reference":"31012014_ABNAMRO","financial_account_id":446241665809647204,"financial_mutations_attributes":{"1":{"date":"2025-02-17","message":"Foobar 1","amount":100},"2":{"date":"2025-02-17","message":"Foobar 2","amount":200}}}}' \
https://moneybird.com/api/v2/123/financial_statements.json
Response
Status: 201 Created
{
"id": "446241665900873319",
"financial_account_id": "446241665809647204",
"reference": "31012014_ABNAMRO",
"official_date": null,
"official_balance": null,
"importer_service": null,
"financial_mutations": [
{
"id": "446241665902970472",
"administration_id": 123,
"amount": "100.0",
"code": null,
"date": "2025-02-17",
"message": "Foobar 1",
"contra_account_name": null,
"contra_account_number": "",
"state": "unprocessed",
"amount_open": "100.0",
"sepa_fields": null,
"batch_reference": null,
"financial_account_id": "446241665809647204",
"currency": "EUR",
"original_amount": null,
"created_at": "2025-02-17T10:47:17.402Z",
"updated_at": "2025-02-17T10:47:17.402Z",
"version": 1739789237,
"financial_statement_id": "446241665900873319",
"processed_at": null,
"account_servicer_transaction_id": null,
"payments": [],
"ledger_account_bookings": []
},
{
"id": "446241665904019049",
"administration_id": 123,
"amount": "200.0",
"code": null,
"date": "2025-02-17",
"message": "Foobar 2",
"contra_account_name": null,
"contra_account_number": "",
"state": "unprocessed",
"amount_open": "200.0",
"sepa_fields": null,
"batch_reference": null,
"financial_account_id": "446241665809647204",
"currency": "EUR",
"original_amount": null,
"created_at": "2025-02-17T10:47:17.404Z",
"updated_at": "2025-02-17T10:47:17.404Z",
"version": 1739789237,
"financial_statement_id": "446241665900873319",
"processed_at": null,
"account_servicer_transaction_id": null,
"payments": [],
"ledger_account_bookings": []
}
]
}
Delete a financial statement
Example: deletes a financial statement
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XDELETE \
-d '{}' \
https://moneybird.com/api/v2/123/financial_statements/446241666170357362.json
Response
Example: returns a 404 status when the financial statement is not found
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XDELETE \
-d '{}' \
https://moneybird.com/api/v2/123/financial_statements/1564321.json
Response
Status: 404 Not Found
{
"error": "record not found",
"symbolic": {
"id": "not_found"
}
}
Update a financial statement
When updating a financial statement, you only need to provide the information you want to change. Attributes you don’t provide in the request will not be updated.
Parameters
Parameter | Type | Description |
---|---|---|
financial_statement[reference] |
String |
|
financial_statement[official_date] |
String |
|
financial_statement[official_balance] |
Decimal |
Both a decimal and a string ‘10,95’ are accepted. Should be a number -1,000,000,000 <= n <= 1,000,000,000. |
financial_statement[financial_mutations_attributes][id] |
Integer |
|
financial_statement[financial_mutations_attributes][date] |
Date |
|
financial_statement[financial_mutations_attributes][message] |
String |
|
financial_statement[financial_mutations_attributes][amount] |
Decimal |
Both a decimal and a string ‘10,95’ are accepted. |
financial_statement[financial_mutations_attributes][code] |
String |
|
financial_statement[financial_mutations_attributes][contra_account_name] |
String |
|
financial_statement[financial_mutations_attributes][contra_account_number] |
String |
|
financial_statement[financial_mutations_attributes][batch_reference] |
String |
|
financial_statement[financial_mutations_attributes][offset] |
Integer |
|
financial_statement[financial_mutations_attributes][account_servicer_transaction_id] |
String |
|
financial_statement[financial_mutations_attributes][adyen_payment_instrument_id] |
Integer |
Should be a valid adyen payment instrument id. |
financial_statement[financial_mutations_attributes][_destroy] |
Boolean |
Example: updates a financial statement
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XPATCH \
-d '{"financial_statement":{"reference":"new_reference","financial_mutations_attributes":{"0":{"message":"Foobar 1","date":"2025-02-17","amount":100}}}}' \
https://moneybird.com/api/v2/123/financial_statements/446241666554136195.json
Response
Status: 200 OK
{
"id": "446241666554136195",
"financial_account_id": "446241666427258496",
"reference": "new_reference",
"official_date": null,
"official_balance": null,
"importer_service": null,
"financial_mutations": [
{
"id": "446241666557281925",
"administration_id": 123,
"amount": "-20.0",
"code": null,
"date": "2025-02-16",
"message": "Afboeking",
"contra_account_name": "Krant",
"contra_account_number": "CH3608387000001080173",
"state": "unprocessed",
"amount_open": "-20.0",
"sepa_fields": null,
"batch_reference": null,
"financial_account_id": "446241666427258496",
"currency": "EUR",
"original_amount": null,
"created_at": "2025-02-17T10:47:18.026Z",
"updated_at": "2025-02-17T10:47:18.026Z",
"version": 1739789238,
"financial_statement_id": "446241666554136195",
"processed_at": null,
"account_servicer_transaction_id": null,
"payments": [],
"ledger_account_bookings": []
},
{
"id": "446241666555184772",
"administration_id": 123,
"amount": "322.78",
"code": null,
"date": "2025-02-17",
"message": "637034759 B & S CARD SERVICE GMBH\n0001234567EINREICH ABR.280000000\n321 / 333,60 -SERV 10,82 +0%MWST\n0,00 REF VU0251478",
"contra_account_name": "Internetprovider",
"contra_account_number": "BE68539007547034",
"state": "unprocessed",
"amount_open": "322.78",
"sepa_fields": null,
"batch_reference": null,
"financial_account_id": "446241666427258496",
"currency": "EUR",
"original_amount": null,
"created_at": "2025-02-17T10:47:18.024Z",
"updated_at": "2025-02-17T10:47:18.024Z",
"version": 1739789238,
"financial_statement_id": "446241666554136195",
"processed_at": null,
"account_servicer_transaction_id": null,
"payments": [],
"ledger_account_bookings": []
},
{
"id": "446241666689402508",
"administration_id": 123,
"amount": "100.0",
"code": null,
"date": "2025-02-17",
"message": "Foobar 1",
"contra_account_name": null,
"contra_account_number": "",
"state": "unprocessed",
"amount_open": "100.0",
"sepa_fields": null,
"batch_reference": null,
"financial_account_id": "446241666427258496",
"currency": "EUR",
"original_amount": null,
"created_at": "2025-02-17T10:47:18.153Z",
"updated_at": "2025-02-17T10:47:18.153Z",
"version": 1739789238,
"financial_statement_id": "446241666554136195",
"processed_at": null,
"account_servicer_transaction_id": null,
"payments": [],
"ledger_account_bookings": []
}
]
}
Example: returns an error when invalid input is given
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XPATCH \
-d '{"financial_statement":{"reference":""}}' \
https://moneybird.com/api/v2/123/financial_statements/446241666915894939.json
Response
Status: 422 Unprocessable Entity
{
"error": {
"reference": [
"mag niet leeg zijn"
]
}
}
Example: returns a 404 status when the statement is not found
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XPATCH \
-d '{"financial_statement":{"reference":"new_reference","financial_mutations_attributes":{"0":{"message":"Foobar 1","date":"2025-02-17","amount":100}}}}' \
https://moneybird.com/api/v2/123/financial_statements/1564321.json
Response
Status: 404 Not Found
{
"error": "record not found",
"symbolic": {
"id": "not_found"
}
}