post-private-donau.rst (1657B)
1 .. http:post:: [/instances/$INSTANCE]/private/donau 2 3 Link a new Donau charity instance to ``$INSTANCE``. 4 The backend fetches and validates the charity’s metadata from the given 5 Donau service before persisting the link. 6 7 **Required permission:** ``donau-write`` 8 9 **Request:** 10 11 The body must be a :ts:type:`PostDonauRequest`. 12 13 .. ts:def:: PostDonauRequest 14 15 interface PostDonauRequest { 16 // Base URL of the Donau service hosting the charity 17 donau_url: string; 18 19 // Numeric charity identifier inside the Donau service 20 charity_id: Integer; 21 } 22 23 **Response:** 24 25 :http:statuscode:`204 No content`: 26 The charity link was created successfully. 27 :http:statuscode:`202 Accepted`: 28 Operation requires MFA; a :ts:type:`ChallengeResponse` is returned. @since **v21** 29 :http:statuscode:`400 Bad request`: 30 Malformed JSON or missing fields. 31 Returned with ``TALER_EC_GENERIC_PARAMETER_MALFORMED``. 32 :http:statuscode:`409 Conflict`: 33 * The charity is already linked with different parameters, or 34 * The charity’s public key does **not** match the merchant instance’s public key. 35 :http:statuscode:`500 Internal Server Error`: 36 The server experienced an internal failure. 37 Returned with ``TALER_EC_GENERIC_DB_STORE_FAILED`` or 38 ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 39 :http:statuscode:`503 Service Unavailable`: 40 The Donau service could not be reached. 41 Returned with ``TALER_EC_GENERIC_ALLOCATION_FAILURE``. 42 :http:statuscode:`502 Bad gateway`: 43 Communication with the Donau service failed. 44 :http:statuscode:`503 Service Unavailable`: 45 The Donau service could not be reached.