subscription resource type (v1.0)
NEW VERSION This is v1.0 of the Business Central API. For the newest version, see Business Central API (V2.0).
Represents a webhook subscription object in Business Central. Requests issued against the subscription entity, manages webhook subscriptions for a tenant.
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
Method | Return Type | Description |
---|---|---|
GET | subscriptions | Get subscriptions object. |
POST | subscriptions | Create subscriptions object. |
PATCH | subscriptions | Update subscriptions object. |
DELETE | subscriptions | Delete subscriptions object. |
Properties
Property | Type | Description |
---|---|---|
subscriptionId | string | Unique key for the subscription. |
notificationUrl | string | URL to which webhook notifications are sent. |
resource | string | URL for the resource being subscribed to. Supports relative and absolute URL. |
userId | GUID | The ID of user that has created the subscription. |
lastModifiedDateTime | datetime | Timestamp for when the subscription was modified. |
clientState | string | Client state will be delivered with every notification. This can be used as a secret to verify message or for managing state if needed. |
expirationDateTime | datetime | Date and time for when the webhook will expire. |
Relationships
None
JSON representation
Here is a JSON representation of the resource.
{
"subscriptionId": "string",
"notificationUrl": "string",
"resource": "string",
"userId": "Guid",
"clientState": "string",
"lastModifiedDateTime": "dateTimeOffset",
"expirationDateTime": "dateTimeOffset"
}
Related information
Error Codes
Get subscriptions
Create subscriptions
Update subscriptions
Delete subscriptions