{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/webhooks","auth":"required","examples":{"codes":[{"code":"curl -k --request POST --header \"X-HOSTFULLY-APIKEY:<YOUR_API_KEY>\" -d \"{\n  'callbackUrl': 'https://<your_callback_url>',\n  'objectUid' : '<your_object_uid>',\n  'eventType' : NEW_PROPERTY\n}\" https://sandbox.hostfully.com/v1/webhooks","language":"curl"}]},"method":"post","params":[{"name":"objectUid","type":"string","default":"","desc":"Unique id of the object to call a callback for (for booking events, just use the agency UID)","required":true,"in":"body","ref":"","_id":"585ee7f072d7872300c1986c"},{"name":"eventType","type":"string","default":"","desc":"The type of event to monitor for the object referenced by objectUid","required":true,"in":"body","ref":"","_id":"585ee7f072d7872300c1986b"},{"name":"callbackUrl","type":"string","default":"","desc":"The URL that will be called back when the specific event happens for the monitored object","required":true,"in":"body","ref":"","_id":"585ee7f072d7872300c1986a"}],"results":{"codes":[{"status":200,"name":"","code":"{\n  \"id\": 23,//the id of the created webhook\n  \"objectUid\" : \"22418dd0-3b64-4fd1-a7d4-f093c47fc0d5\",//the UID of the object being monitored\n  \"eventType\" : NEW_PROPERTY//the event type to monitor for this onbject\n}","language":"json"},{"name":"","code":"Orbirental API - Bad request.","language":"text","status":400}]},"settings":""},"next":{"description":"","pages":[]},"title":"/webhooks","type":"endpoint","slug":"webhooks","excerpt":"Register webhooks and let Hostfully call you back based on specific triggered events","body":"[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/b0a82b8-42a47bd-webhooks.png\",\n        \"42a47bd-webhooks.png\",\n        500,\n        146,\n        \"#4b4b4f\"\n      ]\n    }\n  ]\n}\n[/block]\nThis API allows Hostfully tech partner to **register webhooks** and have their system called back when specific events are triggered on Hostfully for specific entities.\n\nFor example, a partner may want to be notified every time a new booking happens for a specific property or a specific agency. Or a partner want to be notified when a specific property is being updated.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/58b54c9-f9a733e-webhooks.png\",\n        \"f9a733e-webhooks.png\",\n        437,\n        185,\n        \"#d4d9d7\"\n      ]\n    }\n  ]\n}\n[/block]\n# Supported event types #\nThe following event types are supported:\n* NEW_INQUIRY\n* NEW_BOOKING\n* NEW_PROPERTY\n* UPDATED_PROPERTY\n* DELETED_PROPERTY\n* BOOKING_CANCELLED\n* BOOKING_UPDATED\n* CHANNEL_ACTIVATED\n* CHANNEL_DEACTIVATED\n* PINCODE_CREATED\n* PINCODE_DELETED\n* INTEGRATION_ACTIVATED\n* INTEGRATION_DEACTIVATED\n\n# Format of the callbacks #\nWhen Hostfully detects a event for which a webhook has been registered, our system will perform a callback to your URL and will send data via a **HTTP POST**. The following data will be send in the body of the POST call:\n* **agency_uid**: the uid of the agency associated with the monitored object\n* **event_type**: the type of event for which this callback is being performed\n\nOptional data:\n* **property_uid**: if the object monitored is a property, the property UID will be provided\n* **lead_uid**:  if the event type is related to bookings or inquiries, the lead UID will be provided\n\nIntegration Events: \nFor events of type INTEGRATION_ACTIVATED and INTEGRATION_DEACTIVATED, just pass the affiliate ID (your API key) as the value for the *objectUid* parameter.","updates":[],"order":83,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5de85dbbb0b885003ddf335b","__v":6,"category":{"sync":{"isSync":false,"url":""},"pages":["5de85dbbb0b885003ddf3339","5de85dbbb0b885003ddf333a","5de85dbbb0b885003ddf333b","5de85dbbb0b885003ddf333c","5de85dbbb0b885003ddf333d","5de85dbbb0b885003ddf333e","5de85dbbb0b885003ddf333f","5de85dbbb0b885003ddf3340","5de85dbbb0b885003ddf3341","5de85dbbb0b885003ddf3342","5de85dbbb0b885003ddf3343","56e77e22911296190096de13","5de85dbbb0b885003ddf3344","5de85dbbb0b885003ddf3345","5de85dbbb0b885003ddf3346","5de85dbbb0b885003ddf3347","5de85dbbb0b885003ddf3348","5de85dbbb0b885003ddf3349","5de85dbbb0b885003ddf334a"],"title":"Documentation","slug":"documentation","order":0,"from_sync":false,"reference":false,"_id":"5de85dbbb0b885003ddf3334","project":"56e3719a591f620e00bf5095","__v":19,"createdAt":"2016-03-12T01:32:11.359Z","version":"5de85dbbb0b885003ddf339f"},"parentDoc":null,"githubsync":"","user":"56e371538b32a10e00f79750","version":{"version":"1.5","version_clean":"1.5.0","codename":"Domain","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5de85dbbb0b885003ddf3334","56e7b24ad365390e007baeab","5de85dbbb0b885003ddf3335","5de85dbbb0b885003ddf3336","5de85dbbb0b885003ddf3337","5de85dbbb0b885003ddf3338"],"_id":"5de85dbbb0b885003ddf339f","__v":0,"project":"56e3719a591f620e00bf5095","forked_from":"56e3719a591f620e00bf5098","createdAt":"2016-03-12T01:32:10.751Z","releaseDate":"2016-03-12T01:32:10.751Z"},"createdAt":"2016-12-24T21:16:32.768Z","project":"56e3719a591f620e00bf5095"}

post/webhooks

Register webhooks and let Hostfully call you back based on specific triggered events

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

objectUid:
required
string
Unique id of the object to call a callback for (for booking events, just use the agency UID)
eventType:
required
string
The type of event to monitor for the object referenced by objectUid
callbackUrl:
required
string
The URL that will be called back when the specific event happens for the monitored object

Examples


Result Format


Documentation

[block:image] { "images": [ { "image": [ "https://files.readme.io/b0a82b8-42a47bd-webhooks.png", "42a47bd-webhooks.png", 500, 146, "#4b4b4f" ] } ] } [/block] This API allows Hostfully tech partner to **register webhooks** and have their system called back when specific events are triggered on Hostfully for specific entities. For example, a partner may want to be notified every time a new booking happens for a specific property or a specific agency. Or a partner want to be notified when a specific property is being updated. [block:image] { "images": [ { "image": [ "https://files.readme.io/58b54c9-f9a733e-webhooks.png", "f9a733e-webhooks.png", 437, 185, "#d4d9d7" ] } ] } [/block] # Supported event types # The following event types are supported: * NEW_INQUIRY * NEW_BOOKING * NEW_PROPERTY * UPDATED_PROPERTY * DELETED_PROPERTY * BOOKING_CANCELLED * BOOKING_UPDATED * CHANNEL_ACTIVATED * CHANNEL_DEACTIVATED * PINCODE_CREATED * PINCODE_DELETED * INTEGRATION_ACTIVATED * INTEGRATION_DEACTIVATED # Format of the callbacks # When Hostfully detects a event for which a webhook has been registered, our system will perform a callback to your URL and will send data via a **HTTP POST**. The following data will be send in the body of the POST call: * **agency_uid**: the uid of the agency associated with the monitored object * **event_type**: the type of event for which this callback is being performed Optional data: * **property_uid**: if the object monitored is a property, the property UID will be provided * **lead_uid**: if the event type is related to bookings or inquiries, the lead UID will be provided Integration Events: For events of type INTEGRATION_ACTIVATED and INTEGRATION_DEACTIVATED, just pass the affiliate ID (your API key) as the value for the *objectUid* parameter.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}