Webhooks

Webhook operations

Get the Webhooks

Role Requirements

tenant-webhook-read or tenant-admin

Description

Gets the webhooks associated with the current API key.

Securitybearer
Request
query Parameters
from
required
string
Default: "0"

Index position in the list to start taking from. Default is 0.

take
required
string
Default: "20"

Number of items to take from the list. Default is 20.

header Parameters
x-account-id
required
string

The Account Id

x-tenant-id
required
string

The Tenant Id

x-correlation-id
string

Correlation Id for the request

Responses
200

OK - Returns the Webhooks response.

401

Unauthorized

get/v2/notifications/webhooks
Request samples

Create a webhook

Role Requirements

tenant-webhook-write or tenant-admin

Description

Creates a new webhook associated with the current API key.

Securitybearer
Request
header Parameters
x-account-id
required
string

The Account Id

x-tenant-id
required
string

The Tenant Id

x-correlation-id
string

Correlation Id for the request

Request Body schema:
destination
string or null
events
Array of strings or null
maxBatchSize
string or null
maxBatchTimeDelay
string or null
isActive
boolean
Responses
201

OK - Returns the Webhook response.

401

Unauthorized

post/v2/notifications/webhooks
Request samples
{
  • "destination": "string",
  • "events": [
    • "string"
    ],
  • "maxBatchSize": "string",
  • "maxBatchTimeDelay": "string",
  • "isActive": true
}

Get list of Webhook Event Types

Role Requirements

tenant-webhook-read or tenant-admin

Description

Gets a list of Webhook Event Types.

Securitybearer
Request
header Parameters
x-account-id
required
string

The Account Id

x-tenant-id
required
string

The Tenant Id

x-correlation-id
string

Correlation Id for the request

Responses
200

OK - Returns the Webhook Event Types response.

401

Unauthorized

get/v2/notifications/webhooks/event-types
Request samples

Get a Webhook

Role Requirements

tenant-webhook-read or tenant-admin

Description

Gets a webhook by the webhookId.

Securitybearer
Request
path Parameters
webhookId
required
string
header Parameters
x-account-id
required
string

The Account Id

x-tenant-id
required
string

The Tenant Id

x-correlation-id
string

Correlation Id for the request

Responses
200

OK - Returns the Webhook response.

401

Unauthorized

get/v2/notifications/webhooks/{webhookId}
Request samples

Updates a webhook

Role Requirements

tenant-webhook-write or tenant-admin

Description

Updates an existing webhook

Securitybearer
Request
path Parameters
webhookId
required
string
header Parameters
x-account-id
required
string

The Account Id

x-tenant-id
required
string

The Tenant Id

x-correlation-id
string

Correlation Id for the request

Request Body schema:
destination
string or null
events
Array of strings or null
maxBatchSize
string or null
maxBatchTimeDelay
string or null
isActive
boolean
Responses
200

OK

401

Unauthorized

put/v2/notifications/webhooks/{webhookId}
Request samples
{
  • "destination": "string",
  • "events": [
    • "string"
    ],
  • "maxBatchSize": "string",
  • "maxBatchTimeDelay": "string",
  • "isActive": true
}

Delete a Webhook

Role Requirements

tenant-webhook-write or tenant-admin

Description

Deletes a webhook using the given webhookId.

Securitybearer
Request
path Parameters
webhookId
required
string
header Parameters
x-account-id
required
string

The Account Id

x-tenant-id
required
string

The Tenant Id

x-correlation-id
string

Correlation Id for the request

Responses
204

No Content

401

Unauthorized

delete/v2/notifications/webhooks/{webhookId}
Request samples

Get webhook batches

Role Requirements

tenant-webhook-read or tenant-admin

Description

Get the set of webhook batches identified by the webhook ID.

Securitybearer
Request
path Parameters
webhookId
required
string
query Parameters
createdBefore
integer <int64>
createdAfter
integer <int64>
lastDeliveredBefore
integer <int64>
lastDeliveredAfter
integer <int64>
lastDeliveryAttemptStatus
string
eventType
string
orderRef
string
instructionRef
string
transactionId
string
customerRef
string
financialInstrumentId
string
mandateRef
string
chargebackId
string
from
integer <int32>
Default: 0
take
integer <int32>
Default: 100
header Parameters
x-account-id
required
string

The Account Id

x-tenant-id
required
string

The Tenant Id

x-correlation-id
string

Correlation Id for the request

Responses
200

OK - Returns the paged Webhook Batch response.

401

Unauthorized

get/v2/notifications/webhooks/{webhookId}/batches
Request samples
Response samples
application/json
{
  • "currentPage": 0,
  • "pageCount": 0,
  • "pageSize": 0,
  • "rowCount": 0,
  • "totalCount": 0,
  • "results": [
    • {
      • "batchId": "string",
      • "creationTimestamp": 0,
      • "events": [
        • {
          • "eventType": "string",
          • "messageId": "8540d774-4863-4d2b-b788-4ecb19412e85"
          }
        ],
      • "eventTypes": [
        • "string"
        ],
      • "lastDeliveryAttemptStatus": "string",
      • "lastDeliveryAttemptTimestamp": 0,
      • "totalEvents": 0
      }
    ]
}

Get a webhook batch

Role Requirements

tenant-webhook-read or tenant-admin

Description

Get the webhook batch identified by the webhook ID & batch ID.

Securitybearer
Request
path Parameters
webhookId
required
string
batchId
required
string
header Parameters
x-account-id
required
string

The Account Id

x-tenant-id
required
string

The Tenant Id

x-correlation-id
string

Correlation Id for the request

Responses
200

OK - Returns the Webhook Batch response.

401

Unauthorized

get/v2/notifications/webhooks/{webhookId}/batches/{batchId}
Request samples

Get a webhook batch delivery attempt

Role Requirements

tenant-webhook-read or tenant-admin

Description

Get the webhook batch delivery attempt identified by the subscription ID, batch ID & delivery attempt ID.

Securitybearer
Request
path Parameters
subscriptionId
required
string
batchId
required
string
deliveryAttemptId
required
string
header Parameters
x-account-id
required
string

The Account Id

x-tenant-id
required
string

The Tenant Id

x-correlation-id
string

Correlation Id for the request

Responses
200

OK - Returns the Webhook Batch response.

401

Unauthorized

get/v2/notifications/webhooks/{subscriptionId}/batches/{batchId}/delivery-attempts/{deliveryAttemptId}
Request samples
Response samples
application/json
{
  • "accountId": "string",
  • "batchId": "string",
  • "deliveryAttemptId": "string",
  • "deliveryTimestamp": 0,
  • "subscriptionId": "string",
  • "tenantId": "string",
  • "deliveryStatus": "Scheduled",
  • "error": "string",
  • "requestHeaders": "string",
  • "responseStatusCode": 0,
  • "response": "string"
}

Get webhook batch delivery attempts

Role Requirements

tenant-webhook-read or tenant-admin

Description

Get the set of webhook batch delivery attempts identified by the subscription ID & batch ID.

Securitybearer
Request
path Parameters
subscriptionId
required
string
batchId
required
string
query Parameters
from
integer <int32>
Default: 0
take
integer <int32>
Default: 100
header Parameters
x-account-id
required
string

The Account Id

x-tenant-id
required
string

The Tenant Id

x-correlation-id
string

Correlation Id for the request

Responses
200

OK - Returns the paged Webhook Batch response.

401

Unauthorized

get/v2/notifications/webhooks/{subscriptionId}/batches/{batchId}/delivery-attempts
Request samples
Response samples
application/json
{
  • "currentPage": 0,
  • "pageCount": 0,
  • "pageSize": 0,
  • "rowCount": 0,
  • "totalCount": 0,
  • "results": [
    • {
      • "accountId": "string",
      • "batchId": "string",
      • "deliveryAttemptId": "string",
      • "deliveryTimestamp": 0,
      • "subscriptionId": "string",
      • "tenantId": "string",
      • "deliveryStatus": "Scheduled",
      • "error": "string",
      • "requestHeaders": "string",
      • "responseStatusCode": 0,
      • "response": "string"
      }
    ]
}

Schedule a new batch delivery attempt

Role Requirements

tenant-webhook-writer or tenant-admin

Description

Schedule a new delivery attempt for the webhook batch identified by the webhook ID & batch ID.

Securitybearer
Request
path Parameters
subscriptionId
required
string
batchId
required
string
header Parameters
x-account-id
required
string

The Account Id

x-tenant-id
required
string

The Tenant Id

x-correlation-id
string

Correlation Id for the request

Responses
201

OK - Returns the Webhook Batch Delivery Attempt ID.

401

Unauthorized

post/v2/notifications/webhooks/{subscriptionId}/batches/{batchId}/delivery-attempts
Request samples
Copyright 2024 Duck Creek Technologies. All Rights Reserved.