Documents: General documents

List ids and versions of general 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_documents/synchronization.json?
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "433546198279783764",
    "version": 1727681895
  },
  {
    "id": "433546198289220950",
    "version": 1727681895
  },
  {
    "id": "433546198302852440",
    "version": 1727681895
  }
]
      

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_documents/synchronization.json?filter=period%3Athis_month
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "433546198467478882",
    "version": 1727681896
  },
  {
    "id": "433546198476916068",
    "version": 1727681896
  },
  {
    "id": "433546198486353254",
    "version": 1727681896
  }
]
      

Fetch general 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":[433546198639445362,433546198649931124]}' \
  https://moneybird.com/api/v2/123/documents/general_documents/synchronization.json
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "433546198639445362",
    "administration_id": 123,
    "contact_id": null,
    "contact": null,
    "reference": "Contract",
    "date": "2024-09-30",
    "due_date": null,
    "entry_number": 3,
    "state": "saved",
    "exchange_rate": "1.0",
    "created_at": "2024-09-30T07:38:16.309Z",
    "updated_at": "2024-09-30T07:38:16.309Z",
    "version": 1727681896,
    "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:16.312Z",
        "updated_at": "2024-09-30T07:38:16.312Z"
      }
    ]
  },
  {
    "id": "433546198649931124",
    "administration_id": 123,
    "contact_id": null,
    "contact": null,
    "reference": "Contract",
    "date": "2024-09-30",
    "due_date": null,
    "entry_number": 4,
    "state": "saved",
    "exchange_rate": "1.0",
    "created_at": "2024-09-30T07:38:16.319Z",
    "updated_at": "2024-09-30T07:38:16.319Z",
    "version": 1727681896,
    "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:16.322Z",
        "updated_at": "2024-09-30T07:38:16.322Z"
      }
    ]
  }
]
      

Get general 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_documents

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/documents/general_documents.json?
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "433546194063459498",
    "administration_id": 123,
    "contact_id": null,
    "contact": null,
    "reference": "Contract",
    "date": "2024-09-30",
    "due_date": null,
    "entry_number": 5,
    "state": "saved",
    "exchange_rate": "1.0",
    "created_at": "2024-09-30T07:38:11.945Z",
    "updated_at": "2024-09-30T07:38:11.945Z",
    "version": 1727681891,
    "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:11.948Z",
        "updated_at": "2024-09-30T07:38:11.948Z"
      }
    ]
  },
  {
    "id": "433546194052973736",
    "administration_id": 123,
    "contact_id": null,
    "contact": null,
    "reference": "Contract",
    "date": "2024-09-30",
    "due_date": null,
    "entry_number": 4,
    "state": "saved",
    "exchange_rate": "1.0",
    "created_at": "2024-09-30T07:38:11.935Z",
    "updated_at": "2024-09-30T07:38:11.935Z",
    "version": 1727681891,
    "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:11.938Z",
        "updated_at": "2024-09-30T07:38:11.938Z"
      }
    ]
  },
  {
    "id": "433546194042487974",
    "administration_id": 123,
    "contact_id": null,
    "contact": null,
    "reference": "Contract",
    "date": "2024-09-30",
    "due_date": null,
    "entry_number": 3,
    "state": "saved",
    "exchange_rate": "1.0",
    "created_at": "2024-09-30T07:38:11.924Z",
    "updated_at": "2024-09-30T07:38:11.924Z",
    "version": 1727681891,
    "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:11.928Z",
        "updated_at": "2024-09-30T07:38:11.928Z"
      }
    ]
  }
]
      

Example: returns paginated general 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_documents.json?per_page=1
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "433546194276320442",
    "administration_id": 123,
    "contact_id": null,
    "contact": null,
    "reference": "Contract",
    "date": "2024-09-30",
    "due_date": null,
    "entry_number": 5,
    "state": "saved",
    "exchange_rate": "1.0",
    "created_at": "2024-09-30T07:38:12.147Z",
    "updated_at": "2024-09-30T07:38:12.147Z",
    "version": 1727681892,
    "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:12.151Z",
        "updated_at": "2024-09-30T07:38:12.151Z"
      }
    ]
  }
]
      

Example: returns paginated general 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_documents.json?page=2&per_page=1
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "433546194460869832",
    "administration_id": 123,
    "contact_id": null,
    "contact": null,
    "reference": "Contract",
    "date": "2024-09-30",
    "due_date": null,
    "entry_number": 4,
    "state": "saved",
    "exchange_rate": "1.0",
    "created_at": "2024-09-30T07:38:12.324Z",
    "updated_at": "2024-09-30T07:38:12.324Z",
    "version": 1727681892,
    "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:12.328Z",
        "updated_at": "2024-09-30T07:38:12.328Z"
      }
    ]
  }
]
      

Example: returns an error when too many general documents are requested

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/documents/general_documents.json?per_page=101
    

Response

        
          
          Status: 400 Bad Request
        
      
{
  "error": "Per Page is too big",
  "symbolic": {
    "per_page": "max"
  }
}
      

Get general documents

Example: returns the wanted general_document

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/documents/general_documents/433546194799559908.json?
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "433546194799559908",
  "administration_id": 123,
  "contact_id": null,
  "contact": null,
  "reference": "Contract",
  "date": "2024-09-30",
  "due_date": null,
  "entry_number": 2,
  "state": "saved",
  "exchange_rate": "1.0",
  "created_at": "2024-09-30T07:38:12.646Z",
  "updated_at": "2024-09-30T07:38:12.646Z",
  "version": 1727681892,
  "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:12.649Z",
      "updated_at": "2024-09-30T07:38:12.649Z"
    }
  ]
}
      

Example: only returns general_documents

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/documents/general_documents/433546194924340459.json?
    

Response

        
          
          Status: 404 Not Found
        
      
{
  "error": "record not found",
  "symbolic": {
    "id": "not_found"
  }
}
      

Create a new general documents

Parameters

Parameter Type Description
general_document[reference] String

Required.

general_document[date] String

Required

Required.

general_document[due_date] String
general_document[reminder_date] String
general_document[contact_id] Integer

Should be a valid contact id.

general_document[reminder][date] String

Required

general_document[reminder][message] String

Example: creates the general_document

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"general_document":{"reference":"foobar","contact_id":433546195375228173}}' \
  https://moneybird.com/api/v2/123/documents/general_documents.json
    

Response

        
          
          Status: 201 Created
        
      
{
  "id": "433546195490571541",
  "administration_id": 123,
  "contact_id": "433546195375228173",
  "contact": {
    "id": "433546195375228173",
    "administration_id": 123,
    "company_name": "Foobar Holding B.V.",
    "firstname": "",
    "lastname": "",
    "address1": "Hoofdstraat 12",
    "address2": "",
    "zipcode": "1234AB",
    "city": "Amsterdam",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "1",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "",
    "is_trusted": false,
    "max_transfer_amount": null,
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": false,
    "sepa_iban": "",
    "sepa_iban_account_name": "",
    "sepa_bic": "",
    "sepa_mandate_id": "",
    "sepa_mandate_date": null,
    "sepa_sequence_type": "RCUR",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "si_identifier": "",
    "si_identifier_type": null,
    "moneybird_payments_mandate": false,
    "created_at": "2024-09-30T07:38:13.195Z",
    "updated_at": "2024-09-30T07:38:13.195Z",
    "version": 1727681893,
    "sales_invoices_url": "https://moneybird.dev/123/sales_invoices/d2f66184e739531f2a426af3103b07b4b514403c15165065e8e7cfb7fca4607d/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "contact_people": [

    ],
    "archived": false
  },
  "reference": "foobar",
  "date": "2024-09-30",
  "due_date": null,
  "entry_number": 3,
  "state": "saved",
  "exchange_rate": "1.0",
  "created_at": "2024-09-30T07:38:13.306Z",
  "updated_at": "2024-09-30T07:38:13.306Z",
  "version": 1727681893,
  "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:13.309Z",
      "updated_at": "2024-09-30T07:38:13.309Z"
    }
  ]
}
      

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_documents.json
    

Response

        
          
          Status: 400 Bad Request
        
      
{
  "error": "General Document is required",
  "symbolic": {
    "general_document": "required"
  }
}
      

Delete a general documents

Parameters

Parameter Type Description
refresh_journal_entries Boolean

Example: deletes the general_document

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XDELETE \
  -d '{}' \
  https://moneybird.com/api/v2/123/documents/general_documents/433546196153271614.json
    

Response

Update a general documents

Parameters

Parameter Type Description
general_document[reference] String

Required.

general_document[date] String

Required

Required.

general_document[due_date] String
general_document[reminder_date] String
general_document[contact_id] Integer

Should be a valid contact id.

general_document[reminder][date] String

Required

general_document[reminder][message] String
remove_contact Boolean

Example: updates the general_document

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPATCH \
  -d '{"general_document":{"reference":"updated reference"}}' \
  https://moneybird.com/api/v2/123/documents/general_documents/433546195753764137.json
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "433546195753764137",
  "administration_id": 123,
  "contact_id": null,
  "contact": null,
  "reference": "updated reference",
  "date": "2024-09-30",
  "due_date": null,
  "entry_number": 2,
  "state": "saved",
  "exchange_rate": "1.0",
  "created_at": "2024-09-30T07:38:13.557Z",
  "updated_at": "2024-09-30T07:38:13.610Z",
  "version": 1727681893,
  "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:13.560Z",
      "updated_at": "2024-09-30T07:38:13.560Z"
    },
    {
      "administration_id": 123,
      "user_id": 1727681857838,
      "action": "document_updated",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
      },
      "created_at": "2024-09-30T07:38:13.612Z",
      "updated_at": "2024-09-30T07:38:13.612Z"
    }
  ]
}
      

Add attachment to general 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_documents/433546196347258185/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_documents/433546198792537470/attachments/433546198896346496.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":433546195090015482,"todo":true}}' \
  https://moneybird.com/api/v2/123/documents/general_documents/433546195079529720/notes.json
    

Response

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

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_documents/433546195258836230/notes/433546195270370568.json
    

Response