commit 39c5d0e92fd76e2c09101c3bb1b6dbdffb9fe6dc parent 2587e39bb1abed4fd6f427baef354e1332234a33 Author: Christian Grothoff <christian@grothoff.org> Date: Sun, 28 May 2023 22:41:06 +0200 document new account API Diffstat:
| M | core/api-merchant.rst | | | 36 | ++++++++++++++++++++++++++++++++++++ |
1 file changed, 36 insertions(+), 0 deletions(-)
diff --git a/core/api-merchant.rst b/core/api-merchant.rst @@ -1032,6 +1032,42 @@ Setting up instances } +.. http:post:: [/instances/$INSTANCE]/private/account + + Add an account to the list of bank accounts of the instance. The POST + operation is authenticated by checking that an authorization is provided + that matches the credential required by the instance being modified. + + **Request** the request must be of type `MerchantBankAccount`. + + :http:statuscode:`204 No content`: + The backend has successfully created the instance. + :http:statuscode:`403 Forbidden`: + The provided credentials are invalid for this instance. + :http:statuscode:`404 Not found`: + This instance is unknown and thus an account cannot be added. + :http:statuscode:`409 Conflict`: + The given payto URI is already configured for this instance. + + +.. http:delete:: [/instances/$INSTANCE]/private/account/$H_WIRE + + Removes a bank account from the list of bank accounts of the instance. The + ``$H_WIRE`` argument in the path must match the respective hash over the + wire details from the `MerchantAccount` returned from a GET operation on + the instance. Technically, this operation does not delete the account, but + merely deactivates it. The DELETE operation is authenticated by checking + that an authorization is provided that matches the credential required by + the instance being modified. + + :http:statuscode:`204 No content`: + The backend has successfully deleted the account. + :http:statuscode:`403 Forbidden`: + The provided credentials are invalid for this instance. + :http:statuscode:`404 Not found`: + This instance or bank account are unknown and thus the account could not be deleted. + + .. http:patch:: /management/instances/$INSTANCE .. http:patch:: [/instances/$INSTANCE]/private