taler-docs

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

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


      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     Returned with ``TALER_EC_MERCHANT_GENERIC_TEMPLATE_UNKNOWN``.
     18   :http:statuscode:`500 Internal Server Error`:
     19     The server experienced an internal failure.
     20     Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``.
     21 
     22   **Details:**
     23 
     24 
     25   .. ts:def:: TemplateDetails
     26 
     27     interface TemplateDetails {
     28 
     29       // Human-readable description for the template.
     30       template_description: string;
     31 
     32       // OTP device ID.
     33       // This parameter is optional.
     34       otp_id?: string;
     35 
     36       // Additional information in a separate template.
     37       template_contract: TemplateContractDetails;
     38 
     39       // Key-value pairs matching a subset of the
     40       // fields from ``template_contract`` that are
     41       // user-editable defaults for this template.
     42       // Since protocol **v13**.
     43       editable_defaults?: Object;
     44 
     45       // Required currency for payments.  Useful if no
     46       // amount is specified in the ``template_contract``
     47       // but the user should be required to pay in a
     48       // particular currency anyway.  Merchant backends
     49       // may reject requests if the ``template_contract``
     50       // or ``editable_defaults`` do
     51       // specify an amount in a different currency.
     52       // This parameter is optional.
     53       // Since protocol **v13**.
     54       required_currency?: string;
     55     }