We are currently assisting a third party vendor with implementing webhook notifications in Business Central. We are able to create a webhook subscription to our custom API, and the third party vendor is notified of changes in the published resource as expected, but Business Central does not give correct URL in the notification message
Business Central gives the URL as api/v1.0/companies(<companyId>)/<resource>
But this is a custom API, and Business Central should give the URL as api/<apiPublisher>/<apiGroup>/v1.0/companies(<companyId>)/<resource>
It should be noted that this is an on-premise installation version 16.0.11233.12061
Has anybody else experienced this when working with APIs and webhooks?
How did you subscribe to the webhook?
The correct URL to subscribe to a custom API is api/<published>/<group>/version/subscriptions
Don't use the standard /api/v1.0/susbcriptions endpoint for subscribing to custom apis
Turned out it was the "resource" value in the post request when the subscription was created that was wrong. We could see this when sending a get request to the subscriptions resource
I actually attended your webinar about RESTful API earlier this summer. Great stuff! Thanks for your continued support to the community
That would be the next option. Glad you found it!And thanks for the kind words. ;-)