Contents

POST /charities#

Register a new charity with the Donau. Only allowed if the request comes with the administrator bearer token. The request body defines the charity’s signing key, contact information, and the initial accounting values for the current business year. On success the Donau assigns a numeric identifier to the charity record.

Request: CharityRequest

Response:

Details:

201 Created:

The request was successful, and the response is a CharityResponse.

400 Bad Request:

The request body is malformed or required fields are missing. Returned with error code TALER_EC_GENERIC_JSON_INVALID.

403 Forbidden:

The request did not contain an accepted administrator bearer token in its header. Returned with error code TALER_EC_GENERIC_TOKEN_PERMISSION_INSUFFICIENT.

409 Conflict:

A charity with the same public key already exists. Returned with error code TALER_EC_DONAU_CHARITY_PUB_EXISTS.

500 Internal Server Error:

The Donau encountered a database error while storing the charity. Returned with error code TALER_EC_GENERIC_DB_STORE_FAILED.

interface CharityRequest {

  // Long-term EdDSA public key that identifies the charity.
  charity_pub: EddsaPublicKey;

  // Canonical URL that should be presented to donors.
  charity_url: string;

  // Human-readable display name of the charity.
  charity_name: string;

  // Allowed donation volume for the charity per calendar year.
  max_per_year: Amount;
}
interface CharityResponse {

  // Unique ID assigned to the charity in the backend.
  charity_id: Integer;
}