Announcements
Good morning dear community,
my situation is the following:
My BC 22 SaaS is exposing a custom made API page for items. I will not include all fields, but just as an example:
------------------------------
number:
description:
netWeight:
syncingStatus:
------------------------------
The external target system (let´s call it WMS) subscribed successfully to the API and is notified via Webhook in case there is a relevant action for this page (create, change, delete).
All working fine until here.
Now the WMS should send back the "syncingStatus" to the API page (Success or Error), so that we can see in BC, if the item was successfully synced to WMS.
That also works fine.
But, changing the "syncingStatus" triggers a new change webhook towards WMS, which results in a kind of loop.
My questions:
1. Is it possible to exclude single fields from the API page, to not trigger a webhook in case of a change?
2. Does the design of the API page make sense in general to use it as "read" and "write" at the same time? Is it better to create a new API page, to receive the sync Status there?
Thanks a lot for your help
Best regards
Björn
Hi DAnny3211,
thanks a lot for your reply. It confirms my assumption.
Regarding the "exclude" from API page, that was perhaps not explained correctly from me:
The syncing Status is only changed via the API. If I would remove the field from the API page, it would no longer be possible to set it from WMS.
But the more I think about it, the more i like the idea of having separated pages for read and write.
Best regards
Björn
hi
yes, it is possible to exclude single fields from the API page in Business Central. You can do this by modifying the API page and removing the syncingStatus field from it. This way, any changes made to the syncingStatus field will not trigger the webhook towards WMS. Alternatively, you could create a separate API page that only exposes the syncingStatus field and use it specifically for syncing the status between Business Central and WMS.
The design of the API page can work for both "read" and "write" operations, but it may be better to separate the "write" operations into a separate API page. This can help avoid the loop issue you are experiencing, as well as improve the clarity and organization of your API pages. By separating the "write" operations into a different API page, you can better control which fields trigger a webhook and ensure that only the relevant data is being synced between the two systems.
In summary, it is possible to exclude single fields from the API page to avoid triggering a webhook, and it may be beneficial to separate "read" and "write" operations into different API pages to improve organization and prevent loops.
DAniele
André Arnaud de Cal...
294,217
Super User 2025 Season 1
Martin Dráb
232,978
Most Valuable Professional
nmaenpaa
101,158
Moderator