taler-docs

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

get-private-templates-TEMPLATE_ID.rst (1749B)


      1 .. http:get:: [/instances/$INSTANCE]/private/templates/$TEMPLATE_ID
      2 
      3   This is used to obtain detailed information about a specific template.
      4 
      5 
      6   **Required permission:** ``templates-read``
      7 
      8   **Response:**
      9 
     10   :http:statuscode:`200 OK`:
     11     The backend has successfully returned the detailed information about a specific template.
     12     Returns a `TemplateDetails`.
     13   :http:statuscode:`401 Unauthorized`:
     14     The request is unauthorized.
     15   :http:statuscode:`404 Not found`:
     16     The instance or template(ID) is unknown to the backend.
     17   :http:statuscode:`500 Internal Server Error`:
     18     The server experienced an internal failure.
     19     Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``.
     20 
     21   **Details:**
     22 
     23 
     24   .. ts:def:: TemplateDetails
     25 
     26     interface TemplateDetails {
     27 
     28       // Human-readable description for the template.
     29       template_description: string;
     30 
     31       // OTP device ID.
     32       // This parameter is optional.
     33       otp_id?: string;
     34 
     35       // Additional information in a separate template.
     36       template_contract: TemplateContractDetails;
     37 
     38       // Key-value pairs matching a subset of the
     39       // fields from ``template_contract`` that are
     40       // user-editable defaults for this template.
     41       // Since protocol **v13**.
     42       editable_defaults?: Object;
     43 
     44       // Required currency for payments.  Useful if no
     45       // amount is specified in the ``template_contract``
     46       // but the user should be required to pay in a
     47       // particular currency anyway.  Merchant backends
     48       // may reject requests if the ``template_contract``
     49       // or ``editable_defaults`` do
     50       // specify an amount in a different currency.
     51       // This parameter is optional.
     52       // Since protocol **v13**.
     53       required_currency?: string;
     54     }