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