get-charities.rst (1552B)
1 .. http:GET:: /charities 2 3 GET all charities. Only allowed if the request comes with the administration bearer token. 4 5 return all charities 6 7 **Request:** 8 9 **Response:** 10 11 :http:statuscode:`200 OK`: 12 The request was successful, and the response is a `Charities`. 13 :http:statuscode:`204 No Content`: 14 No charities are registered at this time. 15 :http:statuscode:`403 Forbidden`: 16 The request did not contain an accepted administrator bearer token in its header. 17 Returned with error code ``TALER_EC_GENERIC_TOKEN_PERMISSION_INSUFFICIENT``. 18 :http:statuscode:`500 Internal Server Error`: 19 The Donau encountered an internal database error. 20 Returned with error code ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 21 22 **Details:** 23 24 .. ts:def:: Charities 25 26 interface Charities{ 27 charities: CharitySummary[]; 28 } 29 30 .. ts:def:: CharitySummary 31 32 interface CharitySummary { 33 34 // Unique ID of the charity within the Donau. 35 charity_id: Integer; 36 37 // Public key of the charity, used by the charity to 38 // authorize issuing donation receipts. 39 charity_pub: EddsaPublicKey; 40 41 // Human-readable name of the charity. 42 charity_name: string; 43 44 // Maximum amount of donation receipts this charity is 45 // allowed to issue per year. 46 max_per_year: Amount; 47 48 // Year for which ``receipts_to_date`` is given. 49 current_year: Integer; 50 51 // Total amount of donation receipts the donau has 52 // issued for this charity so far this year. 53 receipts_to_date: Amount; 54 }