taler-docs

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

post-batch-submit.rst (1804B)


      1 .. http:POST:: /batch-submit
      2 
      3   Send in donation receipts for the current or one of the past fiscal years.
      4   The donor will reveive the signed total back, which is called the
      5   donation statement.
      6 
      7   **Request:** `SubmitDonationReceiptsRequest`
      8 
      9   **Response:**
     10 
     11   :http:statuscode:`201 Created`:
     12     The request was successful, and a donation statement is now available. The response will be empty.
     13   :http:statuscode:`403 Forbidden`:
     14     One of the signatures is invalid. This response comes with a standard `ErrorDetail` response.
     15   :http:statuscode:`404 Not found`:
     16     At least one of the donation unit keys is not known to the Donau. Comes with a `DonationUnitUnknownError`.
     17 
     18   **Details:**
     19 
     20   .. ts:def:: SubmitDonationReceiptsRequest
     21 
     22     interface SubmitDonationReceiptsRequest{
     23       // hashed taxpayer ID plus salt
     24       h_donor_tax_id: HashCode;
     25       // All donation receipts must be for this year.
     26       donation_year: Integer;
     27       // Receipts should be sorted by amount.
     28       donation_receipts: DonationReceipt[];
     29     }
     30 
     31   .. ts:def:: DonationReceipt
     32 
     33     interface DonationReceipt {
     34       h_donation_unit_pub: HashCode;
     35       nonce: string;
     36       donation_unit_sig: DonationReceiptSignature;
     37     }
     38 
     39   .. ts:def:: DonationReceiptSignature
     40 
     41     type DonationReceiptSignature = RSADonationReceiptSignature | CSDonationReceiptSignature ;
     42 
     43   .. ts:def:: RSADonationReceiptSignature
     44 
     45     interface RSADonationReceiptSignature {
     46       cipher: "RSA";
     47 
     48       // RSA signature
     49       rsa_signature: RsaSignature;
     50     }
     51 
     52   .. ts:def:: CSDonationReceiptSignature
     53 
     54     interface CSDonationReceiptSignature {
     55       cipher: "CS";
     56 
     57       // R value component of the signature.
     58       cs_signature_r: Cs25519Point;
     59 
     60       // s value component of the signature.
     61       cs_signature_s: Cs25519Scalar;
     62     }