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 Returned with ``TALER_EC_MERCHANT_GENERIC_WEBHOOK_UNKNOWN``. 20 :http:statuscode:`500 Internal Server Error`: 21 The server experienced an internal failure. 22 Returned with ``TALER_EC_GENERIC_DB_STORE_FAILED``, 23 ``TALER_EC_GENERIC_DB_FETCH_FAILED`` or 24 ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE``. 25 26 **Details:** 27 28 .. ts:def:: WebhookPatchDetails 29 30 interface WebhookPatchDetails { 31 32 // The event of the webhook: why the webhook is used. 33 event_type: WebhookEventType; 34 35 // URL of the webhook where the customer will be redirected. 36 url: string; 37 38 // Method used by the webhook 39 http_method: string; 40 41 // Header template of the webhook 42 header_template?: string; 43 44 // Body template by the webhook 45 body_template?: string; 46 47 }