On this page
article
Step 13 – Provide Your Webhook URL
Create Webhook API
Before receiving webhook notifications, a subscription must be created. This API allows you to register a webhook endpoint for a specific landlord.
-
API: createLandlordSubscription
-
Purpose & Use Cases: Use this API to create a webhook subscription for a landlord. Once registered, SCOM will send webhook notifications to the provided URL via POST requests whenever relevant events occur. Common use cases include:
- Booking Creation: When a student creates a new booking, the landlord’s system receives booking details via webhook.
- Booking Update: If a booking is confirmed, cancelled, or modified, a webhook with the updated information will be sent.
- Request:
| Attribute Name | Data Type | Required | Details |
|---|---|---|---|
| callbackUrl | NonEmptyString | Yes | The URL that will receive webhook POST requests. Must be publicly accessible |
| name | NonEmptyString | Yes | A custom name to identify the webhook subscription |
QUERY
mutation CreateLandlordSubscription($input: CreateLandlordSubscriptionInput!) {
createLandlordSubscription(input: $input) {
callbackUrl
name
}
}
GRAPHQL VARIABLES
{
"input": {
"callbackUrl": "https://webhook.site/689fcee5-90cb-4728-ac6e-dc8bc4c6f663",
"name": "createLandlordSubscription"
}
}
- Response:
{
"data": {
"createLandlordSubscription": {
"callbackUrl": "https://webhook.site/689fcee5-90cb-4728-ac6e-dc8bc4c6f663",
"name": "createLandlordSubscription"
}
}
}
UpdateLandlordSubscription
-
API: updateLandlordSubscription
-
Purpose & Use Cases: You can use this API endpoint to update the webhook URL.
-
Request:
| Attribute Name | Data Type | Required | Details |
|---|---|---|---|
| callbackUrl | NonEmptyString | Yes | The URL that will receive webhook POST requests. Must be publicly accessible |
| name | NonEmptyString | Yes | A custom name to identify the webhook subscription |
QUERY
mutation UpdateLandlordSubscription($input: UpdateLandlordSubscriptionInput!) {
updateLandlordSubscription(input: $input) {
callbackUrl
name
}
}
GRAPHQL VARIABLES
{
"input": {
"callbackUrl": "https://webhook.site/689fcee5-90cb-4728-ac6e-dc8bc4c6f663",
"name": "updateLandlordSubscription"
}
}
- Response:
{
"data": {
"updateLandlordSubscription": {
"callbackUrl": "https://webhook.site/689fcee5-90cb-4728-ac6e-dc8bc4c6f663",
"name": "updateLandlordSubscription"
}
}
}