patch-private-templates-TEMPLATE_ID.rst (1727B)
1 .. http:patch:: [/instances/$INSTANCE]/private/templates/$TEMPLATE_ID 2 3 This is used to update a template. It is useful when we need to change information in the template or when we have mistake some information. 4 5 **Required permission:** ``templates-write`` 6 7 **Request:** 8 9 The request must be a `TemplatePatchDetails`. 10 11 **Response:** 12 13 :http:statuscode:`204 No content`: 14 The template has successfully modified. 15 :http:statuscode:`400 Bad Request`: 16 The request body is malformed. 17 Returned with ``TALER_EC_GENERIC_PARAMETER_MALFORMED``. 18 :http:statuscode:`404 Not found`: 19 The template(ID) is unknown to the backend. 20 Returned with ``TALER_EC_MERCHANT_GENERIC_TEMPLATE_UNKNOWN``. 21 :http:statuscode:`409 Conflict`: 22 The provided information is inconsistent with the current state of the template. Changes made is the same with 23 another store. 24 :http:statuscode:`500 Internal Server Error`: 25 The server experienced an internal failure. 26 Returned with ``TALER_EC_GENERIC_DB_STORE_FAILED``, 27 ``TALER_EC_GENERIC_DB_FETCH_FAILED`` or 28 ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE``. 29 30 **Details:** 31 32 33 .. ts:def:: TemplatePatchDetails 34 35 interface TemplatePatchDetails { 36 37 // Human-readable description for the template. 38 template_description: string; 39 40 // OTP device ID. 41 // This parameter is optional. 42 otp_id?: string; 43 44 // Additional information in a separate template. 45 template_contract: TemplateContractDetails; 46 47 // Key-value pairs matching a subset of the 48 // fields from ``template_contract`` that are 49 // user-editable defaults for this template. 50 // Since protocol **v13**. 51 editable_defaults?: Object; 52 }