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/recurring_templates.xml" 13 14 new_recurring_template_xml = '<recurring_template> 15 <contact-id>1</contact-id> 16 <frequency-type>3</frequency-type> 17 <details_attributes type="array"> 18 <detail> 19 <amount>1</amount> 20 <description>Levering toonbank</description> 21 <price>12345.60</price> 22 <tax>0.19</tax> 23 </detail> 24 </details_attributes> 25 </recurring_template>' 26 27 # Create a post request 28 c.http_post(new_recurring_template_xml) 29 30 # Check if the request is successfull 31 if c.response_code == 201 32 puts "Created recurring template successfully" 33 puts c.body_str 34 else 35 puts "Error creating recurring template:" 36 puts c.body_str 37 end