taler-docs

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

get-charity-CHARITY_ID.rst (1657B)


      1 .. http:get:: /charity/$CHARITY_ID
      2 
      3   Request information about a specific charity.
      4   Only allowed if the request comes with a signature by
      5   the respective charity.
      6 
      7   **Request:**
      8 
      9   *Charity-Signature*:
     10     The client must provide Base-32 encoded EdDSA signature with
     11     ``$CHARITY_PRIV``, affirming the desire to obtain the charity status.
     12     Note that this is merely a simple authentication mechanism,
     13     the details of the request are not protected by the signature.
     14     The ``$CHARITY_PRIV`` is usually the merchant instance
     15     private key.
     16 
     17   **Response:**
     18 
     19   :http:statuscode:`200 OK`:
     20     The Donau responds with a `Charity` object.
     21   :http:statuscode:`400 Bad Request`:
     22     The ``$CHARITY_ID`` is malformed or the required ``Charity-Signature`` header
     23     is missing or cannot be parsed.
     24     Returned with error code ``TALER_EC_GENERIC_PARAMETER_MALFORMED`` or
     25     ``TALER_EC_GENERIC_PARAMETER_MISSING``.
     26   :http:statuscode:`403 Forbidden`:
     27     The charity signature provided in the ``Charity-Signature`` header is invalid.
     28     Returned with error code ``TALER_EC_GENERIC_FORBIDDEN``.
     29   :http:statuscode:`404 Not Found`:
     30     The charity ID does not belong to a charity known to the Donau.
     31     Returned with error code ``TALER_EC_DONAU_CHARITY_NOT_FOUND``.
     32   :http:statuscode:`500 Internal Server Error`:
     33     The Donau encountered an internal database error.
     34     Returned with error code ``TALER_EC_GENERIC_DB_FETCH_FAILED``.
     35 
     36   .. ts:def:: Charity
     37 
     38     interface Charity {
     39       charity_pub: EddsaPublicKey;
     40       name: string;
     41       url: WebURL;
     42       max_per_year: Amount;
     43       receipts_to_date: Amount;
     44       current_year: Integer;
     45     }