Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >

Partial PUT ManualJournals Error Not Rolling Back Transaction

Started by Patrick McGreevy -   in API Endpoints

Hello,

I'm running into an issue with the PUT ManualJournals endpoint in the Xero integration within my app.
I'm calling this endpoint using the C# SDK: AccountingApi.CreateManualJournalsAsync.

The app posts 8 Manual Journals each time it calls this endpoint, with multiple journal lines in each.
When Xero returns a validation error (e.g. invalid account number) from this call, but only some of the Journals are invalid and the rest are valid, the valid Journals are fully created while the invalid ones are not.
This leads to a partially-loaded state where my application has no insight into what posted and what didn't. The method does not return the updated ManualJournals object when this happens, so I do not have an easy way to get the GUID for the journals that did post to delete them and reset the state.

I was expecting no updates to be made if an error occurred - is there any way to get the method functioning in this way?

Thanks