Integration Webhooks
Integration Webhooks
Section titled “Integration Webhooks”This is an older form of Webhook, which only supports events related to changes in integration state. Unlike General Webhooks, each event generates an individual Webhook.
Supported events
Section titled “Supported events”Entity | Event | Description |
---|---|---|
Integration | IntegrationCreated | Event triggered when a new integration is created |
Integration | IntegrationEnabled | Event triggered when a integration is enabled |
Integration | IntegrationDisabled | Event triggered when a integration is disabled |
Integration | IntegrationCanceled | Event triggered when a integration is canceled |
Integration | IntegrationReinstated | Event triggered when a integration is reinstated |
Integration | IntegrationDeleted | Event triggered when a integration is deleted |
Terminology
Section titled “Terminology”An Integration refers to the unique connection between an Enterprise or Property (i.e. Mews customer) and an API client (i.e. Mews partner), corresponding to a unique Access Token. For a full description of all the terms used, see the Mews Glossary for Open API users.
Request body
Section titled “Request body”{ "Action": "IntegrationCreated", "Data": { "Enterprise": { "Id": "8865aa96-f62d-4f9b-a912-ab2100f60f42", "Name": "Sample Chain Hotel 1" }, "Service": { "Id": "9745ce3a-8dbb-4cc0-a550-55f9ff67b242", "Name": "Accommodation" }, "Requestor": null, "AccessToken":"9E5E84E9974D4F169662AB2200F27CB1-00B343A0DDA725CACAC028E38E3EABF", "CreatedUtc": "2019-12-13T14:42:52Z", "IsEnabled": true, "Integration": { "Id": "9e5e84e9-974d-4f16-9662-ab2200f27cb1", "Name": "WebhookTEST" } }}
Property | Type | Contract | Description |
---|---|---|---|
Action | string Webhook action | required | Type of action or event. |
Data | object | required | Structure of the object depends on Webhook action. |
Webhook action
Section titled “Webhook action”IntegrationCreated
- Triggered when a new integration is created.Data
is Integration created data.IntegrationEnabled
- Triggered when an integration is enabled.Data
is Integration enabled data.IntegrationDisabled
- Triggered when an integration is disabled.Data
is Integration disabled data.IntegrationCanceled
- Triggered when an integration is canceled.Data
is Integration canceled data.IntegrationReinstated
- Triggered when an integration is reinstated.Data
is Integration reinstated data.IntegrationDeleted
- Triggered when an integration is deleted.Data
is Integration deleted data.
Webhook data
Section titled “Webhook data”The structure of the Data object depends on Webhook action.
Integration created data
Section titled “Integration created data”Property | Type | Contract | Description |
---|---|---|---|
Enterprise | Enterprise | required | Property or chain of properties. |
Service | Service | optional | Service the integration is connected to. |
Requestor | Requestor | required | Person requesting the action or event. |
AccessToken | string | required | Access token of the client application. |
CreatedUtc | string | required | Creation date and time of the integration in UTC timezone in ISO 8601 format. |
IsEnabled | bool | required | Whether integration is enabled. |
Integration | Integration | required | Integration data. |
Enterprise
Section titled “Enterprise”Property | Type | Contract | Description |
---|---|---|---|
Id | string | required | Unique identifier of the enterprise. |
Name | string | required | Name of the enterprise. |
Service
Section titled “Service”Property | Type | Contract | Description |
---|---|---|---|
Id | string | required | Unique identifier of the service. |
Name | string | required | Name of the service. |
Requestor
Section titled “Requestor”Property | Type | Contract | Description |
---|---|---|---|
Name | string | required | Name of the requestor. |
Email | string | required | Email of the requestor. |
Integration
Section titled “Integration”Property | Type | Contract | Description |
---|---|---|---|
Id | string | required | Unique identifier of the integration. |
Name | string | required | Name of the integration. |
Integration enabled data
Section titled “Integration enabled data”Property | Type | Contract | Description |
---|---|---|---|
Integration | Integration | required | Integration data. |
Integration disabled data
Section titled “Integration disabled data”Property | Type | Contract | Description |
---|---|---|---|
Integration | Integration | required | Integration data. |
Integration canceled data
Section titled “Integration canceled data”Property | Type | Contract | Description |
---|---|---|---|
Integration | Integration | required | Integration data. |
Integration reinstated data
Section titled “Integration reinstated data”Property | Type | Contract | Description |
---|---|---|---|
Integration | Integration | required | Integration data. |
Integration deleted data
Section titled “Integration deleted data”Property | Type | Contract | Description |
---|---|---|---|
DeletedUtc | string | required | Deletion date and time of the integration in UTC timezone in ISO 8601 format. |
Integration | Integration | required | Integration data. |