patch-private-webhooks-WEBHOOK_ID.rst (1276B)
1 .. http:patch:: [/instances/$INSTANCE]/private/webhooks/$WEBHOOK_ID 2 3 This is used to update a webhook. 4 5 **Required permission:** ``webhooks-write`` 6 7 **Request:** 8 9 The request must be a `WebhookPatchDetails`. 10 11 **Response:** 12 13 :http:statuscode:`204 No content`: 14 The webhook has successfully modified. 15 :http:statuscode:`400 Bad Request`: 16 The request body is malformed. 17 :http:statuscode:`404 Not found`: 18 The webhook(ID) is unknown to the backend. 19 :http:statuscode:`409 Conflict`: 20 The provided information is inconsistent with the current state of the webhook. Changes made is the same with another store. 21 :http:statuscode:`500 Internal Server Error`: 22 The server experienced an internal failure. 23 Returned with ``TALER_EC_GENERIC_DB_STORE_FAILED``. 24 25 **Details:** 26 27 .. ts:def:: WebhookPatchDetails 28 29 interface WebhookPatchDetails { 30 31 // The event of the webhook: why the webhook is used. 32 event_type: WebhookEventType; 33 34 // URL of the webhook where the customer will be redirected. 35 url: string; 36 37 // Method used by the webhook 38 http_method: string; 39 40 // Header template of the webhook 41 header_template?: string; 42 43 // Body template by the webhook 44 body_template?: string; 45 46 }