v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Add Webhook

Add a new webhook.

post/webHooks

Request body

activeboolean required

Indicates if the webhook is active.

customerIdentifiersToBeEnrichedstring[] required

List of customer identifiers to be enriched.

eventNamesstring[] required

List of event names that trigger the webhook.

maxAllowedConnectionsinteger required

Maximum connections allowed at the same time for this webhook.

methodTypestring required

HTTP method used by the webhook. Example: POST, PUT, GET or DELETE.

namestring required

Name of the webhook.

slaInSecondsinteger

Expected delivery time of the event notification in seconds.

webHookHeadersstring[] required

Headers sent with the webhook request.

webHookTypestring required

Type of webhook, Example: HTTP

webHookUrlstring required

URL where the webhook sends its requests.

Response

200

{"stackTrail":"paths:/webHooks:post:responses:200:content:application/json:schema:properties:errors","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/webHooks:post:responses:200:content:application/json:schema:properties:warnings","oasType":"schema","type":"unknown"}

Example response

{
  "data": {
    "attribution": {
      "createdOn": "2024-10-28T08:05:44.665+0000",
      "lastUpdatedOn": "2024-10-28T08:05:44.665+0000",
      "lastUpdatedBy": {
        "id": 75121810,
        "code": "test_123",
        "name": "test_123",
        "type": "TILL"
      },
      "createdBy": {
        "id": 75121810,
        "code": "test_123",
        "name": "test_123",
        "type": "TILL"
      }
    },
    "webHookId": "671f45d8760af000077b19f8",
    "name": "test_post_webhook_12345",
    "eventNames": [
      "loyaltyCustomerMerge"
    ],
    "webHookUrl": "http://intouch-api-v3.default",
    "webHookType": "HTTP",
    "methodType": "POST",
    "webHookHeaders": {
      "Authorization": "Basic Q2FwaWxsYXJ5OklVTmhWVVQTROekl5",
      "Content-Type": "application/json"
    },
    "maxAllowedConnections": 10,
    "active": true,
    "slaInSeconds": 150,
    "consumerGroupId": "f7ea2579-28e2-4179-96da-fb271b17601c"
  }
}