---
title: "Webhook Receiver PROD"
url: "https://developer.migros.ch/apis/webhook-receiver-prod-1/versions/977ec8fd-6ae2-4563-8309-c378d6594d02"
---

# Webhook Receiver PROD

OpenAPI specification document.

```json
{"components":{"schemas":{"ContentfulApiHealthReportDto":{"properties":{"doesSpaceExist":{"default":false,"description":"The space ID for the Contentful API","example":true,"type":"boolean"},"isKeyValid":{"default":false,"description":"The key for accessing the Contentful API","example":true,"type":"boolean"},"isServiceAvailable":{"default":false,"description":"Status about the connection to the endpoint","example":true,"type":"boolean"}},"required":["isServiceAvailable","isKeyValid","doesSpaceExist"],"type":"object"},"ContentfulPayloadDto":{"properties":{"contentType":{"description":"Contentful content type","example":"article","type":"string"},"entryId":{"description":"Contentful entry id","example":"3aVP1JMlTfho9xXBcikB6o","type":"string"},"environmentId":{"description":"Contentful environment id","example":"staging","type":"string"},"revision":{"description":"Contentful entry revision","example":5,"type":"number"},"spaceId":{"description":"Contentful space id","example":"7b58bfib3n9x","type":"string"}},"required":["spaceId","environmentId","contentType","entryId"],"type":"object"},"ElasticsearchHealthReportDto":{"properties":{"healthReport":{"description":"Health report of the elasticsearch cluster","type":"object"},"isKeyValid":{"default":false,"description":"The key for accessing the Elasticsearch API","example":true,"type":"boolean"},"isServiceAvailable":{"default":false,"description":"Status about the connection to the endpoint.","example":true,"type":"boolean"}},"required":["isServiceAvailable","isKeyValid","healthReport"],"type":"object"},"ErrorResponse":{"description":"Standard error response returned by the API on failures.","properties":{"exception":{"description":"Detailed exception payload.","type":"object"},"path":{"description":"Request path that caused the error.","type":"string"},"statusCode":{"description":"HTTP status code of the error.","format":"int32","type":"integer"},"timestamp":{"description":"ISO8601 timestamp when the error occurred.","format":"date-time","type":"string"}},"required":["statusCode","timestamp","path","exception"],"type":"object"},"ReindexPayload":{"properties":{"apiType":{"description":"Contentful API type to use","enum":["preview","delivery"],"type":"string"},"contentType":{"description":"Contentful content type","example":"article","type":"string"},"environmentId":{"description":"Contentful environment id","example":"staging","type":"string"},"spaceId":{"description":"Contentful space id","example":"7b58bfib3n9x","type":"string"}},"required":["spaceId","environmentId","contentType"],"type":"object"},"ServiceHealthDto":{"properties":{"c8lDeliveryApiHealth":{"allOf":[{"$ref":"#/components/schemas/ContentfulApiHealthReportDto"}],"description":"The Contentful API health report for c8lDeliveryApi"},"c8lPreviewApiHealth":{"allOf":[{"$ref":"#/components/schemas/ContentfulApiHealthReportDto"}],"description":"The Contentful API health report for c8lPreviewApi"},"elasticsearch":{"allOf":[{"$ref":"#/components/schemas/ElasticsearchHealthReportDto"}],"description":"The Elasticsearch health report"}},"required":["elasticsearch","c8lDeliveryApiHealth","c8lPreviewApiHealth"],"type":"object"}},"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"}}},"info":{"contact":{"email":"ARG_MGB-CONSOL-Team@mgb.ch","name":"MGB-CONSOL Team","url":"https://teams.microsoft.com/l/channel/19%3A9b261b70350d4b5797a26552deb0ea80%40thread.tacv2/CONSOL?groupId=8acfd246-03ee-4be4-98c1-b81d574b28a2&tenantId=35aa8c5b-ac0a-4b15-9788-ff6dfa22901f"},"description":"The following is the API documentation for the NestJs webhook receiver (Muttis Nest), which is responsible for indexing Contentful Articles in Elasticsearch. For the data structure inside Elasticsearch, see the [Elasticsearch document mapping documentation](https://git.intern.migros.net/cms/muttis-nest/-/blob/main/docs/elasticsearch/document-mapping-models.md).","title":"Webhook Receiver PROD","version":"1.0"},"openapi":"3.0.0","paths":{"/migros/enterprise-support/content/v1/health":{"get":{"operationId":"HealthController_healthCheck","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceHealthDto"}}},"description":"Successful health report"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - missing or invalid bearer token"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceHealthDto"}}},"description":"Service unavailable - issues connecting to complementary systems"}},"summary":"Health endpoint for uptime.com health checks. This also contains reports for the complementary systems (Elasticsearch & Contentful)."}},"/migros/enterprise-support/content/v1/reindex/entry":{"post":{"operationId":"ReindexController_reindexEntries","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexPayload"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"processed":{"type":"boolean"},"processingTimeMs":{"type":"number"}},"required":["processed","processingTimeMs"],"type":"object"}}},"description":"Reindex request accepted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request - invalid or unsupported reindex payload"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - missing or invalid bearer token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found - entry or indices not found for the given payload"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Reindex entries"}},"/migros/enterprise-support/content/v1/webhooks/contentful/receive":{"post":{"operationId":"WebHookController_receive","parameters":[{"description":"This value originates from Contentful and contains the event type. Example: ContentManagement.Entry.auto_save","in":"header","name":"x-contentful-topic","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentfulPayloadDto"}}},"required":true},"responses":{"204":{"description":"Webhook processed successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request - invalid event type or payload"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - missing or invalid bearer token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found - referenced entry or indices not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"The endpoint receives Contentful webhooks, maps them, and writes the necessary data to Elasticsearch."}},"/migros/enterprise-support/content/v1/webhooks/receive":{"post":{"operationId":"WebHookController_receive-internal","parameters":[{"description":"This value originates from Contentful and contains the event type. Example: ContentManagement.Entry.auto_save","in":"header","name":"x-contentful-topic","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentfulPayloadDto"}}},"required":true},"responses":{"204":{"description":"Webhook processed successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request - invalid event type or payload"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - missing or invalid bearer token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found - referenced entry or indices not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"The endpoint receives internal webhooks for testing purposes."}}},"security":[{"bearerAuth":[]}],"servers":[{"url":"https://api.migros.ch"}],"x-company":"migros","x-edm-domain":"enterprise-support","x-headmatter":{"readable_by":"*"},"x-leanIx-Id":"cc988a2b-508f-45d1-a421-0cb248f04c51"}
```
