-
Notifications
You must be signed in to change notification settings - Fork 1
HTTP Push events
In addition to pulling locations from your JSON feed, we also offer HTTP push events / webhooks.
Currently (July 2016), we support push events when clients request information on a location, but we may extend this in the future to support more events.
In order to receive push events, you must supply a url to us. The following constraints apply:
- All events are delivered to the same url, we cannot generate the url dynamically and we cannot push to multiple url's.
- When enabling push events, you will receive events for ALL of your active locations. If you don't want that, you must set up logic on your end to ignore irrelevant push events.
- All events are pushed using HTTP(S)
- The Content-Type is
application/jsonand the HTTP verb is POST - Unless we receive a succesful (2xx) status code from your server, we will take the liberty to retry.
- The frequency of retries is subject to change, but in our current implementation (July 2016), we will try up to 20 times, using an exponential back-off algorithm.
Each event is made up of an event_type and a payload. The payload object structure will depend on the event_type.
This event is triggered when a client fills out the contact form a location on our website to request more information, e.g. contact details of the agent.
Here is an example of the event body:
{
"event_type": "enquiry_created",
"payload": {
"requested_location": {
"href": "https://www.lokalebasen.dk/leje/kontorlokaler/2100-kobenhavn-o/dampfaergevej-10559"
},
"location": {
"id": "20064",
"external_key": "EJ-593915GV",
"href": "https://www.lokalebasen.dk/leje/kontorlokaler/2100-kobenhavn-o/aebelogade-20064"
},
"enquiry": {
"type": "extra",
},
"client": {
"email": "angela7913@hotmail.com",
"name": "Angela Baker",
"company": "Bakers Inc.",
"phone": "52 25 05 59",
},
"comment": "I would like something with a grand view over the city."
}
}
Lokalebasen has two types of enquiries: client enquiries (direct) and extra enquiries (indirect). In simple terms, when a client orders requests information on an office at Cozy Street 123 and we have a similar office available nearby, in addition to the requested office, we will attach information and contact details for that similar office in the e-mail that we send to the client. client enquiries are created by the client, while extra enquiries are created by our matching algorithm.
The requested_location refers to the location that the client requested.
The location refers to the location associated with the enquiry.
When the enquiry is a client enquiry, the requested_location and the location will, inevitably, be the same.