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": "426664108684740028",
    "version": 1721118623
  },
  {
    "id": "426664108764431811",
    "version": 1721118623
  },
  {
    "id": "426664108842026442",
    "version": 1721118624
  }
]
      

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": "426664109068518875",
    "version": 1721118624
  },
  {
    "id": "426664109134579170",
    "version": 1721118624
  },
  {
    "id": "426664109207979497",
    "version": 1721118624
  }
]
      

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

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "426664109491095048",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-07-16",
    "journal_type": null,
    "created_at": "2024-07-16T08:30:24.674Z",
    "updated_at": "2024-07-16T08:30:24.674Z",
    "version": 1721118624,
    "general_journal_document_entries": [
      {
        "id": "426664109492143625",
        "administration_id": 123,
        "ledger_account_id": "426664109469074951",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-07-16T08:30:24.676Z",
        "updated_at": "2024-07-16T08:30:24.676Z",
        "description": "First"
      },
      {
        "id": "426664109493192202",
        "administration_id": 123,
        "ledger_account_id": "426664109469074951",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-07-16T08:30:24.677Z",
        "updated_at": "2024-07-16T08:30:24.677Z",
        "description": "Second"
      },
      {
        "id": "426664109494240779",
        "administration_id": 123,
        "ledger_account_id": "426664109469074951",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-07-16T08:30:24.678Z",
        "updated_at": "2024-07-16T08:30:24.678Z",
        "description": "Third"
      },
      {
        "id": "426664109495289356",
        "administration_id": 123,
        "ledger_account_id": "426664109469074951",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-07-16T08:30:24.678Z",
        "updated_at": "2024-07-16T08:30:24.678Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 17211185545521,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-07-16T08:30:24.680Z",
        "updated_at": "2024-07-16T08:30:24.680Z"
      }
    ]
  },
  {
    "id": "426664109452297729",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-07-16",
    "journal_type": null,
    "created_at": "2024-07-16T08:30:24.637Z",
    "updated_at": "2024-07-16T08:30:24.637Z",
    "version": 1721118624,
    "general_journal_document_entries": [
      {
        "id": "426664109454394882",
        "administration_id": 123,
        "ledger_account_id": "426664109415597568",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-07-16T08:30:24.639Z",
        "updated_at": "2024-07-16T08:30:24.639Z",
        "description": "First"
      },
      {
        "id": "426664109456492035",
        "administration_id": 123,
        "ledger_account_id": "426664109415597568",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-07-16T08:30:24.641Z",
        "updated_at": "2024-07-16T08:30:24.641Z",
        "description": "Second"
      },
      {
        "id": "426664109457540612",
        "administration_id": 123,
        "ledger_account_id": "426664109415597568",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-07-16T08:30:24.643Z",
        "updated_at": "2024-07-16T08:30:24.643Z",
        "description": "Third"
      },
      {
        "id": "426664109458589189",
        "administration_id": 123,
        "ledger_account_id": "426664109415597568",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-07-16T08:30:24.643Z",
        "updated_at": "2024-07-16T08:30:24.643Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 17211185545521,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-07-16T08:30:24.646Z",
        "updated_at": "2024-07-16T08:30:24.646Z"
      }
    ]
  }
]
      

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": "426664094674715773",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-07-16",
    "journal_type": null,
    "created_at": "2024-07-16T08:30:10.544Z",
    "updated_at": "2024-07-16T08:30:10.544Z",
    "version": 1721118610,
    "general_journal_document_entries": [
      {
        "id": "426664094675764350",
        "administration_id": 123,
        "ledger_account_id": "426664094646404220",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-07-16T08:30:10.546Z",
        "updated_at": "2024-07-16T08:30:10.546Z",
        "description": "First"
      },
      {
        "id": "426664094676812927",
        "administration_id": 123,
        "ledger_account_id": "426664094646404220",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-07-16T08:30:10.547Z",
        "updated_at": "2024-07-16T08:30:10.547Z",
        "description": "Second"
      },
      {
        "id": "426664094678910080",
        "administration_id": 123,
        "ledger_account_id": "426664094646404220",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-07-16T08:30:10.548Z",
        "updated_at": "2024-07-16T08:30:10.548Z",
        "description": "Third"
      },
      {
        "id": "426664094679958657",
        "administration_id": 123,
        "ledger_account_id": "426664094646404220",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-07-16T08:30:10.549Z",
        "updated_at": "2024-07-16T08:30:10.549Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 17211185545521,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-07-16T08:30:10.552Z",
        "updated_at": "2024-07-16T08:30:10.552Z"
      }
    ]
  },
  {
    "id": "426664094630675574",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-07-16",
    "journal_type": null,
    "created_at": "2024-07-16T08:30:10.502Z",
    "updated_at": "2024-07-16T08:30:10.502Z",
    "version": 1721118610,
    "general_journal_document_entries": [
      {
        "id": "426664094632772727",
        "administration_id": 123,
        "ledger_account_id": "426664094604461173",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-07-16T08:30:10.504Z",
        "updated_at": "2024-07-16T08:30:10.504Z",
        "description": "First"
      },
      {
        "id": "426664094633821304",
        "administration_id": 123,
        "ledger_account_id": "426664094604461173",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-07-16T08:30:10.505Z",
        "updated_at": "2024-07-16T08:30:10.505Z",
        "description": "Second"
      },
      {
        "id": "426664094634869881",
        "administration_id": 123,
        "ledger_account_id": "426664094604461173",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-07-16T08:30:10.506Z",
        "updated_at": "2024-07-16T08:30:10.506Z",
        "description": "Third"
      },
      {
        "id": "426664094634869882",
        "administration_id": 123,
        "ledger_account_id": "426664094604461173",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-07-16T08:30:10.507Z",
        "updated_at": "2024-07-16T08:30:10.507Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 17211185545521,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-07-16T08:30:10.509Z",
        "updated_at": "2024-07-16T08:30:10.509Z"
      }
    ]
  },
  {
    "id": "426664094587683951",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-07-16",
    "journal_type": null,
    "created_at": "2024-07-16T08:30:10.461Z",
    "updated_at": "2024-07-16T08:30:10.461Z",
    "version": 1721118610,
    "general_journal_document_entries": [
      {
        "id": "426664094589781104",
        "administration_id": 123,
        "ledger_account_id": "426664094562518126",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-07-16T08:30:10.463Z",
        "updated_at": "2024-07-16T08:30:10.463Z",
        "description": "First"
      },
      {
        "id": "426664094590829681",
        "administration_id": 123,
        "ledger_account_id": "426664094562518126",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-07-16T08:30:10.465Z",
        "updated_at": "2024-07-16T08:30:10.465Z",
        "description": "Second"
      },
      {
        "id": "426664094591878258",
        "administration_id": 123,
        "ledger_account_id": "426664094562518126",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-07-16T08:30:10.466Z",
        "updated_at": "2024-07-16T08:30:10.466Z",
        "description": "Third"
      },
      {
        "id": "426664094592926835",
        "administration_id": 123,
        "ledger_account_id": "426664094562518126",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-07-16T08:30:10.467Z",
        "updated_at": "2024-07-16T08:30:10.467Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 17211185545521,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-07-16T08:30:10.469Z",
        "updated_at": "2024-07-16T08:30:10.469Z"
      }
    ]
  }
]
      

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": "426664094967268515",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-07-16",
    "journal_type": null,
    "created_at": "2024-07-16T08:30:10.823Z",
    "updated_at": "2024-07-16T08:30:10.823Z",
    "version": 1721118610,
    "general_journal_document_entries": [
      {
        "id": "426664094968317092",
        "administration_id": 123,
        "ledger_account_id": "426664094937908386",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-07-16T08:30:10.825Z",
        "updated_at": "2024-07-16T08:30:10.825Z",
        "description": "First"
      },
      {
        "id": "426664094970414245",
        "administration_id": 123,
        "ledger_account_id": "426664094937908386",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-07-16T08:30:10.826Z",
        "updated_at": "2024-07-16T08:30:10.826Z",
        "description": "Second"
      },
      {
        "id": "426664094971462822",
        "administration_id": 123,
        "ledger_account_id": "426664094937908386",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-07-16T08:30:10.828Z",
        "updated_at": "2024-07-16T08:30:10.828Z",
        "description": "Third"
      },
      {
        "id": "426664094972511399",
        "administration_id": 123,
        "ledger_account_id": "426664094937908386",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-07-16T08:30:10.829Z",
        "updated_at": "2024-07-16T08:30:10.829Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 17211185545521,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-07-16T08:30:10.831Z",
        "updated_at": "2024-07-16T08:30:10.831Z"
      }
    ]
  }
]
      

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": "426664095556568258",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2024-07-16",
    "journal_type": null,
    "created_at": "2024-07-16T08:30:11.382Z",
    "updated_at": "2024-07-16T08:30:11.382Z",
    "version": 1721118611,
    "general_journal_document_entries": [
      {
        "id": "426664095560762563",
        "administration_id": 123,
        "ledger_account_id": "426664095452759233",
        "project_id": null,
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": 1,
        "created_at": "2024-07-16T08:30:11.389Z",
        "updated_at": "2024-07-16T08:30:11.389Z",
        "description": "First"
      },
      {
        "id": "426664095563908292",
        "administration_id": 123,
        "ledger_account_id": "426664095452759233",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": 2,
        "created_at": "2024-07-16T08:30:11.392Z",
        "updated_at": "2024-07-16T08:30:11.392Z",
        "description": "Second"
      },
      {
        "id": "426664095568102597",
        "administration_id": 123,
        "ledger_account_id": "426664095452759233",
        "project_id": null,
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": 3,
        "created_at": "2024-07-16T08:30:11.395Z",
        "updated_at": "2024-07-16T08:30:11.395Z",
        "description": "Third"
      },
      {
        "id": "426664095572296902",
        "administration_id": 123,
        "ledger_account_id": "426664095452759233",
        "project_id": null,
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": 4,
        "created_at": "2024-07-16T08:30:11.400Z",
        "updated_at": "2024-07-16T08:30:11.400Z",
        "description": "Fourth"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 17211185545521,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": {
        },
        "created_at": "2024-07-16T08:30:11.406Z",
        "updated_at": "2024-07-16T08:30:11.406Z"
      }
    ]
  }
]
      

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

Response

        
          
          Status: 200 OK
        
      
{
  "id": "426664096466732288",
  "administration_id": 123,
  "reference": "Deprecations",
  "date": "2024-07-16",
  "journal_type": null,
  "created_at": "2024-07-16T08:30:12.254Z",
  "updated_at": "2024-07-16T08:30:12.254Z",
  "version": 1721118612,
  "general_journal_document_entries": [
    {
      "id": "426664096468829441",
      "administration_id": 123,
      "ledger_account_id": "426664096443663615",
      "project_id": null,
      "contact_id": null,
      "debit": "100.0",
      "credit": "0.0",
      "row_order": 1,
      "created_at": "2024-07-16T08:30:12.255Z",
      "updated_at": "2024-07-16T08:30:12.255Z",
      "description": "First"
    },
    {
      "id": "426664096469878018",
      "administration_id": 123,
      "ledger_account_id": "426664096443663615",
      "project_id": null,
      "contact_id": null,
      "debit": "0.0",
      "credit": "100.0",
      "row_order": 2,
      "created_at": "2024-07-16T08:30:12.257Z",
      "updated_at": "2024-07-16T08:30:12.257Z",
      "description": "Second"
    },
    {
      "id": "426664096470926595",
      "administration_id": 123,
      "ledger_account_id": "426664096443663615",
      "project_id": null,
      "contact_id": null,
      "debit": "50.0",
      "credit": "0.0",
      "row_order": 3,
      "created_at": "2024-07-16T08:30:12.257Z",
      "updated_at": "2024-07-16T08:30:12.257Z",
      "description": "Third"
    },
    {
      "id": "426664096471975172",
      "administration_id": 123,
      "ledger_account_id": "426664096443663615",
      "project_id": null,
      "contact_id": null,
      "debit": "0.0",
      "credit": "50.0",
      "row_order": 4,
      "created_at": "2024-07-16T08:30:12.258Z",
      "updated_at": "2024-07-16T08:30:12.258Z",
      "description": "Fourth"
    }
  ],
  "notes": [

  ],
  "attachments": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 17211185545521,
      "action": "document_saved",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
      },
      "created_at": "2024-07-16T08:30:12.260Z",
      "updated_at": "2024-07-16T08:30:12.260Z"
    }
  ]
}
      

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

Response

        
          
          Status: 201 Created
        
      
{
  "id": "426664097320273235",
  "administration_id": 123,
  "reference": "foobar",
  "date": "2024-07-16",
  "journal_type": null,
  "created_at": "2024-07-16T08:30:13.067Z",
  "updated_at": "2024-07-16T08:30:13.067Z",
  "version": 1721118613,
  "general_journal_document_entries": [
    {
      "id": "426664097322370388",
      "administration_id": 123,
      "ledger_account_id": "426664097213318472",
      "project_id": null,
      "contact_id": null,
      "debit": "100.0",
      "credit": "0.0",
      "row_order": null,
      "created_at": "2024-07-16T08:30:13.070Z",
      "updated_at": "2024-07-16T08:30:13.070Z",
      "description": null
    },
    {
      "id": "426664097324467541",
      "administration_id": 123,
      "ledger_account_id": "426664097253164369",
      "project_id": null,
      "contact_id": null,
      "debit": "0.0",
      "credit": "100.0",
      "row_order": null,
      "created_at": "2024-07-16T08:30:13.071Z",
      "updated_at": "2024-07-16T08:30:13.071Z",
      "description": null
    }
  ],
  "notes": [

  ],
  "attachments": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 17211185545521,
      "action": "document_saved",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
      },
      "created_at": "2024-07-16T08:30:13.074Z",
      "updated_at": "2024-07-16T08:30:13.074Z"
    }
  ]
}
      

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/426664098032256408.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/426664097621214579.json
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "426664097621214579",
  "administration_id": 123,
  "reference": "updated reference",
  "date": "2024-07-16",
  "journal_type": null,
  "created_at": "2024-07-16T08:30:13.355Z",
  "updated_at": "2024-07-16T08:30:13.423Z",
  "version": 1721118613,
  "general_journal_document_entries": [
    {
      "id": "426664097623311732",
      "administration_id": 123,
      "ledger_account_id": "426664097600243058",
      "project_id": null,
      "contact_id": null,
      "debit": "100.0",
      "credit": "0.0",
      "row_order": 1,
      "created_at": "2024-07-16T08:30:13.356Z",
      "updated_at": "2024-07-16T08:30:13.356Z",
      "description": "First"
    },
    {
      "id": "426664097624360309",
      "administration_id": 123,
      "ledger_account_id": "426664097600243058",
      "project_id": null,
      "contact_id": null,
      "debit": "0.0",
      "credit": "100.0",
      "row_order": 2,
      "created_at": "2024-07-16T08:30:13.357Z",
      "updated_at": "2024-07-16T08:30:13.357Z",
      "description": "Second"
    },
    {
      "id": "426664097625408886",
      "administration_id": 123,
      "ledger_account_id": "426664097600243058",
      "project_id": null,
      "contact_id": null,
      "debit": "50.0",
      "credit": "0.0",
      "row_order": 3,
      "created_at": "2024-07-16T08:30:13.358Z",
      "updated_at": "2024-07-16T08:30:13.358Z",
      "description": "Third"
    },
    {
      "id": "426664097627506039",
      "administration_id": 123,
      "ledger_account_id": "426664097600243058",
      "project_id": null,
      "contact_id": null,
      "debit": "0.0",
      "credit": "50.0",
      "row_order": 4,
      "created_at": "2024-07-16T08:30:13.360Z",
      "updated_at": "2024-07-16T08:30:13.360Z",
      "description": "Fourth"
    }
  ],
  "notes": [

  ],
  "attachments": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 17211185545521,
      "action": "document_saved",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
      },
      "created_at": "2024-07-16T08:30:13.362Z",
      "updated_at": "2024-07-16T08:30:13.362Z"
    },
    {
      "administration_id": 123,
      "user_id": 17211185545521,
      "action": "document_updated",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
      },
      "created_at": "2024-07-16T08:30:13.425Z",
      "updated_at": "2024-07-16T08:30:13.425Z"
    }
  ]
}
      

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/426664098230437290/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/426664109672498713/attachments/426664109806716447.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":426664096883017000,"todo":true}}' \
  https://moneybird.com/api/v2/123/documents/general_journal_documents/426664096865191202/notes.json
    

Response

        
          
          Status: 201 Created
        
      
{
  "id": "426664096939640106",
  "administration_id": 123,
  "entity_id": "426664096865191202",
  "entity_type": "Document",
  "user_id": 17211185545521,
  "assignee_id": "426664096883017000",
  "todo": true,
  "note": "Text of the note",
  "completed_at": null,
  "completed_by_id": null,
  "todo_type": null,
  "data": {
  },
  "created_at": "2024-07-16T08:30:12.703Z",
  "updated_at": "2024-07-16T08:30:12.703Z"
}
      

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/426664097067566391/notes/426664097084343613.json
    

Response