Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Wrapper libraries >

Can't create notes and history

Started by Dan Archer -   in Wrapper libraries

I'm using the Xero api (Xero.Api.SDK.Core 1.0.6) and can successfully create invoices, however I'm unable to create a history / note on the invoice or even query the history.

var note = await xeroApi.HistoryAndNotes.CreateNoteAsync(
HistoryAndNotesEndpointCreateType.Invoices,
xeroInvoice.Id,
new HistoryRecord
{
Changes = $"Created by {userName}",
DateUtc = DateTime.UtcNow,
Details = $"Created by {userName} in {configuration.EnvironmentName}",
User = userName
});
I receive the following response: "Xero.Api.Infrastructure.Exceptions.NotFoundException: The resource you're looking for cannot be found"

The xeroInvoice.Id is a valid Guid for an existing invoice (which I am able to retrieve).

Any insights much appreciated.

This has also been posted on Stackoverflow

https://stackoverflow.com/questions/66038355/xero-api-notesandhistory