Download OpenAPI specification:Download
The Website API allows real estate agencies to build their own custom website around property data that is stored and managed in SweepBright. This documentation explains:
How properties in SweepBright can be published to a custom website.
How updates to a property in SweepBright can be synced with the corresponding publication on the custom website. This is useful, e.g. when the price is updated.
How publications on the custom website can be removed by unpublishing the property in SweepBright. This is useful, e.g. when the property is sold or rented.
How the above three actions can be done for a project, which is a collection of properties.
How the custom website can store general leads inside SweepBright. General leads are contacts interested in buying or renting a property but without a specific interest in a particular property.
How the custom website can store specific leads inside SweepBright. Specific leads are contacts interested in buying or renting a specific property that they found on the custom website.
This documentation is intended for both product managers trying to understand the capabilities of the website API, as well as for developers that are building the custom website that integrates with this website API.
Every feature will be explained from a product perspective (a testing flow that verifies that the experience for the end user is correct) and a technical perspective (what the communication flow between SweepBright and the custom website is) so developers understand how to implement the behavior.
Before continuing, please read the Legal section at the bottom of this page.
Subscribe to our mailing list to stay up to date about the latest changes to the website API:
The API is available at https://website.sweepbright.com/api.
All interactions with the website API happen through a
REST API that returns
JSON-formatted responses.
All API requests must be made over HTTPS and with an access_token
provided via an OAuth 2.0
authorization flow.
Our API is not build nor intended to be actively used in your application. You are required to download and store any data and files on your own infrastructure. Our API is rate limited and should only be accessed after receiving a webhook.
Images and files can be downloaded via a temporary URL that is outputted in the API responses. The time until the URL expires is also provided in the API response.
We strongly recommend using SweepBrights property id's within the URLs of your custom website, especially for the properties detail page. Good examples are:
https://full-url-to-websi.te/<property_id>
https://full-url-to-websi.te/<zipcode>/<property_id>
Currently, it is not possible to activate and configure the website API from inside SweepBright. Instead, you should follow the steps outlined in this help article to get access. We will first give you access to a testing account.
After you're set up with your testing account, you implement the custom website so it satisfies all Basic Requirements.
When you are done developing, please inform us. SweepBright will check if your website satisfies all basic requirements according to the test cases included in each of them. After a positive evaluation, we shall send your credentials for your production account.
When planning your go-live, please account for a week of verification time by SweepBright and for possible adjustments you might need to implement.
From the user's perspective the following flow should work (through the iOS or web application):
Create a new property, with an address, price, description and at least one image.
In the Publish section, publish the property to Public API.
The status of the publication to Public API changes to Publishing...
After maximum 1 hour, the status of the publication changes to Published
.
In the Public API section a link to the publication on the custom website is available.
The link on the custom website shows the property, with address, price, description and image.
Notice that the time it takes for a publication to switch from Publishing to Published depends on the speed with which the website API processes the publish requests and how quickly the link to the custom website is returned.
Technically, this the flow between SweepBright and Public API:
When a user publishes a property to the public API channel, this will trigger a webhook. It is important that you immediately respond when this webhook is called, not after fetching the property info and returning the URL.
The custom website can fetch the property information by calling the estates endpoint. After storing this data, you can use it to publish the property on the custom website.
Once the custom website has created the property and knows the URL of the property on the custom website, the custom website sends back the estates URL endpoint. Note that if the custom website did not send back the URL within 1 hour, the publication will be considered failed.
As soon as SweepBright receives the URL of the property on the custom website, the property is considered Published inside SweepBright.
Some additional notes regarding the implementation:
Notice that the API uses the term estate to refer to a property. Property and estate can be used interchangeably.
The custom website can only fetch property information after a user has published the property to the website API in SweepBright and the webhook is called. After that, the data is available for fetching for 60 minutes.
There is no endpoint to fetch all published properties for an agency.
The publish flow is not completed as long as the URL is not returned. In the
meanwhile, the property will remain in a Publishing
state. Only when the URL is
received do we consider the property as Published
. It's important to complete
the publish flow: without URL the property cannot be used in several of
SweepBright's features.
From the user's perspective the following flow should work (through the iOS or web application):
Follow the steps above to create and publish a property to the website API.
Update some information of the property, such as the price.
The status of the website API publication is 'Changes not yet published.'
Publish the property to the Public API again.
The status of the publication to Public API changes to Publishing...
After maximum 1 hour, the status of the publication changes to Published
.
In the Public API section a visitable link to the publication on the custom website is available.
Technically, the flow is exactly the same as for publishing a property to the website API for
the first time, with one difference: the request that SweepBright sends to the
webhook contains "event": "estate-updated"
instead of "event": "estate-added"
.
From the user's perspective the following flow should work (through the iOS or web application):
Follow the steps to create and publish a property to the website API.
In the Publish section of the property, unpublish the property from the website API.
The status of the publication to Public API changes to Not Published
.
Technically, this the flow between SweepBright and Public API:
When a property is unpublished, the request that SweepBright sends to the
webhook contains "event": "estate-deleted"
.
After the webhook is sent, SweepBright considers the property as unpublished.
The custom website is responsible for taking the necessary actions to remove the publication from the website. No additional communication is necessary.
In addition to standalone properties, like a standalone house or a single apartment, SweepBright also supports the concept of projects. A project is a collection of multiple properties (called units in the SweepBright platform).
From the user's perspective, the experience when publishing, updating and unpublishing projects and units depends on the way it is implemented technically. There are two options:
One-on-one
Publish project = publish project + all units
We recommend that the custom website follows the second approach. Although this approach is slightly less flexible, it leads to a better user experience. More specifically, if there is a project with 30 units, the agent only has to publish the project and doesn't have to publish all 30 units separately anymore.
As you can see from in the estates endpoint documentation documentation, some fields in the payload will be different depending on the type of property that you are fetching information for. You can use this to determine which type of property the custom website is dealing with.
General leads are contacts interested in buying or renting a property but without a specific interest in a particular property.
From the user's perspective the following flow should work:
Visit the custom website.
Click a button to express general interest.
Pass first name, last name, email and telephone number. Additionally, pass the locale and preferences. Submit the info.
If the company consists of multiple teams, an unassigned lead (the lead is not assigned to a team) is created under Company & Teams > Unassigned leads in the SweepBright web application. When a Company only has one team, the lead is immediately assigned to this team.
The contact's details are filled in according to the information that was passed earlier.
The contact's preferences are filled in according to the information that was passed earlier.
Technically, the custom website should call the general contact request endpoint.
Specific leads are contacts interested in buying or renting a specific property that they found on the custom website.
From the user's perspective, the following flow should work:
Visit a property on the custom website.
Click a button to express interest in this property and ask for more information.
Pass first name, last name, email, telephone number. Additionally, pass the locale.
In SweepBright's web application, a lead is created in the contacts list of the team to which the property belongs. In addition, an 'expressed interest' interaction is logged between this lead and the property.
The contact's details are filled in according to the information that was passed earlier.
The contact’s preferences are filled in based on the property that he or she expressed interest in. For example, the lead's location preference is set to the postal code of the property and the maximum price is the property’s maximum price times 1.05.
Technically, the custom website should call the the contract request for an estate endpoint. Currently, SweepBright automatically infers the contact's preferences from the property that the contact expressed interest in. Additional preferences that may be passed in the body of the request are ignored.
In the description of the different API endpoints, you will see that you have
to specify an Accept
header in your request, formatted as
application/vnd.sweepbright.v{version}+json
, where version
specifies the API version.
Since the default version (1
) we have done improvements and additions to the API,
so it's a good idea to regularly check if you can upgrade the version and make the
corresponding code changes in your website API client. We will also notify you when a significant
update was done that you should be aware of. As a rule, we will always ensure backwards compatibility
with older versions unless explicitly communicated otherwise.
Our documentation will only include request body examples for the last supported version.
Below you can find an overview of changes between versions, so you can easily figure out what changed.
If you are building a website API client from scratch, you can safely skip this section.
In version 1
, when getting the estates data with GET estates/{id}
,
the JSON structure of the description
, description_title
, price_costs
,
price_taxes
, and legal_mentions
fields in different locales was inconsistent
between standalone properties, projects, and units data inside a project payload.
Version 20190920
makes this consistent. Regardless of the type of property (standalone, unit, project),
this localized data will always be formatted as follows:
"description_title": {
"en": "english_title",
"fr": "french_title",
"nl": "dutch_title"
},
"description": {
"en": "english_desc",
"fr": "french_desc",
"nl": "dutch_desc"
},
"price_costs": {
"en": "english_price_costs",
"fr": "french_price_costs",
"nl": "dutch_price_costs"
},
"price_taxes": {
"en": "english_price_taxes",
"fr": "french_price_taxes",
"nl": "dutch_price_taxes"
}
"legal_mentions": {
"en": "english_legal_mentions",
"fr": "french_legal_mentions",
"nl": "dutch_legal_mentions"
}
Version 20190920
still includes the publish_status
when calling GET estates/{id}
.
However, this feature is not actively supported anymore, so to avoid confusion it was dropped in version 20191121
.
With 20191206
we're exposing much more legal fields, and we're exposing them in a more sensible format.
When calling GET estates/{id}
with Accept: application/vnd.sweepbright.v20191121+json
, you'll get:
{
"id": "4e7b24e6-6d37-48a9-9249-0880bda99ba0",
...
"epc_value": 123,
"epc_category": "A+",
"epc_reference": "this-is-the-epc-ref",
"regulations": {
"building_permit": true,
"urban_planning_breach": true,
"subdivision_authorisation": true,
"preemptive_right": true,
"flood_risk_area": true
},
"cadastral_income": 785,
"legal_mentions": {
"en": "English legal mentions",
"fr": "Mentions legales francaises",
"nl": "Nederlandstalige legale vermeldingen"
},
...
}
When calling GET estates/{id}
with Accept: application/vnd.sweepbright.v20191206+json
, you'll get:
{
"id": "4e7b24e6-6d37-48a9-9249-0880bda99ba0",
...
"legal": {
"energy": {
"e_level": "E90",
"epc_value": 123,
"epc_category": "A+",
"co2_emissions": 999,
"epc_reference": "this-is-the-epc-ref",
"total_epc_value": 1000,
"report_fuel_tank": "conform",
"report_electricity_gas": "conform"
},
"regulations": {
"heritage_list": true,
"as_built_report": true,
"building_permit": true,
"expropriation_plan": true,
"registered_building": true,
"urban_planning_breach": true,
"site_untapped_activity": true,
"priority_purchase_right": true,
"pending_legal_proceedings": true,
"subdivision_authorisation": true,
"urban_planning_certificate": true
},
"legal_mentions": {
"en": "English legal mentions",
"fr": "Mentions legales francaises",
"nl": "Nederlandstalige legale vermeldingen"
},
"property_and_land": {
"flood_risk": "effective_flood_sensitive_area",
"purchased_year": 1987,
"cadastral_income": 785,
"land_use_designation": "natural_reserve"
}
},
...
}
As you can see, you can tap into much more legal fields. They are structured differently, and some have also changed:
premptive_right
has been renamed to priority_purchase_right
.
flood_risk
is an enum
instead of a boolean
.
For all the different values that these fields can have, please refer to the schemas in the documentation.
Version 20210723
solves some inconsistencies between the JSON Schema described in the documentation and the actual property data structure.
When calling GET estates/{id}
with Accept: application/vnd.sweepbright.v20210723+json
, you'll get:
{
"id": "4e7b24e6-6d37-48a9-9249-0880bda99ba0",
...
"legal": {
"energy": {},
"regulations": {},
"legal_mentions": {},
"property_and_land": {}
},
"description": {}
...
}
when energy
, regulations
, legal_mentions
, property_and_land
and description
sections are not set.
Before version 20210723
the above structure was returning empty array, causing errors when using the JSON Schema to validate the property data.
Version 20221213
introduces some changes to the property data and a couple of new fields to align SweepBright to the recent legal state directives.
Changes:
E-Level changes from a string prefixed with E
to a number between -999 and 999 (path: legal.energy.e_level
).
Energy Score supports values between -999 and 999 (path: legal.energy.epc_score
).
DPE supports two new values: empty
and not_applicable
(path: legal.energy.dpe
).
GES supports two new values: empty
and not_applicable
(path: legal.energy.greenhouse_emissions
).
Units in Building is now allowed for any property type (path: building.units_of_building
).
New fields, both in the regulation section for houses, apartments, commercial and office properties:
Asbestos Certificate as a flag to specify when the property has a Asbestos certificate (path: legal.regulations.asbestos_certificate
).
Asbestos Certificate Number to expose the certificate number (path: legal.regulations.asbestos_certificate_reference
).
Accept | string Example: application/vnd.sweepbright.v20191206+json e.g. application/vnd.sweepbright.v20191206+json |
{- "token_type": "Bearer",
- "expires_in": 604800,
- "access_token": "<token>"
}
Get estate data. Only callable after the webhook was triggered for the estate in question.
When fetching standalone property data with GET /estates/{estate}
:
is_project
is false
project_id
is null
properties
field is not available
When fetching project data with GET /estates/{estate}
:
is_project
will be true
properties
field will be an array of property objects with all the project's units' data.
When fetching unit data with GET /estates/{estate}
:
is_project
is false
project_id
is equal to the property id of the project it is part of.
properties
field is not available
estate required | string Example: 00930234-4f4e-42f1-a42e-206273dd8c53 |
Accept | string Example: application/vnd.sweepbright.v20191206+json e.g. application/vnd.sweepbright.v20191206+json |
{- "id": "69cbfdd6-b3e4-470e-a672-5c9e37fe36e9",
- "is_project": false,
- "project_id": "32ed6c2a-716f-4077-9779-2b7794e46257",
- "type": "apartment",
- "sub_type": "condo",
- "negotiation": "let",
- "rent_period": "month",
- "status": "available",
- "description": {
- "en": "Apartment with pool",
- "fr": "Appartement avec piscine",
- "nl": "Appartement met zwembad"
}, - "description_title": {
- "en": "Luxury Apartment",
- "fr": "Appartement de luxe",
- "nl": "Luxe appartement"
}, - "living_rooms": 1,
- "kitchens": 1,
- "bedrooms": 1,
- "bathrooms": 1,
- "toilets": 1,
- "showrooms": 1,
- "manufacturing_areas": 1,
- "storage_rooms": 1,
- "shower_rooms": 1,
- "kitchen_condition": "good",
- "bathroom_condition": "good",
- "garden_orientation": "N",
- "terrace_orientation": "N",
- "balcony_orientation": "N",
- "general_condition": "good",
- "legal": {
- "energy": {
- "epc_value": 200,
- "epc_category": "A++",
- "epc_reference": "20081101-0000000245-00000015",
- "total_epc_value": 1000,
- "energy_dpe": "A",
- "nabers": {
- "description": "Historical and current water and energy use",
- "type": "number",
- "maximum": 6,
- "minimum": 0
}, - "nathers": {
- "description": "All features of a building, including location",
- "type": "number",
- "maximum": 10,
- "minimum": 0
}, - "co2_emissions": 0,
- "e_level": 80,
- "report_electricity_gas": "conform",
- "report_fuel_tank": "conform",
- "dpe": "A",
- "greenhouse_emissions": "A",
- "estimated_energy_costs": {
- "minimum": 100,
- "maximum": 200,
- "year": 2018
}, - "dpe_date": "2018-01-01"
}, - "regulations": {
- "building_permit": false,
- "priority_purchase_right": false,
- "subdivision_authorisation": false,
- "urban_planning_breach": false,
- "as_built_report": null,
- "expropriation_plan": null,
- "heritage_list": null,
- "pending_legal_proceedings": null,
- "registered_building": null,
- "site_untapped_activity": null,
- "urban_planning_certificate": null,
- "asbestos_certificate": null,
- "asbestos_certificate_reference": "ref-001",
- "zone_subject_to_rent_control": false,
- "renovation_obligation": false,
- "ongoing_litigation": false
}, - "legal_mentions": {
- "en": "Legal regulations English",
- "fr": "Legal regulations French",
- "nl": "Legal regulations Dutch"
}, - "property_and_land": {
- "purchased_year": "1987",
- "cadastral_income": 785,
- "land_use_designation": "agricultural",
- "flood_risk": "no_flood_risk_area",
- "flood_risk_plot_score": "A",
- "flood_risk_building_score": "A"
}
}, - "auction": {
- "start_date": "2018-01-01T10:00:00+00:00"
}, - "open_homes": [
- {
- "start_date": "2018-05-26T10:00:00+00:00",
- "end_date": "2018-05-26T10:00:00+00:00"
}
], - "price": {
- "amount": 100000,
- "currency": "EUR",
- "hidden": false
}, - "price_negotiated": 100000,
- "price_costs": {
- "en": "Free text field English",
- "fr": "Free text field French",
- "nl": "Free text field Dutch"
}, - "price_taxes": {
- "en": "Free text field English",
- "fr": "Free text field French",
- "nl": "Free text field Dutch"
}, - "price_vat_regime": 55,
- "price_yearly_budgeted_building_costs": {
- "amount": 100000,
- "currency": "EUR"
}, - "price_property_taxes": {
- "amount": 200000,
- "currency": "EUR"
}, - "price_recurring_costs": {
- "amount": 300000,
- "currency": "EUR"
}, - "price_guarantee": {
- "amount": 300000,
- "currency": "EUR"
}, - "price_inventory_report_cost": {
- "amount": 400000,
- "currency": "EUR"
}, - "price_reference_rent": {
- "amount": 500000,
- "currency": "EUR"
}, - "price_base_rent": {
- "amount": 600000,
- "currency": "EUR"
}, - "price_rent_supplement": {
- "amount": 700000,
- "currency": "EUR"
}, - "price_life_annuity": {
- "advance": {
- "amount": 800000,
- "currency": "EUR"
}, - "applicable": false,
- "monthly_rent": {
- "amount": 900000,
- "currency": "EUR"
}, - "maximum_duration": 10
}, - "custom_price": "Price available on request",
- "location": {
- "geo": {
- "latitude": 1.2345,
- "longitude": 1.2345
}, - "city": "Brussels",
- "street": "Street name",
- "street_2": "Street name",
- "number": "123",
- "box": "7",
- "addition": "ABD",
- "floor": 2,
- "country": "BE",
- "formatted": "Street name, Brussels",
- "formatted_agency": "Formatted Agency",
- "postal_code": "1000",
- "hidden": false
}, - "amenities": [
- "pool"
], - "sizes": {
- "plot_area": {
- "size": 100,
- "unit": "sq_ft"
}, - "liveable_area": {
- "size": 100,
- "unit": "sq_ft"
}, - "loi_carrez_area": {
- "size": 100,
- "unit": "sq_ft"
}
}, - "permissions": {
- "farming": false,
- "fishing": false,
- "planning": false,
- "construction": false
}, - "rooms": [
- {
- "type": "living_room",
- "size_description": "Living room",
- "size": 100,
- "unit": "sq_ft",
- "ordinal": 1
}
], - "floors": 0,
- "images": [
- {
- "id": "1234-5678-9012",
- "filename": "my-image.jpeg",
- "description": "My image",
- "url_expires_on": "2017-01-01T12:12:12+00:00",
- "ordinal": 1
}
], - "plans": [
- {
- "id": "1234-5678-9012",
- "filename": "my-plan.pdf",
- "description": "My plan",
- "url_expires_on": "2017-01-01T12:12:12+00:00"
}
], - "documents": [
- {
- "id": "1234-5678-9012",
- "filename": "my-plan.pdf",
- "description": "My plan",
- "content_type": "application/pdf",
- "url_expires_on": "2017-01-01T12:12:12+00:00"
}
], - "features": {
- "energy": {
- "gas": false,
- "fuel": false,
- "electricity": false,
- "heat_pump": false,
- "geothermal": false
}, - "comfort": {
- "home_automation": false,
- "water_softener": false,
- "fireplace": false,
- "walk_in_closet": false,
- "home_cinema": false,
- "wine_cellar": false,
- "sauna": false,
- "fitness_room": false,
- "furnished": false,
- "accessibility": false
}, - "ecology": {
- "double_glazing": false,
- "solar_panels": false,
- "solar_boiler": false,
- "rainwater_harvesting": false,
- "insulated_roof": false,
- "septic_tank": false,
- "triple_glazing": false
}, - "security": {
- "alarm": false,
- "concierge": false,
- "video_surveillance": false
}, - "heating_cooling": {
- "central_heating": false,
- "floor_heating": false,
- "air_conditioning": false,
- "individual_heating": false,
- "ceiling_heating": false,
- "wood_stove_standalone": false,
- "wood_stove_insert": false,
- "pellets_standalone": false,
- "pellets_insert": false,
- "central_heating_building": false,
- "district_heating": false
}
}, - "building": {
- "renovation": {
- "year": 2012,
- "description": "New windows"
}, - "construction": {
- "year": 1970,
- "architect": "Mr. Architect"
}, - "units_of_building": 11,
- "residential_lots": 12,
- "number_of_floor_building": 17
}, - "negotiator": {
- "first_name": "John",
- "last_name": "Doe",
- "email": "john.doe@example.com",
- "phone": "+123456789",
- "photo_url_expires_on": "2017-01-01T12:12:12+00:00"
}, - "agency_commission": {
- "fixed_fee": 500.2,
- "percentage": 5
}, - "mandate": {
- "start_date": "2018-01-01",
- "end_date": "2019-01-01",
- "exclusive": false,
- "number": "1a2b3c"
}, - "internal_note": "Internal note",
- "occupancy": {
- "occupied": false,
- "current_rent": {
- "amount": 100000,
- "currency": "EUR"
}, - "available_from": "2018-01-01",
- "contact_details": "Available next week",
- "tenant_contract": {
- "end_date": "2018-12-31",
- "start_date": "2018-01-01"
}
}, - "office": {
- "id": "2e8caade-eb1e-4499-994f-4aed28906826",
- "name": "Team 1"
}, - "buyers": [
- {
- "first_name": "John",
- "last_name": "Doe",
- "email": "john@doe.com",
- "phone": "+123456789"
}
], - "vendors": [
- {
- "first_name": "John",
- "last_name": "Doe",
- "email": "john.doe@example.com",
- "phone": "+123456789"
}
], - "settings": {
- "reference": "internal reference"
}, - "properties": [
- { }
], - "buyer_percentage": 1,
- "buyer_fixed_fee": 1000,
- "vendor_percentage": 3,
- "vendor_fixed_fee": 1200,
- "legal_entity": {
- "id": "5568c79c-4aa9-4c31-a951-40b060549ead",
- "name": "My Legal Entity"
}
}
estate required | string Example: 00930234-4f4e-42f1-a42e-206273dd8c53 |
Accept | string Example: application/vnd.sweepbright.v20191206+json e.g. application/vnd.sweepbright.v20191206+json |
{- "code": 422,
- "message": "The given data failed to pass validation.",
- "errors": {
- "url": [
- "The url field is required."
]
}
}
This endpoint is deprecated. Please use the /contacts
endpoint instead.
estate required | string Example: 00930234-4f4e-42f1-a42e-206273dd8c53 |
Accept | string Example: application/vnd.sweepbright.v20191206+json e.g. application/vnd.sweepbright.v20191206+json |
first_name required | string |
last_name required | string |
email required | string |
phone required | string |
message required | string |
locale | string Enum: "nl" "fr" "en" |
{- "first_name": "John",
- "last_name": "Doe",
- "email": "john.doe.assigned@example.com",
- "phone": "+349999999",
- "message": "Hello, I'd like more info about this.",
- "locale": "nl"
}
{- "code": 422,
- "message": "The given data failed to pass validation.",
- "errors": {
- "email": [
- "The email field is required."
]
}
}
If there's no property_id
provided, the request will be treated as a general contact request.
If there's a property_id
provided, the request will be treated as a contact request for a specific property.
Types of properties and their respective min/max surface area preferences:
Apartment: min_liveable_area
, max_liveable_area
, min_gross_area
, max_gross_area
House: min_liveable_area
, max_liveable_area
, min_plot_area
, max_plot_area
Office: min_net_area
, max_net_area
, min_gross_area
, max_gross_area
Commercial: min_plot_area
, max_plot_area
, min_gross_area
, max_gross_area
Land: min_plot_area
, max_plot_area
Parking: min_gross_area
, max_gross_area
The max value must be greater than the respective min value.
Accept | string Example: application/vnd.sweepbright.v20191206+json e.g. application/vnd.sweepbright.v20191206+json |
first_name required | string |
last_name required | string |
email required | string |
phone required | string |
message required | string |
locale | string Enum: "nl" "fr" "en" |
object | |
object | |
pronouns | string or null Enum: "male" "female" "neutral" null |
office_id | string |
{- "first_name": "John",
- "last_name": "Doe",
- "email": "john.doe@example.com",
- "phone": "+123456789",
- "message": "I am looking for a nice house for my family",
- "locale": "nl",
- "property_id": "5803063b-aae6-49b4-8aaa-1c03f0e80cca"
}
{- "code": 422,
- "message": "The given data failed to pass validation.",
- "errors": {
- "email": [
- "The email field is required."
]
}
}
Creates or updates an owner lead. If id is not provided, a random one will be generated. If existing owner is found (by id or email), it will be updated.
Accept | string Example: application/vnd.sweepbright.v20191206+json e.g. application/vnd.sweepbright.v20191206+json |
id | string |
first_name required | string |
last_name required | string |
email required | string |
phone required | string |
message required | string |
pronouns | string or null Enum: "male" "female" "neutral" null |
office_id | string |
{- "id": "078e0819-7574-42df-a2a0-3aa9c9c69bc4",
- "first_name": "John",
- "last_name": "Doe",
- "email": "john.doe@example.com",
- "phone": "+123456789",
- "message": "I want to sell my apartment",
- "pronouns": "male",
- "office_id": "ccb1deac-60d5-4ca5-b507-76faa5fef291"
}
{- "code": 422,
- "message": "The given data failed to pass validation.",
- "errors": {
- "email": [
- "The email field is required."
]
}
}
A webhook URL can be defined per company, which will be called everytime a change of an estate is published.
We will send a POST
request with some JSON metadata to your configured URL. We expect a 200 response.
You can confirm the webhook authenticity by calculating a HMAC hash using the SHA-1 hashing algorithm, the JSON payload of the webhook and your OAuth secret key.
The calculated hash should be the same as the one found in the X-Hook-Signature
header we sent along with the webhook.
When you are starting to build the integration, SweepBright will ask you to provide a test webhook to set up your test company. Make sure that the webhook you provide us is available on the internet and is not a local webhook. If you want to ease local development, you can use a tool like ngrok to tunnel a publicly available link to your localhost.
Request
Headers
Content-Type: application/json
X-Hook-Signature: "a9e7db538d4592fa5e7098bfa86d0630651435d3"
Body
{
"event": "estate-added|estate-updated|estate-deleted",
"estate_id": "<estate-id>",
"happened_at": "2017-01-01T10:10:10",
"company_id": "3186772c-5ab7-42fe-a8cc-ea1ef8c368d3",
}
Response 200
These additional terms and conditions (“Additional Terms”) are applicable to the Website Application Programming Interface (“Website API”), together with the General Terms and Conditions of Service (the “GTCS”) and the SweepBright Terms of Use and Privacy Policy (collectively the “Agreement”).
By downloading the Website API documentation or by using the Website API documentation, you (the Customer) accept that such download and/or use is subject to the Agreement, including but not limited to the limitations of liability provisions.
The Website API constitutes an Additional Service provided to the Customer to link its Customer Account to its own website, pursuant to Clause 9.2 of the GTCS.
All defined terms used in these Additional Terms shall have the meaning set forth in the GTCS.
In the event of a conflict between these Additional Terms and the GTCS if any, the conflict shall be solved according to the following priority order: (a) Additional Terms, (b) GTCS. For the purpose of the foregoing, an omission shall not of itself be considered to give rise to any conflict or inconsistency.
Subject to the terms and conditions of the Agreement, the Supplier (SweepBright NV) grants to the Customer a non-exclusive, personal, non-transferable, revocable right and license to use the Website API, solely to integrate with the Customer’s website by linking the Customer Account to the Customer’s website, which will enable those services to interface and work with the Services, for the duration of the Agreement and solely for the Customer’s internal business operations (the “License”).
The Website API is licensed to the Customer for internal business operations only. The Customer acknowledges that the scope of the License granted does not permit the Customer (and the Customer may not allow any third party) to: (i) decompile, disassemble, reverse engineer or attempt to reconstruct, identify or discover any source code, underlying ideas, underlying user interface techniques or algorithms of the Website API by any means whatsoever, or disclose any of the foregoing; or (ii) sublicense, distribute, sell, lend, rent, lease or grant any rights in or to all or any portion of the Website API.
The Customer must comply with all restrictions and terms set forth in the Agreement, including the payment of Subscription Fees. If the Supplier believes, in its sole discretion, that the Customer violated or attempted to violate any term, condition or the spirit of the Agreement, the Supplier may temporarily or permanently revoke the License and the corresponding Additional Service. The License shall be automatically revoked if the Customer unsubscribes from all User Subscriptions.
Where the use of our API involves processing of Data (as defined in the General Terms and Conditions of Service), you acknowledge that you are the Data Controller and warrant that the Data were collected in compliance with the Data Protection Legislation and that you are entitled under the Data Protection Legislation to permit us to process the Data in accordance with the GTCS.
If you use our API to send Data to a third party service, you are responsible to ensure that such third party service is compliant with Data Protection Legislation.
In addition to the provisions contained in Clause 16 of the GTCS, the Supplier’s total aggregate liability in contract, tort (including negligence or breach of statutory duty), misrepresentation, restitution or otherwise, arising out of or in connection with the performance, non-performance or contemplated performance of its obligations under these Additional Terms and/or the provision of the Additional Service of Website API shall not exceed an amount corresponding to the total amount of fees, if any, paid by the Customer under these Additional Terms for the License.
Copyright © 2019 SweepBright NV - Last update: August 23, 2019.