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": "433546205427926784",
    "version": 1727681902
  },
  {
    "id": "433546205482452743",
    "version": 1727681902
  },
  {
    "id": "433546205538027278",
    "version": 1727681902
  }
]
      

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": "433546205760325407",
    "version": 1727681903
  },
  {
    "id": "433546205813802790",
    "version": 1727681903
  },
  {
    "id": "433546205868328749",
    "version": 1727681903
  }
]
      

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":[433546206155638597,433546206230087500]}' \
  https://moneybird.com/api/v2/123/documents/general_journal_documents/synchronization.json
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "433546206155638597",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-09-30",
    "journal_type": null,
    "created_at": "2024-09-30T07:38:23.476Z",
    "updated_at": "2024-09-30T07:38:23.476Z",
    "version": 1727681903,
    "general_journal_document_entries": [
      {
        "id": "433546206164027206",
        "administration_id": 123,
        "ledger_account_id": "433546206102161220",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-09-30T07:38:23.482Z",
        "updated_at": "2024-09-30T07:38:23.482Z",
        "description": "First"
      },
      {
        "id": "433546206168221511",
        "administration_id": 123,
        "ledger_account_id": "433546206102161220",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-09-30T07:38:23.487Z",
        "updated_at": "2024-09-30T07:38:23.487Z",
        "description": "Second"
      },
      {
        "id": "433546206173464392",
        "administration_id": 123,
        "ledger_account_id": "433546206102161220",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-09-30T07:38:23.492Z",
        "updated_at": "2024-09-30T07:38:23.492Z",
        "description": "Third"
      },
      {
        "id": "433546206177658697",
        "administration_id": 123,
        "ledger_account_id": "433546206102161220",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-09-30T07:38:23.496Z",
        "updated_at": "2024-09-30T07:38:23.496Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1727681857838,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-09-30T07:38:23.502Z",
        "updated_at": "2024-09-30T07:38:23.502Z"
      }
    ]
  },
  {
    "id": "433546206230087500",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-09-30",
    "journal_type": null,
    "created_at": "2024-09-30T07:38:23.547Z",
    "updated_at": "2024-09-30T07:38:23.547Z",
    "version": 1727681903,
    "general_journal_document_entries": [
      {
        "id": "433546206232184653",
        "administration_id": 123,
        "ledger_account_id": "433546206195484491",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-09-30T07:38:23.549Z",
        "updated_at": "2024-09-30T07:38:23.549Z",
        "description": "First"
      },
      {
        "id": "433546206233233230",
        "administration_id": 123,
        "ledger_account_id": "433546206195484491",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-09-30T07:38:23.551Z",
        "updated_at": "2024-09-30T07:38:23.551Z",
        "description": "Second"
      },
      {
        "id": "433546206234281807",
        "administration_id": 123,
        "ledger_account_id": "433546206195484491",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-09-30T07:38:23.552Z",
        "updated_at": "2024-09-30T07:38:23.552Z",
        "description": "Third"
      },
      {
        "id": "433546206236378960",
        "administration_id": 123,
        "ledger_account_id": "433546206195484491",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-09-30T07:38:23.553Z",
        "updated_at": "2024-09-30T07:38:23.553Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1727681857838,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-09-30T07:38:23.557Z",
        "updated_at": "2024-09-30T07:38:23.557Z"
      }
    ]
  }
]
      

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: key1:value1,key2:value2.

new_filter String

String terms, example: key1:value1,key2:value2.

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": "433546199923951041",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-09-30",
    "journal_type": null,
    "created_at": "2024-09-30T07:38:17.533Z",
    "updated_at": "2024-09-30T07:38:17.533Z",
    "version": 1727681897,
    "general_journal_document_entries": [
      {
        "id": "433546199929193922",
        "administration_id": 123,
        "ledger_account_id": "433546199884105152",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-09-30T07:38:17.537Z",
        "updated_at": "2024-09-30T07:38:17.537Z",
        "description": "First"
      },
      {
        "id": "433546199932339651",
        "administration_id": 123,
        "ledger_account_id": "433546199884105152",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-09-30T07:38:17.541Z",
        "updated_at": "2024-09-30T07:38:17.541Z",
        "description": "Second"
      },
      {
        "id": "433546199933388228",
        "administration_id": 123,
        "ledger_account_id": "433546199884105152",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-09-30T07:38:17.543Z",
        "updated_at": "2024-09-30T07:38:17.543Z",
        "description": "Third"
      },
      {
        "id": "433546199936533957",
        "administration_id": 123,
        "ledger_account_id": "433546199884105152",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-09-30T07:38:17.545Z",
        "updated_at": "2024-09-30T07:38:17.545Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1727681857838,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-09-30T07:38:17.550Z",
        "updated_at": "2024-09-30T07:38:17.550Z"
      }
    ]
  },
  {
    "id": "433546199864182202",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-09-30",
    "journal_type": null,
    "created_at": "2024-09-30T07:38:17.476Z",
    "updated_at": "2024-09-30T07:38:17.476Z",
    "version": 1727681897,
    "general_journal_document_entries": [
      {
        "id": "433546199866279355",
        "administration_id": 123,
        "ledger_account_id": "433546199833773497",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-09-30T07:38:17.479Z",
        "updated_at": "2024-09-30T07:38:17.479Z",
        "description": "First"
      },
      {
        "id": "433546199868376508",
        "administration_id": 123,
        "ledger_account_id": "433546199833773497",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-09-30T07:38:17.480Z",
        "updated_at": "2024-09-30T07:38:17.480Z",
        "description": "Second"
      },
      {
        "id": "433546199869425085",
        "administration_id": 123,
        "ledger_account_id": "433546199833773497",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-09-30T07:38:17.482Z",
        "updated_at": "2024-09-30T07:38:17.482Z",
        "description": "Third"
      },
      {
        "id": "433546199870473662",
        "administration_id": 123,
        "ledger_account_id": "433546199833773497",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-09-30T07:38:17.483Z",
        "updated_at": "2024-09-30T07:38:17.483Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1727681857838,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-09-30T07:38:17.485Z",
        "updated_at": "2024-09-30T07:38:17.485Z"
      }
    ]
  },
  {
    "id": "433546199813850547",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-09-30",
    "journal_type": null,
    "created_at": "2024-09-30T07:38:17.429Z",
    "updated_at": "2024-09-30T07:38:17.429Z",
    "version": 1727681897,
    "general_journal_document_entries": [
      {
        "id": "433546199815947700",
        "administration_id": 123,
        "ledger_account_id": "433546199782393266",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-09-30T07:38:17.431Z",
        "updated_at": "2024-09-30T07:38:17.431Z",
        "description": "First"
      },
      {
        "id": "433546199818044853",
        "administration_id": 123,
        "ledger_account_id": "433546199782393266",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-09-30T07:38:17.433Z",
        "updated_at": "2024-09-30T07:38:17.433Z",
        "description": "Second"
      },
      {
        "id": "433546199819093430",
        "administration_id": 123,
        "ledger_account_id": "433546199782393266",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-09-30T07:38:17.434Z",
        "updated_at": "2024-09-30T07:38:17.434Z",
        "description": "Third"
      },
      {
        "id": "433546199820142007",
        "administration_id": 123,
        "ledger_account_id": "433546199782393266",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-09-30T07:38:17.435Z",
        "updated_at": "2024-09-30T07:38:17.435Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1727681857838,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-09-30T07:38:17.438Z",
        "updated_at": "2024-09-30T07:38:17.438Z"
      }
    ]
  }
]
      

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": "433546200326604263",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-09-30",
    "journal_type": null,
    "created_at": "2024-09-30T07:38:17.917Z",
    "updated_at": "2024-09-30T07:38:17.917Z",
    "version": 1727681897,
    "general_journal_document_entries": [
      {
        "id": "433546200327652840",
        "administration_id": 123,
        "ledger_account_id": "433546200293049830",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-09-30T07:38:17.919Z",
        "updated_at": "2024-09-30T07:38:17.919Z",
        "description": "First"
      },
      {
        "id": "433546200329749993",
        "administration_id": 123,
        "ledger_account_id": "433546200293049830",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-09-30T07:38:17.920Z",
        "updated_at": "2024-09-30T07:38:17.920Z",
        "description": "Second"
      },
      {
        "id": "433546200330798570",
        "administration_id": 123,
        "ledger_account_id": "433546200293049830",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-09-30T07:38:17.922Z",
        "updated_at": "2024-09-30T07:38:17.922Z",
        "description": "Third"
      },
      {
        "id": "433546200332895723",
        "administration_id": 123,
        "ledger_account_id": "433546200293049830",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-09-30T07:38:17.923Z",
        "updated_at": "2024-09-30T07:38:17.923Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1727681857838,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-09-30T07:38:17.926Z",
        "updated_at": "2024-09-30T07:38:17.926Z"
      }
    ]
  }
]
      

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": "433546200645371398",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-09-30",
    "journal_type": null,
    "created_at": "2024-09-30T07:38:18.222Z",
    "updated_at": "2024-09-30T07:38:18.222Z",
    "version": 1727681898,
    "general_journal_document_entries": [
      {
        "id": "433546200647468551",
        "administration_id": 123,
        "ledger_account_id": "433546200616011269",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-09-30T07:38:18.224Z",
        "updated_at": "2024-09-30T07:38:18.224Z",
        "description": "First"
      },
      {
        "id": "433546200648517128",
        "administration_id": 123,
        "ledger_account_id": "433546200616011269",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-09-30T07:38:18.225Z",
        "updated_at": "2024-09-30T07:38:18.225Z",
        "description": "Second"
      },
      {
        "id": "433546200649565705",
        "administration_id": 123,
        "ledger_account_id": "433546200616011269",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-09-30T07:38:18.226Z",
        "updated_at": "2024-09-30T07:38:18.226Z",
        "description": "Third"
      },
      {
        "id": "433546200651662858",
        "administration_id": 123,
        "ledger_account_id": "433546200616011269",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-09-30T07:38:18.227Z",
        "updated_at": "2024-09-30T07:38:18.227Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1727681857838,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-09-30T07:38:18.230Z",
        "updated_at": "2024-09-30T07:38:18.230Z"
      }
    ]
  }
]
      

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/433546201289197124.json?
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "433546201289197124",
  "administration_id": 123,
  "reference": "Deprecations",
  "date": "2024-09-30",
  "journal_type": null,
  "created_at": "2024-09-30T07:38:18.835Z",
  "updated_at": "2024-09-30T07:38:18.835Z",
  "version": 1727681898,
  "general_journal_document_entries": [
    {
      "id": "433546201291294277",
      "administration_id": 123,
      "ledger_account_id": "433546201256691267",
      "project_id": null,
      "contact_id": null,
      "debit": "100.0",
      "credit": "0.0",
      "row_order": 1,
      "created_at": "2024-09-30T07:38:18.837Z",
      "updated_at": "2024-09-30T07:38:18.837Z",
      "description": "First"
    },
    {
      "id": "433546201292342854",
      "administration_id": 123,
      "ledger_account_id": "433546201256691267",
      "project_id": null,
      "contact_id": null,
      "debit": "0.0",
      "credit": "100.0",
      "row_order": 2,
      "created_at": "2024-09-30T07:38:18.839Z",
      "updated_at": "2024-09-30T07:38:18.839Z",
      "description": "Second"
    },
    {
      "id": "433546201293391431",
      "administration_id": 123,
      "ledger_account_id": "433546201256691267",
      "project_id": null,
      "contact_id": null,
      "debit": "50.0",
      "credit": "0.0",
      "row_order": 3,
      "created_at": "2024-09-30T07:38:18.840Z",
      "updated_at": "2024-09-30T07:38:18.840Z",
      "description": "Third"
    },
    {
      "id": "433546201294440008",
      "administration_id": 123,
      "ledger_account_id": "433546201256691267",
      "project_id": null,
      "contact_id": null,
      "debit": "0.0",
      "credit": "50.0",
      "row_order": 4,
      "created_at": "2024-09-30T07:38:18.841Z",
      "updated_at": "2024-09-30T07:38:18.841Z",
      "description": "Fourth"
    }
  ],
  "notes": [

  ],
  "attachments": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1727681857838,
      "action": "document_saved",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
      },
      "created_at": "2024-09-30T07:38:18.844Z",
      "updated_at": "2024-09-30T07:38:18.844Z"
    }
  ]
}
      

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/433546201451726415.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 api, upload, endpoint, si, si_local, si_peppol, email or moneybird_bv.

general_journal_document[journal_type] String

Can be ["fiscal_year_ending", "fiscal_year_ending"].

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":433546202168952460,"debit":100,"credit":0},"1":{"ledger_account_id":433546202244449941,"debit":0,"credit":100}}}}' \
  https://moneybird.com/api/v2/123/documents/general_journal_documents.json
    

Response

        
          
          Status: 201 Created
        
      
{
  "id": "433546202320995991",
  "administration_id": 123,
  "reference": "foobar",
  "date": "2024-09-30",
  "journal_type": null,
  "created_at": "2024-09-30T07:38:19.820Z",
  "updated_at": "2024-09-30T07:38:19.820Z",
  "version": 1727681899,
  "general_journal_document_entries": [
    {
      "id": "433546202323093144",
      "administration_id": 123,
      "ledger_account_id": "433546202168952460",
      "project_id": null,
      "contact_id": null,
      "debit": "100.0",
      "credit": "0.0",
      "row_order": null,
      "created_at": "2024-09-30T07:38:19.821Z",
      "updated_at": "2024-09-30T07:38:19.821Z",
      "description": null
    },
    {
      "id": "433546202324141721",
      "administration_id": 123,
      "ledger_account_id": "433546202244449941",
      "project_id": null,
      "contact_id": null,
      "debit": "0.0",
      "credit": "100.0",
      "row_order": null,
      "created_at": "2024-09-30T07:38:19.823Z",
      "updated_at": "2024-09-30T07:38:19.823Z",
      "description": null
    }
  ],
  "notes": [

  ],
  "attachments": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1727681857838,
      "action": "document_saved",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
      },
      "created_at": "2024-09-30T07:38:19.826Z",
      "updated_at": "2024-09-30T07:38:19.826Z"
    }
  ]
}
      

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/433546203323434716.json
    

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 api, upload, endpoint, si, si_local, si_peppol, email or moneybird_bv.

general_journal_document[journal_type] String

Can be ["fiscal_year_ending", "fiscal_year_ending"].

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/433546202783418039.json
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "433546202783418039",
  "administration_id": 123,
  "reference": "updated reference",
  "date": "2024-09-30",
  "journal_type": null,
  "created_at": "2024-09-30T07:38:20.260Z",
  "updated_at": "2024-09-30T07:38:20.373Z",
  "version": 1727681900,
  "general_journal_document_entries": [
    {
      "id": "433546202785515192",
      "administration_id": 123,
      "ledger_account_id": "433546202707920566",
      "project_id": null,
      "contact_id": null,
      "debit": "100.0",
      "credit": "0.0",
      "row_order": 1,
      "created_at": "2024-09-30T07:38:20.263Z",
      "updated_at": "2024-09-30T07:38:20.263Z",
      "description": "First"
    },
    {
      "id": "433546202788660921",
      "administration_id": 123,
      "ledger_account_id": "433546202707920566",
      "project_id": null,
      "contact_id": null,
      "debit": "0.0",
      "credit": "100.0",
      "row_order": 2,
      "created_at": "2024-09-30T07:38:20.265Z",
      "updated_at": "2024-09-30T07:38:20.265Z",
      "description": "Second"
    },
    {
      "id": "433546202790758074",
      "administration_id": 123,
      "ledger_account_id": "433546202707920566",
      "project_id": null,
      "contact_id": null,
      "debit": "50.0",
      "credit": "0.0",
      "row_order": 3,
      "created_at": "2024-09-30T07:38:20.267Z",
      "updated_at": "2024-09-30T07:38:20.267Z",
      "description": "Third"
    },
    {
      "id": "433546202792855227",
      "administration_id": 123,
      "ledger_account_id": "433546202707920566",
      "project_id": null,
      "contact_id": null,
      "debit": "0.0",
      "credit": "50.0",
      "row_order": 4,
      "created_at": "2024-09-30T07:38:20.269Z",
      "updated_at": "2024-09-30T07:38:20.269Z",
      "description": "Fourth"
    }
  ],
  "notes": [

  ],
  "attachments": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1727681857838,
      "action": "document_saved",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
      },
      "created_at": "2024-09-30T07:38:20.277Z",
      "updated_at": "2024-09-30T07:38:20.277Z"
    },
    {
      "administration_id": 123,
      "user_id": 1727681857838,
      "action": "document_updated",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
      },
      "created_at": "2024-09-30T07:38:20.376Z",
      "updated_at": "2024-09-30T07:38:20.376Z"
    }
  ]
}
      

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/433546203561461486/attachments.json
    

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

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XDELETE \
  -d '{}' \
  https://moneybird.com/api/v2/123/documents/general_journal_documents/433546206471259997/attachments/433546206577166179.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 true the note is a to-do.

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":433546201748473452,"todo":true}}' \
  https://moneybird.com/api/v2/123/documents/general_journal_documents/433546201720161894/notes.json
    

Response

        
          
          Status: 201 Created
        
      
{
  "id": "433546201821873774",
  "administration_id": 123,
  "entity_id": "433546201720161894",
  "entity_type": "Document",
  "user_id": 1727681857838,
  "assignee_id": "433546201748473452",
  "todo": true,
  "note": "Text of the note",
  "completed_at": null,
  "completed_by_id": null,
  "todo_type": null,
  "data": {
  },
  "created_at": "2024-09-30T07:38:19.343Z",
  "updated_at": "2024-09-30T07:38:19.343Z"
}
      

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/433546201986500219/notes/433546202006423169.json
    

Response