Via the Users/LinkedAccounts endpoints, you'll be able to create and maintain linked accounts directly via API.
When linking accounts, you'll need to define the specific role(s) a user needs access to in another user's account, and, if applicable, permissions to access personal transactions.
The possible roles for the API request are "Personal", "ExpenseApprover", "Controller", "Finance", "Director". Important: the request will only be successful if the account to which access will be given actually has the role.
In case access to the personal role is to be granted, make sure to include permission "AccessPersonalTransactions" if access to that user's transactions is also required.
In case a user has already submitted a Linked Account request manually via Rydoo UI, but you prefer to link the accounts via API instead, you'll first have to delete the linked account (request) via the "DELETE a linked account connection" endpoint, and then send a new POST request to link both accounts.
Error messages
User already exists : a linked account connection already exists. It is also possible that a user has already submitted a linked account request manually via Rydoo UI, which, even when not yet confirmed by the second user, can also generate this error message. Verify whether the linked account connection already exists. If not the case, you can also try sending a 'Delete' request for the linked account connection, and try reestablishing the linked accounts with the POST request.