Say I have a Content Type Book
with a text field Title
and a reference field Author
, which in turn has it's own fields Name
(text) and Headshot
(media - image).
I want to set up a webhook that fires whenever a Book
is created or updated, and I want the payload to include all of the fields, including the nested reference Author
fields.
When using the Content Delivery API, I know that I can specify an include
property to specify how many nested levels of reference fields I want returned, like so:
await client.getEntries({
content_type: 'book',
include: 2
});
I'm wondering if it's possible to specify something similar in the webhook payload configuration object in order to have the payload itself contain nested reference field properties, rather than just it's sys
fields.
If this is not possible, then how should I approach requesting the nested field properties? If I do a new request with the reference's ID, is it guaranteed to exist or will I have to wait the 5 minutes it takes for the CDN changes to propagate?
Thanks in advance!