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":433546265495602541,"financial_mutations_attributes":{"1":{"date":"2024-09-30","message":"Foobar 1","amount":100},"2":{"date":"2024-09-30","message":"Foobar 2","amount":200}}}}' \
  https://moneybird.com/api/v2/123/financial_statements.json
    

Response

        
          
          Status: 201 Created
        
      
{
  "id": "433546265561662832",
  "financial_account_id": "433546265495602541",
  "reference": "31012014_ABNAMRO",
  "official_date": null,
  "official_balance": null,
  "importer_service": null,
  "financial_mutations": [
    {
      "id": "433546265562711409",
      "administration_id": 123,
      "amount": "100.0",
      "code": null,
      "date": "2024-09-30",
      "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": "433546265495602541",
      "currency": "EUR",
      "original_amount": null,
      "created_at": "2024-09-30T07:39:20.132Z",
      "updated_at": "2024-09-30T07:39:20.132Z",
      "version": 1727681960,
      "financial_statement_id": "433546265561662832",
      "processed_at": null,
      "account_servicer_transaction_id": null,
      "payments": [

      ],
      "ledger_account_bookings": [

      ]
    },
    {
      "id": "433546265564808562",
      "administration_id": 123,
      "amount": "200.0",
      "code": null,
      "date": "2024-09-30",
      "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": "433546265495602541",
      "currency": "EUR",
      "original_amount": null,
      "created_at": "2024-09-30T07:39:20.133Z",
      "updated_at": "2024-09-30T07:39:20.133Z",
      "version": 1727681960,
      "financial_statement_id": "433546265561662832",
      "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/433546265723143543.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":"2024-09-30","amount":100}}}}' \
  https://moneybird.com/api/v2/123/financial_statements/433546266058687872.json
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "433546266058687872",
  "financial_account_id": "433546265960121725",
  "reference": "new_reference",
  "official_date": null,
  "official_balance": null,
  "importer_service": null,
  "financial_mutations": [
    {
      "id": "433546266061833602",
      "administration_id": 123,
      "amount": "-20.0",
      "code": null,
      "date": "2024-09-29",
      "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": "433546265960121725",
      "currency": "EUR",
      "original_amount": null,
      "created_at": "2024-09-30T07:39:20.608Z",
      "updated_at": "2024-09-30T07:39:20.608Z",
      "version": 1727681960,
      "financial_statement_id": "433546266058687872",
      "processed_at": null,
      "account_servicer_transaction_id": null,
      "payments": [

      ],
      "ledger_account_bookings": [

      ]
    },
    {
      "id": "433546266059736449",
      "administration_id": 123,
      "amount": "322.78",
      "code": null,
      "date": "2024-09-30",
      "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": "433546265960121725",
      "currency": "EUR",
      "original_amount": null,
      "created_at": "2024-09-30T07:39:20.606Z",
      "updated_at": "2024-09-30T07:39:20.606Z",
      "version": 1727681960,
      "financial_statement_id": "433546266058687872",
      "processed_at": null,
      "account_servicer_transaction_id": null,
      "payments": [

      ],
      "ledger_account_bookings": [

      ]
    },
    {
      "id": "433546266163545477",
      "administration_id": 123,
      "amount": "100.0",
      "code": null,
      "date": "2024-09-30",
      "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": "433546265960121725",
      "currency": "EUR",
      "original_amount": null,
      "created_at": "2024-09-30T07:39:20.704Z",
      "updated_at": "2024-09-30T07:39:20.704Z",
      "version": 1727681960,
      "financial_statement_id": "433546266058687872",
      "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/433546266333414794.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":"2024-09-30","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"
  }
}