Is your feature request related to a problem? Please describe.
When processing webhook updates from the Content Delivery API, the alphanumeric model IDs (e.g. ‘article’) are not included, so we don’t know which models are involved without cross-referencing itemTypes for the models manually. Writing business logic against itemType IDs is painful and not scalable because we don’t know what they are by looking at them.
Describe the solution you’d like
Include the alphanumeric model ID (aka ItemType.attributes.api_key) in the Content Management API payloads) in the in both webhook payloads and Content Delivery API responses. Mocked webhook payload below, note the addition of relationships.item_type.key
Describe alternatives you’ve considered
The workaround requires us to grab a list of all models from the Content Management API, cache it on our own server for fast lookups, then cross-reference that in order to process webhook updates. Then create a webhook processor to watch for model changes in order to invalidate our cache of the model list.
I’ve run into this too. It’s a perfectly good design using the IDs, but there are a few situations where it’d save a few roundtrips or a few levels of indirection in code to have the model names printed inline too.
Not having this feature requires a hardcoded workaround to obtain page paths to revalidate and this is bad, as numeric Model ID is not stable. Adding the stable alphanumeric Model ID to the webhook would rectify this.