patch-private-templates-TEMPLATE_ID.rst (1504B)
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 :http:statuscode:`404 Not found`: 18 The template(ID) is unknown to the backend. 19 :http:statuscode:`409 Conflict`: 20 The provided information is inconsistent with the current state of the template. Changes made is the same with 21 another store. 22 :http:statuscode:`500 Internal Server Error`: 23 The server experienced an internal failure. 24 Returned with ``TALER_EC_GENERIC_DB_STORE_FAILED``. 25 26 **Details:** 27 28 29 .. ts:def:: TemplatePatchDetails 30 31 interface TemplatePatchDetails { 32 33 // Human-readable description for the template. 34 template_description: string; 35 36 // OTP device ID. 37 // This parameter is optional. 38 otp_id?: string; 39 40 // Additional information in a separate template. 41 template_contract: TemplateContractDetails; 42 43 // Key-value pairs matching a subset of the 44 // fields from ``template_contract`` that are 45 // user-editable defaults for this template. 46 // Since protocol **v13**. 47 editable_defaults?: Object; 48 }