patch-private-webhooks-WEBHOOK_ID.rst (1441B)
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 Returned with ``TALER_EC_MERCHANT_GENERIC_WEBHOOK_UNKNOWN``. 20 :http:statuscode:`409 Conflict`: 21 The provided information is inconsistent with the current state of the webhook. Changes made is the same with 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 ``TALER_EC_GENERIC_DB_FETCH_FAILED`` or 26 ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE``. 27 28 **Details:** 29 30 .. ts:def:: WebhookPatchDetails 31 32 interface WebhookPatchDetails { 33 34 // The event of the webhook: why the webhook is used. 35 event_type: WebhookEventType; 36 37 // URL of the webhook where the customer will be redirected. 38 url: string; 39 40 // Method used by the webhook 41 http_method: string; 42 43 // Header template of the webhook 44 header_template?: string; 45 46 // Body template by the webhook 47 body_template?: string; 48 49 }