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": "204882806821618833",
    "version": 1509611492
  },
  {
    "id": "204882807099491479",
    "version": 1509611492
  },
  {
    "id": "204882807371072669",
    "version": 1509611492
  }
]
      

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": "204882808221467821",
    "version": 1509611493
  },
  {
    "id": "204882808426988723",
    "version": 1509611493
  },
  {
    "id": "204882808588469433",
    "version": 1509611494
  }
]
      

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

Response

        
          
          Status: 200 OK
        
      
      [
  {
    "id": "204882809270043855",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2017-11-02",
    "created_at": "2017-11-02T08:31:34.794Z",
    "updated_at": "2017-11-02T08:31:34.794Z",
    "version": 1509611494,
    "general_journal_document_entries": [
      {
        "id": "204882809274238160",
        "administration_id": 123,
        "ledger_account_id": "204882808987976903",
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:34.798Z",
        "updated_at": "2017-11-02T08:31:34.798Z"
      },
      {
        "id": "204882809276335313",
        "administration_id": 123,
        "ledger_account_id": "204882808987976903",
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:34.800Z",
        "updated_at": "2017-11-02T08:31:34.800Z"
      },
      {
        "id": "204882809279481042",
        "administration_id": 123,
        "ledger_account_id": "204882808987976903",
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:34.803Z",
        "updated_at": "2017-11-02T08:31:34.803Z"
      },
      {
        "id": "204882809283675347",
        "administration_id": 123,
        "ledger_account_id": "204882808987976903",
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:34.806Z",
        "updated_at": "2017-11-02T08:31:34.806Z"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:34.815Z",
        "updated_at": "2017-11-02T08:31:34.815Z"
      }
    ]
  },
  {
    "id": "204882809413698773",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2017-11-02",
    "created_at": "2017-11-02T08:31:34.930Z",
    "updated_at": "2017-11-02T08:31:34.930Z",
    "version": 1509611494,
    "general_journal_document_entries": [
      {
        "id": "204882809418941654",
        "administration_id": 123,
        "ledger_account_id": "204882808987976903",
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:34.935Z",
        "updated_at": "2017-11-02T08:31:34.935Z"
      },
      {
        "id": "204882809422087383",
        "administration_id": 123,
        "ledger_account_id": "204882808987976903",
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:34.939Z",
        "updated_at": "2017-11-02T08:31:34.939Z"
      },
      {
        "id": "204882809425233112",
        "administration_id": 123,
        "ledger_account_id": "204882808987976903",
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:34.941Z",
        "updated_at": "2017-11-02T08:31:34.941Z"
      },
      {
        "id": "204882809427330265",
        "administration_id": 123,
        "ledger_account_id": "204882808987976903",
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:34.944Z",
        "updated_at": "2017-11-02T08:31:34.944Z"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:34.951Z",
        "updated_at": "2017-11-02T08:31:34.951Z"
      }
    ]
  }
]
      

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.

page Integer
per_page Integer

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": "204882798408894370",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2017-11-02",
    "created_at": "2017-11-02T08:31:24.436Z",
    "updated_at": "2017-11-02T08:31:24.436Z",
    "version": 1509611484,
    "general_journal_document_entries": [
      {
        "id": "204882798412040099",
        "administration_id": 123,
        "ledger_account_id": "204882797709494158",
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:24.439Z",
        "updated_at": "2017-11-02T08:31:24.439Z"
      },
      {
        "id": "204882798416234404",
        "administration_id": 123,
        "ledger_account_id": "204882797709494158",
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:24.442Z",
        "updated_at": "2017-11-02T08:31:24.442Z"
      },
      {
        "id": "204882798419380133",
        "administration_id": 123,
        "ledger_account_id": "204882797709494158",
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:24.446Z",
        "updated_at": "2017-11-02T08:31:24.446Z"
      },
      {
        "id": "204882798422525862",
        "administration_id": 123,
        "ledger_account_id": "204882797709494158",
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:24.449Z",
        "updated_at": "2017-11-02T08:31:24.449Z"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:24.456Z",
        "updated_at": "2017-11-02T08:31:24.456Z"
      }
    ]
  },
  {
    "id": "204882798265239452",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2017-11-02",
    "created_at": "2017-11-02T08:31:24.299Z",
    "updated_at": "2017-11-02T08:31:24.299Z",
    "version": 1509611484,
    "general_journal_document_entries": [
      {
        "id": "204882798269433757",
        "administration_id": 123,
        "ledger_account_id": "204882797709494158",
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:24.302Z",
        "updated_at": "2017-11-02T08:31:24.302Z"
      },
      {
        "id": "204882798272579486",
        "administration_id": 123,
        "ledger_account_id": "204882797709494158",
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:24.306Z",
        "updated_at": "2017-11-02T08:31:24.306Z"
      },
      {
        "id": "204882798276773791",
        "administration_id": 123,
        "ledger_account_id": "204882797709494158",
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:24.309Z",
        "updated_at": "2017-11-02T08:31:24.309Z"
      },
      {
        "id": "204882798278870944",
        "administration_id": 123,
        "ledger_account_id": "204882797709494158",
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:24.312Z",
        "updated_at": "2017-11-02T08:31:24.312Z"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:24.319Z",
        "updated_at": "2017-11-02T08:31:24.319Z"
      }
    ]
  },
  {
    "id": "204882798096418710",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2017-11-02",
    "created_at": "2017-11-02T08:31:24.138Z",
    "updated_at": "2017-11-02T08:31:24.138Z",
    "version": 1509611484,
    "general_journal_document_entries": [
      {
        "id": "204882798129973143",
        "administration_id": 123,
        "ledger_account_id": "204882797709494158",
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:24.163Z",
        "updated_at": "2017-11-02T08:31:24.163Z"
      },
      {
        "id": "204882798142556056",
        "administration_id": 123,
        "ledger_account_id": "204882797709494158",
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:24.180Z",
        "updated_at": "2017-11-02T08:31:24.180Z"
      },
      {
        "id": "204882798146750361",
        "administration_id": 123,
        "ledger_account_id": "204882797709494158",
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:24.186Z",
        "updated_at": "2017-11-02T08:31:24.186Z"
      },
      {
        "id": "204882798150944666",
        "administration_id": 123,
        "ledger_account_id": "204882797709494158",
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:24.189Z",
        "updated_at": "2017-11-02T08:31:24.189Z"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:24.197Z",
        "updated_at": "2017-11-02T08:31:24.197Z"
      }
    ]
  }
]
      

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": "204882799586445252",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2017-11-02",
    "created_at": "2017-11-02T08:31:25.558Z",
    "updated_at": "2017-11-02T08:31:25.558Z",
    "version": 1509611485,
    "general_journal_document_entries": [
      {
        "id": "204882799593785285",
        "administration_id": 123,
        "ledger_account_id": "204882798887045040",
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:25.563Z",
        "updated_at": "2017-11-02T08:31:25.563Z"
      },
      {
        "id": "204882799600076742",
        "administration_id": 123,
        "ledger_account_id": "204882798887045040",
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:25.571Z",
        "updated_at": "2017-11-02T08:31:25.571Z"
      },
      {
        "id": "204882799604271047",
        "administration_id": 123,
        "ledger_account_id": "204882798887045040",
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:25.575Z",
        "updated_at": "2017-11-02T08:31:25.575Z"
      },
      {
        "id": "204882799607416776",
        "administration_id": 123,
        "ledger_account_id": "204882798887045040",
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:25.579Z",
        "updated_at": "2017-11-02T08:31:25.579Z"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:25.589Z",
        "updated_at": "2017-11-02T08:31:25.589Z"
      }
    ]
  }
]
      

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": "204882800615098336",
    "administration_id": 123,
    "reference": "Deprecations",
    "date": "2017-11-02",
    "created_at": "2017-11-02T08:31:26.539Z",
    "updated_at": "2017-11-02T08:31:26.539Z",
    "version": 1509611486,
    "general_journal_document_entries": [
      {
        "id": "204882800621389793",
        "administration_id": 123,
        "ledger_account_id": "204882800096053202",
        "contact_id": null,
        "debit": "100.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:26.545Z",
        "updated_at": "2017-11-02T08:31:26.545Z"
      },
      {
        "id": "204882800625584098",
        "administration_id": 123,
        "ledger_account_id": "204882800096053202",
        "contact_id": null,
        "debit": "0.0",
        "credit": "100.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:26.549Z",
        "updated_at": "2017-11-02T08:31:26.549Z"
      },
      {
        "id": "204882800636069859",
        "administration_id": 123,
        "ledger_account_id": "204882800096053202",
        "contact_id": null,
        "debit": "50.0",
        "credit": "0.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:26.555Z",
        "updated_at": "2017-11-02T08:31:26.555Z"
      },
      {
        "id": "204882800653895652",
        "administration_id": 123,
        "ledger_account_id": "204882800096053202",
        "contact_id": null,
        "debit": "0.0",
        "credit": "50.0",
        "row_order": null,
        "created_at": "2017-11-02T08:31:26.567Z",
        "updated_at": "2017-11-02T08:31:26.567Z"
      }
    ],
    "notes": [

    ],
    "attachments": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "document_saved",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:26.587Z",
        "updated_at": "2017-11-02T08:31:26.587Z"
      }
    ]
  }
]
      

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

Response

        
          
          Status: 200 OK
        
      
      {
  "id": "204882802794038296",
  "administration_id": 123,
  "reference": "Deprecations",
  "date": "2017-11-02",
  "created_at": "2017-11-02T08:31:28.618Z",
  "updated_at": "2017-11-02T08:31:28.618Z",
  "version": 1509611488,
  "general_journal_document_entries": [
    {
      "id": "204882802810815513",
      "administration_id": 123,
      "ledger_account_id": "204882802665063446",
      "contact_id": null,
      "debit": "100.0",
      "credit": "0.0",
      "row_order": null,
      "created_at": "2017-11-02T08:31:28.633Z",
      "updated_at": "2017-11-02T08:31:28.633Z"
    },
    {
      "id": "204882802815009818",
      "administration_id": 123,
      "ledger_account_id": "204882802665063446",
      "contact_id": null,
      "debit": "0.0",
      "credit": "100.0",
      "row_order": null,
      "created_at": "2017-11-02T08:31:28.637Z",
      "updated_at": "2017-11-02T08:31:28.637Z"
    },
    {
      "id": "204882802819204123",
      "administration_id": 123,
      "ledger_account_id": "204882802665063446",
      "contact_id": null,
      "debit": "50.0",
      "credit": "0.0",
      "row_order": null,
      "created_at": "2017-11-02T08:31:28.641Z",
      "updated_at": "2017-11-02T08:31:28.641Z"
    },
    {
      "id": "204882802824447004",
      "administration_id": 123,
      "ledger_account_id": "204882802665063446",
      "contact_id": null,
      "debit": "0.0",
      "credit": "50.0",
      "row_order": null,
      "created_at": "2017-11-02T08:31:28.646Z",
      "updated_at": "2017-11-02T08:31:28.646Z"
    }
  ],
  "notes": [

  ],
  "attachments": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "document_saved",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": null,
      "created_at": "2017-11-02T08:31:28.657Z",
      "updated_at": "2017-11-02T08:31:28.657Z"
    }
  ]
}
      

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/204882803147408419.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

Required

general_journal_document[date] String

Required

general_journal_document[origin] String

Can be upload, endpoint, si or email.

general_journal_document[journal_type] String

Can be fiscal_year_ending.

general_journal_document[general_journal_document_entries_attributes][*][id] Integer

Should be a valid general journal document entry id.

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

Response

        
          
          Status: 201 Created
        
      
      {
  "id": "204882803947471936",
  "administration_id": 123,
  "reference": "foobar",
  "date": "2017-11-02",
  "created_at": "2017-11-02T08:31:29.718Z",
  "updated_at": "2017-11-02T08:31:29.718Z",
  "version": 1509611489,
  "general_journal_document_entries": [
    {
      "id": "204882803951666241",
      "administration_id": 123,
      "ledger_account_id": "204882803644433462",
      "contact_id": null,
      "debit": "100.0",
      "credit": "0.0",
      "row_order": null,
      "created_at": "2017-11-02T08:31:29.721Z",
      "updated_at": "2017-11-02T08:31:29.721Z"
    },
    {
      "id": "204882803954811970",
      "administration_id": 123,
      "ledger_account_id": "204882803841565758",
      "contact_id": null,
      "debit": "0.0",
      "credit": "100.0",
      "row_order": null,
      "created_at": "2017-11-02T08:31:29.725Z",
      "updated_at": "2017-11-02T08:31:29.725Z"
    }
  ],
  "notes": [

  ],
  "attachments": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "document_saved",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": null,
      "created_at": "2017-11-02T08:31:29.732Z",
      "updated_at": "2017-11-02T08:31:29.732Z"
    }
  ]
}
      

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

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

Response

Update a general journal documents

Parameters

Parameter Type Description
general_journal_document[reference] String

Required

general_journal_document[date] String

Required

general_journal_document[origin] String

Can be upload, endpoint, si or email.

general_journal_document[journal_type] String

Can be fiscal_year_ending.

general_journal_document[general_journal_document_entries_attributes][*][id] Integer

Should be a valid general journal document entry id.

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][*][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: 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/204882804837712990.json
    

Response

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

Response