delete-management-instances-INSTANCE.rst (2028B)
1 .. http:delete:: /management/instances/$INSTANCE 2 .. http:delete:: [/instances/$INSTANCE]/private 3 4 This request will be used to delete (permanently disable) 5 or purge merchant instance in the backend. Purging will 6 delete all offers and payments associated with the instance, 7 while disabling (the default behavior) only deletes the private key 8 and makes the instance unusable for new orders or payments. 9 10 For deletion, the authentication credentials must match 11 the instance that is being deleted or the ``admin`` 12 instance, depending on the access path used. 13 14 **Required permission:** ``instances-write`` 15 16 **Request:** 17 18 :query purge: *Optional*. If set to YES, the instance will be fully 19 deleted. Otherwise only the private key would be deleted. 20 21 **Response:** 22 23 :http:statuscode:`202 Accepted`: 24 2FA is required for this operation, usually to validate the 25 email and/or phone numbers registered for the instance. 26 This returns the `ChallengeResponse`. @since **v21** 27 :http:statuscode:`204 No content`: 28 The backend has successfully removed the instance. The body is empty. 29 :http:statuscode:`401 Unauthorized`: 30 The request is unauthorized. Note that for already deleted instances, 31 the request must be authorized using the ``admin`` instance. 32 :http:statuscode:`404 Not found`: 33 The instance is unknown to the backend. 34 Returned with ``TALER_EC_MERCHANT_GENERIC_INSTANCE_UNKNOWN``. 35 :http:statuscode:`409 Conflict`: 36 The instance cannot be deleted because it has pending offers, or 37 the instance cannot be purged because it has successfully processed 38 payments that have not passed the ``TAX_RECORD_EXPIRATION`` time. 39 The latter case only applies if ``purge`` was set. 40 Returned with ``TALER_EC_MERCHANT_PRIVATE_DELETE_INSTANCE_PURGE_REQUIRED``. 41 :http:statuscode:`500 Internal Server Error`: 42 The server experienced an internal failure. 43 Returned with ``TALER_EC_GENERIC_DB_STORE_FAILED`` or 44 ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE``.