0

I am trying to delete account or updating account using xero api. Api is giving me exception with status code like 400

A validation exception occurred, DELETE method cannot be used on Bank accounts.

Attached is the code.

//deleting account using unique id
    xeroClient.deleteAccount("XXXXX-XxxxX-Xxxx-XXXX-XXXXXXX");

//setting deleted status via update()
Account account=new Account();

account.setAccountID("XXXXX-XxxxX-Xxxx-XXXX-XXXXXXX");

account.setStatus(AccountStatus.DELETED);

updateList.add(account);

xeroClient.updateAccount(updateList);

May I know why the exception I am getting while deleting account via Xero API

Navneet Krishna
  • 5,009
  • 5
  • 25
  • 44
Jay
  • 41
  • 5

1 Answers1

0

According to the Xero Documentation;

Accounts of type 'BANK' cannot be updated

It would appear that you have to do it manually through the web interface.

Dave B
  • 659
  • 8
  • 29