web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

API: Exclude fields for Webhook creation

(0) ShareShare
ReportReport
Posted on by 4

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 

I have the same question (0)
  • Verified answer
    DAnny3211 Profile Picture
    11,397 on at

    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

  • Bjoern Waninger Profile Picture
    4 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,468

#2
YUN ZHU Profile Picture

YUN ZHU 923 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 607

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans