diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index a4bd7d4a5c3..3e39768ada9 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -1128,8 +1128,7 @@ class Thirdparties extends DolibarrApi $account = new CompanyBankAccount($this->db); - $account->fetchFromApi($bankaccount_id, $id); - + $account->fetch($bankaccount_id, $id, -1, ''); if($account->socid != $id){ throw new RestException(401);