taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

post-private-donau.rst (1162B)


      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   :http:statuscode:`409 Conflict`:
     32     * The charity is already linked with different parameters, or
     33     * The charity’s public key does **not** match the merchant instance’s public key.
     34   :http:statuscode:`502 Bad gateway`:
     35     Communication with the Donau service failed.