
Howdy all,
I've set up a subscription with BusinessCentral to receive a POST to a webhook when a customer record is updated. Everything went well with the setup, but when the data is actually posted to my webserver running the webhook client (RubyOnRails 5.2.2) an error occurs. Rails fails to parse the message being sent by BusinessCentral.
However, when I copy the data that BusinessCentral sends, and manually POST to the webhook using Postman, everything works fine.
Here's the payload from BusinessCentral
{
"value": [
{
"subscriptionId": "6bfe67d43c6e4249b025e5e14b81b706",
"clientState": "",
"expirationDateTime": "2019-03-31T08:01:17Z",
"resource": "/api/beta/companies(da65c2c0-e0f0-49da-acfe-b63ac4787e2c)/customers(241a81d0-fc24-4c00-8c32-a599f3d9a921)",
"changeType": "updated",
"lastModifiedDateTime": "2019-03-28T08:04:37.7Z"
}
]
}
(some of the UUID's modified for security)
A JSON parse has no problem with the payload. I can't see any errors, but I was just wondering if anyone had run into a similar problem with their remote server when dealing with webhooks/subscriptions.
Many thanks.