When an action of particular type is performed in the system, a message is sent to the configured webhook, using HTTP POST and JSON body.
This is currently used format of webhooks, it carries only events about changes of integration state, will be deprecated in future.
{
"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 the action.
Data
object
required
Structure of the object depends on Webhook action .
Property
Type
Contract
Description
Enterprise
Enterprise
required
Commercial chain of the property.
Service
Service
optional
Service the integration is connected to.
Requestor
Requestor
required
Person requesting action.
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.
Property
Type
Contract
Description
Id
string
required
Unique identifier of the enterprise.
Name
string
required
Name of the enterprise.
Property
Type
Contract
Description
Id
string
required
Unique identifier of the service.
Name
string
required
Name of the service.
Property
Type
Contract
Description
Name
string
required
Name of the requestor.
Email
string
required
Email of the requestor.
Property
Type
Contract
Description
Id
string
required
Unique identifier of the integration.
Name
string
required
Name of the intergation.
Property
Type
Contract
Description
Integration
Integration
required
Integration data.
Integration disabled data
Property
Type
Contract
Description
Integration
Integration
required
Integration data.
Integration canceled data
Property
Type
Contract
Description
Integration
Integration
required
Integration data.
Integration reinstated data
Property
Type
Contract
Description
Integration
Integration
required
Integration 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.
This is a new format of webhook message which will be extended in future to carry events about different entities in Mews.
{
"EnterpriseId" : "851df8c8-90f2-4c4a-8e01-a4fc46b25178" ,
"IntegrationId" : "c8bee838-7fb1-4f4e-8fac-ac87008b2f90" ,
"Events" : [
{
"Discriminator" : "ServiceOrderUpdated" ,
"Value" : {
"Id" : "bfee2c44-1f84-4326-a862-5289598f6e2d"
}
} ,
{
"Discriminator" : "ResourceUpdated" ,
"Value" : {
"Id" : "7cccbdc6-73cf-4cd4-8056-6fd00f4d9699"
}
} ,
] ,
"Entities" : {
"ServiceOrders" : [
{
"Id" : "bfee2c44-1f84-4326-a862-5289598f6e2d" ,
"ServiceId" : "bd26d8db-86da-4f96-9efc-e5a4654a4a94" ,
"GroupId" : "94843f6f-3be3-481b-a1c7-06458774c3df" ,
"Number" : "52" ,
"State" : "Processed" ,
"Origin" : "Connector" ,
"CreatedUtc" : "2016-02-20T14:58:02Z" ,
"UpdatedUtc" : "2016-02-20T14:58:02Z" ,
"CancelledUtc" : null ,
"StartUtc" : "2016-02-20T13:00:00Z" ,
"EndUtc" : "2016-02-22T11:00:00Z" ,
"ReleasedUtc" : null ,
"RequestedCategoryId" : "773d5e42-de1e-43a0-9ce6-f940faf2303f" ,
"AssignedResourceId" : "20e00c32-d561-4008-8609-82d8aa525714" ,
"AssignedResourceLocked" : false ,
"BusinessSegmentId" : null ,
"CompanyId" : null ,
"TravelAgencyId" : null ,
"AvailabilityBlockId" : null ,
"RateId" : "ed4b660b-19d0-434b-9360-a4de2ea42eda" ,
"VoucherId" : null ,
"AdultCount" : 2 ,
"ChildCount" : 0 ,
"CustomerId" : "35d4b117-4e60-44a3-9580-c582117eff98"
}
] ,
"Resources" : [
{
"Id" : "7cccbdc6-73cf-4cd4-8056-6fd00f4d9699" ,
"IsActive" : true ,
"ParentResourceId" : null ,
"Name" : "210" ,
"State" : "Dirty" ,
"Descriptions" : { } ,
"CreatedUtc" : "2018-09-24T07:56:56Z" ,
"UpdatedUtc" : "2021-03-26T03:56:37Z" ,
"Data" : {
"Discriminator" : "Space" ,
"Value" : {
"FloorNumber" : "2" ,
"LocationNotes" : ""
}
}
}
]
}
}
Property
Type
Contract
Description
EnterpriseId
string
required
Unique identifier of Enterprise where events belong to.
IntegrationId
string
required
Unique identifier of Integration which events are connected to.
Events
array of Event
required
The events that occurred in Mews.
Entities
Entities
required
Collection of entities related to Event s.
Property
Type
Contract
Description
Id
string
required
Unique identifier of updated entity.