- PATCH [/instances/$INSTANCE]/private/templates/$TEMPLATE_ID#
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.
Required permission:
templates-writeRequest:
The request must be a TemplatePatchDetails.
Response:
- 204 No content:
The template has successfully modified.
- 400 Bad Request:
The request body is malformed. Returned with
TALER_EC_GENERIC_PARAMETER_MALFORMED.- 404 Not found:
The template(ID) is unknown to the backend. Returned with
TALER_EC_MERCHANT_GENERIC_TEMPLATE_UNKNOWN.- 409 Conflict:
The provided information is inconsistent with the current state of the template. Changes made is the same with another store.
- 500 Internal Server Error:
The server experienced an internal failure. Returned with
TALER_EC_GENERIC_DB_STORE_FAILED,TALER_EC_GENERIC_DB_FETCH_FAILEDorTALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE.
Details:
interface TemplatePatchDetails { // Human-readable description for the template. template_description: string; // OTP device ID. // This parameter is optional. otp_id?: string; // Additional information in a separate template. template_contract: TemplateContractDetails; // Key-value pairs matching a subset of the // fields from template_contract that are // user-editable defaults for this template. // Since protocol **v13**. editable_defaults?: Object; }