The API of MoneyBird enables you to access the information inside a MoneyBird account. The API is RESTfull and uses XML for the data representation. On this page you can find all information about the API. Don't hesitate to contact us with your questions on info@moneybird.nl.
For Ruby-on-Rails programmers: don't forget to use ActiveResource! If you want to use the MoneyBird API with PHP, please take a look at the PHP library on GitHub.
1 require 'rubygems' 2 require 'curb' 3 4 # Create a new Curl instance with the correct accept and content-type headers 5 c = Curl::Easy.new do |curl| 6 curl.headers["Accept"] = "application/xml" 7 curl.headers["Content-Type"] = "application/xml" 8 curl.http_auth_types = Curl::CURLAUTH_BASIC 9 curl.userpwd = "admin:testtest" 10 end 11 12 c.url = "http://bluetools.moneybird.local/invoices/442820205/payments.xml" 13 14 payment = '<invoice_payment> 15 <price type="decimal">10.99</price> 16 <payment-date type="date">2009-06-10</payment-date> 17 </invoice_payment>' 18 19 # Create a post request 20 c.http_post(payment) 21 22 # Check if the request is successfull 23 if c.response_code == 201 24 puts c.body_str 25 else 26 puts "Error requesting invoices:" 27 puts c.body_str 28 end