Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >

Calling P&L report

Started by Tony Carter2 -   in API Endpoints

Hi,

I am trying to call a P&L report in c#:
private void GetProfitAndLoss()
{
var startDate = new DateTime(2019, 1, 1, 0, 0, 0);
var pal = xeroApi.Reports.BalanceSheet(startDate);
}

It complains about xeroApi:
the name 'xeroApi' does not exist in the current context

I need to call this report form the start of the current calendar year. What am I doing wrong?

Thanks.