{"_id":"585ee5b05e43f83700823363","__v":1,"category":{"_id":"56e3719b591f620e00bf5099","pages":["56e3719c591f620e00bf509b","56e74226555c030e00a52a90","56e7447c7d693632001d5cb4","56e752bd56d59a0e00d5660e","56e755b98aa2c00e00494cd9","56e7584d911296190096dd80","56e759339b25270e001d11a0","56e7593e1b41040e009d10cf","56e7594e911296190096dd88","56e7595e8aa2c00e00494ce3","56e75d7f5669091700c5b2b4","56e77e22911296190096de13","56e77f259b25270e001d1232","56e7b2c737afb90e00e0eb9d","56ec4daf611730190000f23f","56ec4fde26db830e00afa083","56ec8f7204e8940e00966567","56f184cc9791b22d0077b9d9","56f18a2c3af4942b00bb3c47"],"project":"56e3719a591f620e00bf5095","__v":19,"version":"56e3719a591f620e00bf5098","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-03-12T01:32:11.359Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"parentDoc":null,"user":"56e371538b32a10e00f79750","version":{"_id":"56e3719a591f620e00bf5098","hasReference":true,"hasDoc":true,"__v":2,"project":"56e3719a591f620e00bf5095","createdAt":"2016-03-12T01:32:10.751Z","releaseDate":"2016-03-12T01:32:10.751Z","categories":["56e3719b591f620e00bf5099","56e7b24ad365390e007baeab"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1"},"project":"56e3719a591f620e00bf5095","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-12-24T21:16:32.768Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"curl","code":"curl -k --request POST --header \"X-ORBIRENTAL-APIKEY:<YOUR_API_KEY>\" -d \"{\n  'callbackUrl': 'https://<your_callback_url>',\n  'objectUid' : '<your_object_uid>',\n  'eventType' : NEW_PROPERTY\n}\" http://api.sandbox.orbirental.com/v1/webhooks"}]},"method":"post","results":{"codes":[{"language":"json","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}","name":"","status":200},{"status":400,"language":"text","code":"Orbirental API - Bad request.","name":""}]},"settings":"","auth":"required","params":[{"_id":"585ee7f072d7872300c1986c","ref":"","in":"body","required":true,"desc":"Unique id of the object to call a callback for","default":"","type":"string","name":"objectUid"},{"_id":"585ee7f072d7872300c1986b","ref":"","in":"body","required":true,"desc":"The type of event to monitor for the object referenced by objectUid","default":"","type":"string","name":"eventType"},{"_id":"585ee7f072d7872300c1986a","ref":"","in":"body","required":true,"desc":"The URL that will be called back when the specific event happens for the monitored object","default":"","type":"string","name":"callbackUrl"}],"url":"/webhooks"},"isReference":false,"order":51,"body":"[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/42a47bd-webhooks.png\",\n        \"webhooks.png\",\n        500,\n        146,\n        \"#e0998f\"\n      ]\n    }\n  ]\n}\n[/block]\nThis API allows Orbirental tech partner to **register webhooks** and have their system called back when specific events are triggered on Orbirental 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/f9a733e-webhooks.png\",\n        \"webhooks.png\",\n        437,\n        185,\n        \"#e2cdab\"\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* BOOKING_CANCELLED\n\n# Format of the callbacks #\nWhen Orbirental 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","excerpt":"Register webhooks and let Orbirental call you back based on specific triggered events","slug":"webhooks","type":"endpoint","title":"/webhooks"}

post/webhooks

Register webhooks and let Orbirental 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
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/42a47bd-webhooks.png", "webhooks.png", 500, 146, "#e0998f" ] } ] } [/block] This API allows Orbirental tech partner to **register webhooks** and have their system called back when specific events are triggered on Orbirental 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/f9a733e-webhooks.png", "webhooks.png", 437, 185, "#e2cdab" ] } ] } [/block] # Supported event types # The following event types are supported: * NEW_INQUIRY * NEW_BOOKING * NEW_PROPERTY * UPDATED_PROPERTY * BOOKING_CANCELLED # Format of the callbacks # When Orbirental 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

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 }}