taler-docs

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

post-admin-add-mapped.rst (1434B)


      1 .. http:post:: /admin/add-mapped
      2 
      3   Simulate a transfer from a customer to the exchange.  This API is *not*
      4   idempotent since it's only used in testing.
      5 
      6   Since protocol **v5**.
      7 
      8   **Request:**
      9 
     10   .. ts:def:: AddMappedRequest
     11 
     12     interface AddMappedRequest {
     13       // Amount to transfer.
     14       amount: Amount;
     15 
     16       // Authorization public key used for registration.
     17       authorization_pub: EddsaPublicKey;
     18 
     19       // Account (as full payto URI) that makes the wire transfer to the exchange.
     20       // Usually this account must be created by the test harness before this
     21       // API is used. An exception is the "fakebank", where any debit account
     22       // can be specified, as it is automatically created.
     23       debit_account: string;
     24     }
     25 
     26   **Response:**
     27 
     28   :http:statuscode:`200 OK`:
     29     The request has been correctly handled, so the funds have been transferred to
     30     the recipient's account.  The body is a `AddIncomingResponse`.
     31   :http:statuscode:`400 Bad request`:
     32     The request is malformed. The bank replies with an `ErrorDetail` object.
     33   :http:statuscode:`401 Unauthorized`:
     34     Authentication failed, likely the credentials are wrong.
     35   :http:statuscode:`404 Not found`:
     36     The endpoint is wrong or the user name is unknown. The bank replies with an `ErrorDetail` object.
     37   :http:statuscode:`409 Conflict`:
     38     The 'authorization_pub' argument is unknown or have already been used for a non recurrent transfer.