subscriptions resource type

Represents a subscriptions in Business Central.

Note

For information about enabling APIs for Business Central see Enabling the APIs for Dynamics 365 Business Central.

Custom APIs

If you're subscribing to a custom API page, both the URL you send the subscription HTTP request to and the resource path you wish to subscribe to must include the <APIPublisher>, <APIGroup>, and <APIVersion> elements equivalent to: api/<APIPublisher>/<APIGroup>/<APIVersion>/subscriptions. For example, if your API publisher is pub, your API group is grp, and the version is 1.0, part of the URL will contain these elements api/pub/grp/v1.0/subscriptions.

Methods

MethodReturn TypeDescription
GET subscriptionssubscriptionsGets a subscriptions object.
DELETE subscriptionsnoneDeletes a subscriptions object.
POST subscriptionssubscriptionsCreates a subscriptions object.
PATCH subscriptionssubscriptionsUpdates a subscriptions object.

Properties

PropertyTypeDescription
subscriptionIdstringUnique key for the subscription.
notificationUrlstringURL to which webhook notifications are sent.
resourcestringURL for the resource being subscribed to. Supports relative and absolute URL.
timestampint64
userIdGUIDThe ID of user that has created the subscriptions.
lastModifiedDateTimedatetimeThe last datetime the subscriptions was modified. Read-Only.
clientStatestringClient state will be delivered with every notification. This can be used as a secret to verify message or for managing state if needed.
expirationDateTimedatetimeDate and time for when the webhook will expire.
systemCreatedAtdatetimeThe datetime the company was created.
systemCreatedByGUIDThe ID of the user who created the company.
systemModifiedAtdatetimeThe last datetime the subscriptions was modified.
systemModifiedByGUIDThe ID of the user who last modified the company.

JSON representation

Here's a JSON representation of the subscriptions resource.

{
    "subscriptionId": "string",
    "notificationUrl": "string",
    "resource": "string",
    "timestamp": "int64",
    "userId": "GUID",
    "lastModifiedDateTime": "datetime",
    "clientState": "string",
    "expirationDateTime": "datetime",
    "systemCreatedAt": "datetime",
    "systemCreatedBy": "GUID",
    "systemModifiedAt": "datetime",
    "systemModifiedBy": "GUID"
}

GET subscriptions
DELETE subscriptions
POST subscriptions
PATCH subscriptions