Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Unanswered

Deleting/Updating a webhook subscription using v2 API

Posted on by
Hi,
 
I am using Business Central v2.0 API to create/delete/renew webhook subscriptions for a custom app in our organization. Although create works fine and I can see my subscriptions in GET subscriptions API response, DELETE and PATCH(renew subscriptions) fail with HTTP 404 error with /Bad Request - Error in query syntax/ as seen below:
 
//
 
I'm following this doc and setting the subscriptionId in DELETE API from the output of GET API response. Also I've copied the @odata.etag value from output of GET API response and used that in the value of `If-Match` header in DELETE and PATCH API requests.
I have used the value of the @odata.etag value as is, unescaped the quotes  as documented in a similar post for v1 API and tried various other combinations as well but the error persists.
 
This is the output of my GET subscriptions response:
 
//
//
 
Parts of the docs are inconsistent as here they ask to use the v2.0 API for PATCH/DELETE but here they suggest using v1.0 API even though both are v2 reference docs. 
 
Has anyone been able to get this working? Appreciate any pointers on this! 
 
Thanks
Nitesh
 

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,252 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,089 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans