Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Getting Started >

C# Sample Code

Started by Esben Stien -   in Getting Started

Does there exist some c# sample code for a private application?; a basic example with a query of an invoice or raising an invoice to get me started.

I'm quite fresh in c#, coming from c++, and I've looked at the xero-net official code, but some sample code to use it would help a lot.

I'm using mono on GNU/Linux.

Thank you for your time.
Well, yeah, I'm not that blind;)

As I said, I've looked at the library, xero-net, which is the officially supported library:


However, I find a library, but not small code samples.

Are they hidden in there?: https://github.com/XeroAPI/Xero-Net

In Xero.Api.Example.Applications/Private/ I find an example for american payrolls which is like 10 lines of code that doesn't really tell me anything.

Is there some hidden private applications sample code that shows how to add a contact or and invoice hidden elsewhere?

Esben Stien  

Can you point me to an example of using this library?

Esben Stien  

I just need simple example to get started. A simple example for a private application that authenticates and maybe creates an invoice or contact.

Esben Stien  


start here https://github.com/XeroAPI/XeroAPI.Net/tree/master/source/XeroApi.ConsoleTests

Start new project use nuget and get Xero package

to start use this https://github.com/XeroAPI/XeroAPI.Net/blob/master/source/XeroApi.ConsoleTests/PrivateApplicationRunner.cs

and send invoice with "repository "



Henzard Kruger  

Yes, thank you, Henzard; I've done this and it works fine. I'm able to create contacts and invoices, but I was really looking for a way to get started with the new API.

I also wonder if there is a library of some kind to work with WorkFlowMax.

Esben Stien  

Esben did you eventually find something?

Murray Brown