taler-docs

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

post-management-drain.rst (1602B)


      1 .. http:post:: /management/drain
      2 
      3   This request is used to drain profits from the
      4   exchange's escrow account to another regular
      5   bank account of the exchange.  The actual drain
      6   requires running the ``taler-exchange-drain`` tool.
      7 
      8   **Request:**
      9 
     10   The request must be a `DrainProfitsMessage`.
     11 
     12   **Response:**
     13 
     14   :http:statuscode:`204 No content`:
     15     The profit drain was scheduled.
     16   :http:statuscode:`403 Forbidden`:
     17     The master signature is invalid.
     18     Returned with an error code of
     19     ``TALER_EC_EXCHANGE_MANAGEMENT_DRAIN_PROFITS_SIGNATURE_INVALID``.
     20   :http:statuscode:`413 Request entity too large`:
     21     The uploaded body is to long, it exceeds the size limit.
     22     Returned with an error code of
     23     ``TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT``.
     24   :http:statuscode:`500 Internal server error`:
     25     The server encountered an internal error processing the request.
     26     Returned with an error code of
     27     ``TALER_EC_GENERIC_DB_STORE_FAILED``.
     28 
     29   **Details:**
     30 
     31   .. ts:def:: DrainProfitsMessage
     32 
     33     interface DrainProfitsMessage {
     34 
     35       // Configuration section of the account to debit.
     36       debit_account_section: string;
     37 
     38       // Full payto URI of the account to credit.
     39       credit_payto_uri: string;
     40 
     41       // Wire transfer identifier to use.
     42       wtid: Base32;
     43 
     44       // Signature by the exchange master key over a
     45       // `TALER_MasterDrainProfitPS`.
     46       // Must have purpose ``TALER_SIGNATURE_MASTER_DRAIN_PROFITS``.
     47       master_sig: EddsaSignature;
     48 
     49       // When was the message created.
     50       date: Timestamp;
     51 
     52       // Amount to be drained.
     53       amount: Amount;
     54 
     55     }