Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Wrapper libraries >

Is there any documentation explaining how to use the dotnet Wrapper library?

Started by Steve Griffin -   in Wrapper libraries

Where is the documentation explaining how to use the dotnet wrapper?
There isn't any that I have found, though there is some basic example code. Have a look @ the XeroAPI.Console project if you haven't already, and open Program.cs. Its pretty much follow you nose from there.

Luc Engelen  


Good luck using the dot net wrapper. It is quite out of date, in that it is not really maintained or updated as the API changes, and not recompiled when it is. Xero sort of expect you to know your way around C# to use and extend the wrapper that is on Github yourself. It would be very helpful if they did maintain and document it.

If you are looking to do something specific with VB.NET, I can throw you some of my code to help you on your way. I can create/update/void ACCPAY invoices and credit notes, and contacts, and create manual journals using the API, if that is any use.

Also, don't expect much help from this forum.

Rene Malingre  

I could do with some help please? I'm using c#, but a bit of VB.NET code should help.
I'm trying to add a payment to an invoice, but by default the UpdateOrCreate function executes a POST instead of a PUT, and I can't figure out how to get it to run PUT. Any suggestions?
Thanks so much. I feel like I'm running in circles and the support team aren't much help.

Aaron Ferris  

Oh dear, I thought the wrapper library might be the easy way in for a c# user....

Kirsten Greed  

Hi Kirsten and Aaron,

I now import all supplier bills and credits into Xero from Receipt-Bank (which has been a huge time saver for my business), and use the Xero API to grab new/updated data to create a local database of bills and credits, and do 99% of my manipulation of the Bills and Credits via the API. I have found the web interface just so damn slow to work with.

I can, using the API (based on the GitHub C# code, with a few additions and corrections I have made):
create bills and credit notes
edit bills and credit notes
pay bills, and allocate credit notes towards bills
refund credit notes
delete ('void') bills and credit notes
create manual journals (for daily sales figures)

An annoyance of Xero is that misspelled suppliers ('contacts') create a new contact. I automatically filter for invalid contacts and update bills and contacts to the correct contact (once it is identified).

I pay approximately 600 bills per month (on about 90 statements), and to have to click checkboxes on the web would just be a ridiculous time waster, and it would be so easy to make mistakes. Once my total of unpaid bills/credits matches all of my statements, I can hit a button and all my bills are marked as paid, using the correct bank account/credit card account depending on the supplier. Due to the one API call per second limitation of Xero, I go and make a cup of tea, or check twitter for a quarter of an hour while the bills are being marked as paid. My system then generates (Australian) banking ABA files (I have three accounts per supplier as I have three business locations) putting in the correct supplier reference code. I cannot do bulk payments through the API, and to be honest, even if I could, it wouldn't be as efficient for my purposes as my own system.

Anyway, what I am saying is that my system now works well for me, and I am happy to share code. As I have written it for my own purposes and use only, it wouldn't pass muster for any professional code cutter, and it has fossils of early versions, and no doubt poor naming conventions, spaghetti code and poor error checking. I am but a humble self-taught hobbyist trying to run a small business and want to pay my bills quickly and correctly!

If you have a particular need, let me know, and I will give you some code.

Rene dot Malingre at gmail dot com

Rene Malingre  

Hi Rene, thanks for sharing your success story. How would you go about pulling down a list of items with their purchase and sales account codes? ( I posted this question as The method 'Select' can't currently be used in a XeroApi WHERE querystring )

Kirsten Greed  

Wow Rene. I am in complete awe. That must have taken you forever to get working. Well done!
All I'm trying to do is integrate our payment gateway to allow our secure, New Zealand based payment solution to be used by Xero users. I've found the Xero supplied documentation to be heavy on words, but light on real examples, and the technical assistance from Xero wasn't of much help or sufficiently technical either. I came to the conclusion that community sourced examples was going to be the only way poor developers would be saved from many hours of head banging and hand wringing.
Although it doesn't sound like your specific code would help me I'm sure there will be others that would greatly appreciate some snippets as a guide! Once I've finally worked things out I'll be posting some code too :)

Aaron Ferris