Properties
Get Property
- Endpoint:
GET /properties/{id}
- Allowed for:
users that has right property.read
- Filters :
Name | Comment | Value |
---|---|---|
reference | filter by reference | ex: 'illusion-1' |
pf_imported_reference | filter by pf imported reference | ex: 'illusion-1' |
status | filter by status | 'draft', 'available', 'rented', 'under offer', 'reserved', 'sold' |
state | filter by state | 'draft', 'pending', 'approved', 'refused', 'archived' |
offering_type | filter by offering type | 'rent', 'sale' |
furnished | filter by furnished value | 'furnished', 'unfurnished', 'semi-furnished' |
category | filter by category | 'commercial', 'residential' |
type | filter by type | |
location_ids | An array of location Id | ex: are.3.12 |
excluded_user | returns all users properties except the given user id | ex: 3 |
user | filter by the given user id | ex: 3 |
landlord | filter by the given landlord id | |
lead | filter by the given lead id that has selected properties | |
is_selected | filter by properties that are selected by at least one lead | |
from_price | filter by the given from_price | ex: 120000 |
to_price | filter by the given to_price | ex: 140000 |
from_bedroom | filter by the given from_bedroom | up to 12 |
to_bedroom | filter by the given to_bedroom | up to 12, greater than from_bedroom |
from_bathroom | filter by the given from_bathroom | up to 12 |
to_bathroom | filter by the given _bathroom | up to 12, greater than from_bathroom |
amenities (deprecated) - please use amenities_or to keep compatibility |
filter by amenities | ex: [1,2,3] |
amenities_or | filter by amenities as "OR" mode | ex: [1,2,3] |
amenities_and | filter by amenities as "AND" mode | ex: [1,2,3] |
portal | filter by portal | 'propertyfinder', 'dubizzle', 'justrentals', 'justproperty', 'bayut', 'gulfnews', 'whitelabel' |
created | filter on created date. An array or an defined interval. | ex: 'from' => '2016-01-01', 'to' => '2017-01-01', or 'current_month' |
updated | filter on updated date. An array or an defined interval. | ex: 'from' => '2016-01-01', 'to' => '2017-01-01', or 'current_month' |
unit_number | filter by unit_number | ex: Ill1232 |
license_type | filter by license_type | 'dtcm' , 'rera', 'rera_listing' |
license_permit | filter by license_number | ex: filters[license_permit]=63934 or filters[license_permit]=is_null |
license_state | filter by license_state | 'license_validated', 'license_valid', 'license_manual', 'no_license', 'expired', 'expire_in_24_h' or 'expire_in_48_h'. ex: filters[license_state]=license_valid . If this filter is used, then the "license_permit" filter will be ommited. |
cheques | filter by cheques | ex: 2 ( allowed from 0-12) |
views | filter on property views | 'sea view' |
rent_period | filter on property rent period | 'year', 'month', 'week', 'day' |
developer | filter on property developer | 'emaar' |
service_charge | filter on property service_charge | ex: 120 |
price_on_request | filter on property price_on_request | true, false, 1 , 0 |
financial_status | filter on property financial_status | 'cash', 'mortgage', 'other' |
from_floor | filter on property from_floor | min value is -10 |
to_floor | filter on property to_floor | min value is -10 and max value 200 |
from_floors | filter on property from_floors | min value is 1 |
to_floors | filter on property to_floors | min value is 1 and max value 200 |
free_hold | filter on property free hold | 'Free-hold', 'Non Free-hold', 'Lease hold' |
occupancy | filter on property occupancy | 'owner_occupied', 'investment', 'vacant', 'tenanted' |
renovation | filter on property renovation | 'fully_upgraded_indoor', 'fully_upgraded_outdoor', 'fully_upgraded_both', 'partially_upgraded_indoor' , 'partially_upgraded_outdoor', 'partially_upgraded_both' |
from_build_year | filter on property from_build_year | min value is 1900 |
to_build_year | filter on property to_build_year | min value is 1900 and max value (current year + 10) |
project_status | filter on property project_status | 'completed', 'off_plan' |
from_size | filter on property size | min value is 0 |
to_size | filter on property size | max value |
from_plot_size | filter on property plot_size | min value is 0 |
to_plot_size | filter on property plot_size | max value |
from_bua | filter on property built up area | min value is 0 |
to_bua | filter on property built up area | max value |
layout | filter on property layout | ex: '2 BR' |
plot_number | filter on property plot num | ex: 'A32' |
dewa_number | filter on property deaw | ex: '123dr546' |
project_name | filter on property project_name | ex: ghost protocol |
street_number | filter on property layout | ex: '2A' |
street_name | filter on property layout | ex: 'Al saadiyat' |
available_at | filter on property available_at | ex: 'from' => '2016-01-01', 'to' => '2017-01-01', or 'current_month' |
exclusive_start | filter on property exclusive_start | ex: 'from' => '2016-01-01', 'to' => '2017-01-01', or 'current_month' |
exclusive_end | filter on property exclusive_end | ex: 'from' => '2016-01-01', 'to' => '2017-01-01', or 'current_month' |
property_fields | filter on custom fields added in property | ex: fields => ['1' =>'shi'] |
lead_fields | filter on custom fields added in lead | ex: lead_fields => ['1' =>'shi'] |
landlord_fields | filter on custom fields added in landlord | ex: landlord_fields => ['1' =>'shi'] |
listing_level | filter by property listing level | 'premium', 'standard', 'featured' |
verified | filter by verification status | true, false, 1 , 0 |
duplicated_list | filter by duplicated_list | true, false, 1 , 0 |
from_publication_date | filter by portal publication date.This one can only be used if the filter filters[portal]= is defined |
ex: 'from_publication_date' => '2022-01-01' |
to_publication_date | filter by portal publication date.This one can only be used if the filter filters[portal]= is defined |
ex: 'to_publication_date' => '2022-06-30' |
from_quality_score | filter by quality score | ex: 'from_quality_score' => 90 |
to_quality_score | filter by quality score | ex: 'to_quality_score' => 100 |
You also can filter on property's transactions with the key transaction
in filters and define:
Name | Comment | Value |
---|---|---|
user | filter by user assigned to the transaction | ex: '1' |
date | filter on transaction date. An array or an defined interval. | ex: 'from' => '2016-01-01', 'to' => '2017-01-01', or 'current_month' |
category | filter on property transaction category | 'residential', 'commercial' |
offering_type | filter on property transaction offering type | 'rent', 'sale' |
type | filter by property transaction type | ex: 1 |
from_bedroom | filter by the given transaction from_bedroom | up to 12 |
to_bedroom | filter by the given transaction to_bedroom | up to 12, greater than from_bedroom |
from_bathroom | filter by the given transaction from_bathroom | up to 12 |
to_bathroom | filter by the given transaction to_bathroom | up to 12, greater than from_bathroom |
Curl example with custom fields:
$ curl -X GET 'http://api-v2.mycrm.com/properties?filters[property_fields]['1']=test&$filters[property_fields]['2']=test'
Curl example :
$ curl -X GET 'http://api-v2.mycrm.com/properties?filters[state]=approved'
- Sorts (possible values are ASC or DESC for all sorts). Default value is ASC:
Name | Options |
---|---|
color | |
id | |
offering_type | |
category | |
location | |
user | |
price | |
state | |
created | |
updated | |
amenity | A list of amenity can be sent like amenity(1,2,3) |
publication | Order by portal publication date. This one can only be used if the filter filters[portal]= is defined |
quality_score | |
size | |
listing_expiry_date |
Curl example :
$ curl -X GET 'http://api-v2.mycrm.com/properties?sort=id&sort_order=DESC'
- JSON response:
Name | Type | Read-only | Comment |
---|---|---|---|
id | integer | yes | Automatically assigned when the property is created |
import | array | yes | List of the imported ID from other portals |
reference | string | yes | Property's reference |
developer | string | no | Developer that built the property |
charges | integer | no | The service charges apply to the property |
parking | integer | no | The number of parking spaces available (up to 8) |
exclusivity | array | no | The exclusivity dates (start_at, end_at) |
location | Location | no | The location (composed by city, community, sub community) |
size | integer | no | The property area size |
bedrooms | integer | no | The number of bedroom |
bathrooms | integer | no | The number of bathrooms |
status | string | no | The property status (draft, available, rented, under offer, reserved, sold) |
available_from | date | no | Only if the status is "available" |
state | string | no | State (draft, pending, approved, refused, archived) |
amenities | array | no | A array of property amenities |
view_360 | string | no | A link to a 360 degrees view |
floor_number | integer | no | The floor number where the property is |
unit_number | string | no | The building unit number |
street_number | string | no | The street number |
street_name | string | no | The street number |
furnished | string | no | The furnished option (furnished, semi-furnished, unfurnished) |
type | Type | no | Property type (Villa, Bungalow, etc.) |
price | array | no | price data |
user | User | no | User related to the property (not expanded by default) |
landlord | Landlord | no | Landlord related to the property (not expanded by default) |
languages | Language[] | no | List of details by language |
created_at | string | yes | Property creation date (W3C format) |
updated_at | string | yes | Property updated date (W3C format) |
deleted_at | string | yes | Property deleted date (W3C format) |
views | array | no | array of views |
floor_plans | array | no | array of floor plans |
price_inclusive | boolean | no | If everything is inclusive in property's price. (If property is not yet set, will not be included in the response.) |
verification | array | yes | Contains list of verification_history. If the list is empty, then it means that it is not yet submitted for verification |
listing_level | string | yes | standard, featured, premium, null (if there is no pf_imported_id) |
duplicated_list | array | yes | array of property ids duplicated |
Additional fields (collections) available with the expand headers:
Name | Type | Read-only | Comment |
---|---|---|---|
images | Image[] | no | Images of the property (not expanded by default) |
transactions | [Transaction] | no | Transaction information |
matching_scores | Matching | yes | lead filter is required if specified. |
The price array contains following data :
Name | Type | Read-only | Comment |
---|---|---|---|
type | string | no | rent or sale |
period | string | no | available only if the type is rent . values : weekly , monthly , yearly |
cheques | integer | no | available only if the type is rent . Up to 12 |
value | integer | no | The price value |
on_request | boolean | no | Indicator that will display or not the price |
The language array contains following data :
Name | Type | Read-only | Comment |
---|---|---|---|
lang | string | no | Language ISO - 2 letters |
title | string | no | Property title |
description | string | no | Property description |
The floor_plans array contains following data :
Name | Type | Read-only | Comment |
---|---|---|---|
id | integer | no | Floor plan id |
display_on | array | no | Where the floor plan should be display. Available values: pdf and public_page |
The verification_history object contains the following properties:
Name | Type | Read-only | Comment |
---|---|---|---|
status | string | yes | Property verification status (pending, success, deleted, rejected, expired) |
processed_at | date | yes | The date when the verification was process by an account manager. |
- JSON response example:
{
"property": {
"id": 35436,
"import" : [
"propertyfinder": [
"id" : 123456,
"reference" : "ABC123",
],
],
"reference": "ABC-123",
"title_deed": "123456/2022",
"developer": "My awesome developer",
"charges": 44,
"parking": 2,
"exclusivity": {
"start_at" : "2009-07-20T22:55:29Z",
"end_at" : null,
},
"location" : {
"id": "are.1.12",
"city": "Dubai",
"community": "JLT",
"sub_community": "Cluster T",
"tower": "Pullman Hotel",
"latitude": 41.123164,
"longitude": 5.84756,
},
"bedrooms": 2,
"bathrooms": 1,
"status": "draft",
"state": "draft",
"amenities": [
{
"id": 2,
"name": "BBQ",
},
{
"id": 4,
"name": "Sea View",
},
],
"view_360": null,
"floor_number": 2,
"unit_number": "4A",
"street_number": 42,
"street_name": "George street",
"furnished": "furnished",
"type" : {
"id": 2,
"name": "Villa"
},
"price" : {
"type" : "rent",
"cheques": 12,
"on_request" : false,
"prices": [
{
"period": "month",
"value": 1000
},
{
"period": "year",
"value": 12000
}
]
},
"user": {
"id": 123,
},
"landlord": {
"id": 123,
},
"languages" : [
{
"lang": "en",
"title": "my awesome title",
"description": "my awesome description",
}
],
"transactions" : {
"id": "1",
"date": "2012-01-01",
"reference": "AVC123",
"type": "direct",
},
"images": [
{
"id": 123,
"order": 1,
"thumb": {
"link": "http://cdn.aws.com/thumb-1.jpg",
"width": 142,
"height": 250,
},
"medium": {
"link": "http://cdn.aws.com/medium-1.jpg",
"width": 142,
"height": 250,
},
}
],
"created_at": "2009-07-20T22:55:29Z",
"updated_at": "2011-05-05T10:38:52Z",
"deleted_at": "2011-05-05T10:38:52Z",
"views": [
"Sea View",
"land View"
],
"floor_plans": [
{"id": 123, "type": "my_floor_plan", "display_on": ["pdf", "public_page"]},
{"id": 456, "type": "my_floor_plan", "display_on": ["pdf"]},
{"id": 789, "type": "pf_floor_plan", "display_on": ["public_page"]},
{"id": 111, "type": "pf_floor_plan", "display_on": []}
],
"price_inclusive": true,
"listing_level": null,
"listing_level_date": null,
"duplicated_list": [
"1234",
"87654"
],
"verification": [{
"status": "cancelled",
"processed_at": "2011-10-05T10:38:52Z",
},
{
"status": "verified",
"processed_at": "2011-10-05T10:38:52Z",
},
{
"status": "pending",
"processed_at": "2011-10-05T10:38:52Z",
}]
}
}
Get Properties Options
- Endpoint:
OPTIONS /properties
- Allowed for:
Anyone authenticated
- JSON response:
{
"configuration": {
"type": [
{
"id": 1,
"name": "Apartment",
"category": "residential",
"for_rent": true,
"for_sale": true
},
{
"id": 2,
"name": "Bungalow",
"category": "residential",
"for_rent": true,
"for_sale": true
},
[...]
],
"amenity": [
{
"id": 1,
"name": "swimming pool",
"for_residential": true,
"for_commercial": true
},
{
"id": 2,
"name": "Balcony",
"for_residential": true,
"for_commercial": true
},
[...]
],
"category": [
"residential",
"commercial"
],
"state": [
"draft",
"pending",
"approved",
"refused",
"archived"
],
"status": [
"draft",
"available",
"rented",
"under offer",
"reserved",
"sold"
],
"furnished": [
"furnished",
"unfurnished",
"semi-furnished"
],
"freehold": [
"Free-hold",
"Non Free-hold",
"Lease hold"
],
"offering_type": [
"rent",
"sale"
]
},
"methods": {
"GET": {
"description": "Get a single property"
},
"POST": {
"description": "Create a property"
},
"PATCH": {
"description": "Apply an action on a property"
},
"PUT": {
"description": "Update a property"
},
"DELETE": {
"description": "Delete a property"
}
}
}
Get Properties
- Endpoint:
GET /properties
- Allowed for:
users that has right property.read
- JSON response:
This endpoint will return a list of Property.
- JSON response example:
{
"property": [
{
"id": 223443,
"reference": "123ABC",
...
},
{
"id": 8678530,
"reference": "456ABC",
...
}
]
}
Create Property
- Endpoint:
POST /properties
- Allowed for:
users that has right property.update
- JSON request
Name | Type | Mandatory | Comment |
---|---|---|---|
user | integer | no | Reserved for the the right property.update.other |
landlord | integer | no | Reserved for the the right landlord.update.other |
reference | string | no | The reference assigned to the property. If null, a default value will be used |
draft | boolean | yes | Mark a property as draft |
bathrooms | integer | yes/no* | Number of bathrooms (*if the property type supports it) - up to 12 |
bedrooms | integer | yes/no* | Number of bedrooms (*if the property type supports it) - up to 12 |
size | float | yes | Size of the property |
type | integer | yes | Property type ID |
status | string | yes | The property status (draft, available, rented, under offer, reserved, sold) |
available_from | date | no | Only if the status is available |
languages | array | yes | An array of language data, minimum one language |
developer | string | no | Building developer name |
exclusivity | array | no | list of exclusivity date |
amenities | array | no | A array of property amenities (array od ID) |
floor_number | integer | no | The floor number where the property is |
unit_number | string | no | The building unit number |
street_number | string | no | The street number |
street_name | string | no | The street number |
furnished | string | no | The furnished option (furnished, semi-furnished, unfurnished) |
location | Location | yes | Location ID is required, latitude and longitude field are optional |
parking | integer | no | The number of parking spaces available (up to 8) |
charges | integer | no | The service charges apply to the property |
view_360 | string | no | A link to a 360 degrees view |
price | array | yes* | price data, only the price value is required |
publication | array | no | List of portals that will publish the property |
images | Image[] | no | List of images |
notes | Note[] | no | Properties' notes |
licenses | Array Collection | no | Property licenses |
floors | integer | no | (*if the property type supports it) 1-200 or null |
freehold | string | no | (*if the property type supports it) and is available for UAE only. Possible values [yes, no, null] |
occupancy | string | no | (*if the property type supports it) [owner_occupied, investment, vacant, tenanted] or null |
renovation | string | no | (*if the property type supports it) [fully_upgraded_indoor, fully_upgraded_outdoor, fully_upgraded_both, partially_upgraded_indoor, partially_upgraded_outdoor, partially_upgraded_both] |
project_status | string | no | (*if the property type supports it) [completed, off_plan, completed_primary (AE), off_plan_primary (AE)] |
financial_status | string | no | (*if the property type supports it) [cash, mortgage] |
build_year | string | no | (*if the property type supports it) YYYY-MM-DD |
built_up_area | float | no | (*if the property type supports it) 123.45 |
plot_size | float | no | (*if the property type supports it) 123.45 |
prices | array | yes (only for rent) | Prices list |
views | array | yes | views list |
fields | array | mandatory | custom field list |
price_inclusive | boolean | no | (*currently enabled for Bahrain only.) |
title_deed | string | no | (*currently enabled for UAE only.) |
street_direction | string | no | Is available for KSA only. Possible values [North, South, West, East, Northeast, Northwest, Southeast, Southwest] |
Here the licenses data description:
Name | Type | Mandatory | Comment |
---|---|---|---|
number | string or integer | yes | none |
issue_date | string | yes if validation is set to manual |
none |
expiry_date | string | yes if validation is set to manual |
none |
validation | string | yes | manual or automatic |
Here the languages data description:
Name | Type | Mandatory | Comment |
---|---|---|---|
en | array | no | English details |
ar | array | no | Arabic details |
fr | array | no | French details |
Each array of details will contains :
Name | Type | Mandatory | Comment |
---|---|---|---|
title | string | yes | Property title |
description | string | yes | Property description |
Here the exclusivity data description:
Name | Type | Mandatory | Comment |
---|---|---|---|
start_at | date | no | Date where exclusivity starts |
end_at | date | no | Date where exclusivity ends |
When an array needs a fix or percentage value, one of these two following key will be required:
| value | integer | no | A fix value like 10000
|
| percentage | integer | no | A percentage from 0 to 100 |
Here the price data description for sale:
Name | Type | Mandatory | Comment |
---|---|---|---|
offering | string | yes | sale or rent |
value | integer | yes | The price value |
on_request | boolean | no | false as default. Indicator that will display or not the price |
Here the price data description for rent:
Name | Type | Mandatory | Comment |
---|---|---|---|
offering | string | yes | sale or rent |
cheques | integer | no | available only if the type is rent . Up to 12 |
on_request | boolean | no | false as default. Indicator that will display or not the price |
default_period | string | yes | year , month , week or day |
prices | Array | yes | Price list (see below) |
Prices description for rent:
Name | Type | Mandatory | Comment |
---|---|---|---|
period | string | yes | year , month , week or day |
value | integer | yes | The price |
Example:
"prices": [
{
"period": "month",
"price": 1000
},
{
"period": "year",
"price": 12000
}
]
Here the publication data description:
Name | Type | Mandatory | Comment |
---|---|---|---|
propertyfinder | boolean | no | true : auto publication. false will remove publication. Missing value won't change anything |
dubizzle | boolean | no | true : auto publication. false will remove publication. Missing value won't change anything |
justproperty | boolean | no | true : auto publication. false will remove publication. Missing value won't change anything |
justrentals | boolean | no | true : auto publication. false will remove publication. Missing value won't change anything |
bayut | boolean | no | true : auto publication. false will remove publication. Missing value won't change anything |
gulfnews | boolean | no | true : auto publication. false will remove publication. Missing value won't change anything |
whitelabel | boolean | no | true : auto publication. false will remove publication. Missing value won't change anything |
- JSON request example:
{
"property": {
"draft": false,
"bathrooms": 1,
"bedrooms": 1,
"size": 123456,
"title_deed": "123456/2022",
"type": 2,
...
"languages" : {
"en": {
"title": "foo",
"description": "bar"
}
},
"licenses": {
"rera": {
"number": "1234",
"issue_date": "2017-06-30",
"expiry_date": "2017-06-30",
"state": "manual"
},
"rera_listing": {
"number": "1234567898",
"issue_date": "2017-06-30",
"expiry_date": "2017-06-30",
"state": "manual"
},
"dtcm": {
}
},
"fields": {
"1": "2 pets", // id of the field => value of the field
"3": true
},
"matching_scores": {
"score": 100,
"attributes": {
"bedroom": 100,
"price": 100,
"size": 100,
"type": 100,
"amenity": null,
"distance": 100
},
"source": "inventory"
}
...
},
}
- JSON response:
This endpoint will return a Property.
Update Property
- Endpoint:
PUT /properties
- Allowed for:
users that has right property.update
- JSON request
The mandatory fields are similar than property creation.
- JSON request
Name | Type | Mandatory | Comment |
---|---|---|---|
floor_plans | array | no | Collection of floor plans parameters |
Floor plans parameters
Name | Type | Mandatory | Comment |
---|---|---|---|
type | string | yes | my_floor_plan or pf_floor_plan |
id | integer | no | Floor plan ID. Depending on type. if type is pf_floor_plan the ID is a Propertyfinder Floor plan ID. If type is my_floor_plan , the ID is a property document ID |
token | string | no | Only in case of my_floor_plan : Upload token. This token should be defined in the document list af the current request. |
display_on | array of string | yes | pdf or public-page |
- JSON response:
This endpoint will return a Property.
- JSON response example:
{
"property": {
"id": 223443,
"reference": "ABC123",
"licenses": {
"rera": {
"number": "1234",
"issue_date": "2017-06-30",
"expiry_date": "2017-06-30",
"state": "valid"
},
"dtcm": {
}
}
...
},
}
Delete Property
DELETE /properties/{id}
- Allowed for:
users that has right property.update
- JSON response:
This endpoint will return a 204 http code if success.
Bulk Actions
PATCH /properties
- Allowed for:
users that has right property.update and property.approve (state action)
users that has right property.update, user.update and property.update.other (assignment action)
users that has right property.update (publication action)
- JSON request:
Some actions are available:
Approve or refuse a property:
Name | Type | Mandatory | Comment |
---|---|---|---|
op | string | yes | Operation to execute (replace ) |
path | string | yes | Path "/id/state" to update the state. id must be an integer |
value | object | yes | state value data |
Here the value data description:
Name | Type | Mandatory | Comment |
---|---|---|---|
state | string | yes | approved or refused or archived |
reason | string | no | Reason when state is refused |
Publish or Unpublish a property:
Name | Type | Mandatory | Comment |
---|---|---|---|
op | string | yes | Operation to execute (add or remove ) |
path | string | yes | Path "/id/publication" to update the publication. id must be an integer |
value | string | yes | Any enabled portal code |
Assign a property to an agent:
Name | Type | Mandatory | Comment |
---|---|---|---|
op | string | yes | Operation to execute (replace ) |
path | string | yes | Path "/id/assignment/user" to update the assignment. id must be an integer |
value | integer | yes | Agent ID |
Assign a property to a landlord:
Name | Type | Mandatory | Comment |
---|---|---|---|
op | string | yes | Operation to execute (replace ) |
path | string | yes | Path "/id/assignment/landlord" to update the assignment. id must be an integer |
value | integer | yes | Landlord ID |
Assign a property to a lead:
Name | Type | Mandatory | Comment |
---|---|---|---|
op | string | yes | Operation to execute (replace ) |
path | string | yes | Path "/id/assignment/lead" to update the assignment. id must be an integer |
value | integer | yes | Lead ID |
Assign a rera permit to several properties:
Name | Type | Mandatory | Comment |
---|---|---|---|
path | string | yes | Path "/id/assignment/rera" to update the assignment. id must be an integer |
value | array | yes | An array of RERA atributes |
RERA attributes:
Name | Type | Mandatory | Comment |
---|---|---|---|
type | string | yes | permit or listing |
number | string or integer | yes | none |
issue_date | string | yes if validation is set to manual |
none |
expiry_date | string | no | none |
validation | string | yes | manual or automatic |
Refresh quality score for a property:
Name | Type | Mandatory | Comment |
---|---|---|---|
op | string | yes | Operation to execute (refresh ) |
path | string | yes | Path "/id/quality_score" to refresh. id must be an integer |
value | null | yes | null |
Watermark images from a single property:
Name | Type | Mandatory | Comment |
---|---|---|---|
op | string | yes | Operation to execute (watermark ) |
path | string | yes | Path "/id/images" to update the assignment. id must be an integer |
value | string | yes | attach or detach to attach or detach watermark from images |
Watermark a single image from a single property:
Name | Type | Mandatory | Comment |
---|---|---|---|
op | string | yes | Operation to execute (watermark ) |
path | string | yes | Path "/id/images/image_id" to update the assignment. id and image_id must be an integer |
value | string | yes | attach or detach to attach or detach watermark from images |
Duplicate a Property:
Name | Type | Mandatory | Comment |
---|---|---|---|
op | string | yes | Operation to execute (duplicate ) |
path | string | yes | Path "/id/duplication" to duplicate the property. id must be an integer |
value | object | yes | count : how many times you want to duplicate the property, increment : array of fields you want the value to be incremented (Possible values for now are: unit_number, floor ). Thids field can take several values. excludes : list of fields you don't want to get duplicated |
Add or remove a floor plan property:
Name | Type | Mandatory | Comment |
---|---|---|---|
op | string | yes | Operation to execute (add or remove ) |
path | string | yes | Path "/id/pf_floor_plan" . id must be an integer |
value | string | yes | id of floor plan |
Update property Listing level:
Name | Type | Mandatory | Comment |
---|---|---|---|
op | string | yes | Operation to execute (replace ) |
path | string | yes | Path "/listing_level" to update the state. id must be an integer |
value | object | yes |
Name | Type | Mandatory | Comment |
---|---|---|---|
listing_level | string | yes | standard/premium/featured |
product_id | string | yes | ca731c8c |
renewal | int (0/1) | no/yes | if credit client field is mandatory |
Update Renewal:
Name | Type | Mandatory | Comment |
---|---|---|---|
op | string | yes | Operation to execute (replace ) |
path | string | yes | Path "/renewal" to update the renewal. id must be an integer |
value | object | yes |
Name | Type | Mandatory | Comment |
---|---|---|---|
product_id | string | yes | ca731c8c |
renewal | int (0/1) | yes | if credit client field is mandatory |
- JSON request example with mixed operations:
{
"operations": [
{ "op": "replace", "path": "/1/state", "value": {"state": "approved" }},
{ "op": "replace", "path": "/2/state", "value": {"state": "archived" }},
{ "op": "replace", "path": "/5/state", "value": {"state": "refused", "reason": "I hate this part" }},
{ "op": "add", "path": "/*/publication", "value": "propertyfinder" },
{ "op": "replace", "path": "/1/assignment/user", "value": "2" },
{ "op": "replace", "path": "/1/assignment/landlord", "value": "3" },
{ "op": "replace", "path": "/2/assignment/lead", "value": "1" },
{ "op": "replace", "path": "/2/assignment/rera", "value": null },
{ "op": "replace", "path": "/3/assignment/rera", "value": { "validation": "automatic", "number":1234, "type": "permit" }},
{ "op": "replace", "path": "/3/assignment/rera", "value": { "validation": "automatic", "number":123456789, "type": "listing" }},
{ "op": "refresh", "path": "/3/quality_score", "value": null },
{ "op": "duplicate","path": "/3/duplication", "value": {"count": 1, "increment":["unit_number"], "excludes": ["documents"]} },
{ "op": "add", "path": "/1/assignment/floor_plan", "value": { "id": 1234, "type": "my_floor_plan","display_on": ["public-page", "pdf"] }},
{ "op": "remove", "path": "/3/assignment/floor_plan", "value": { "id": 4567, "type": "pf_floor_plan"}},
{ "op":"replace", "path":"/listing_level","value":{"listing_level":"featured","product_id":"ca731c8c-98fd-11ea-a2d4-ad21ef03ed0a", "renewal": 1}}
{ "op":"replace", "path":"/renewal","value":{"product_id":"ca731c8c-98fd-11ea-a2d4-ad21ef03ed0a", "renewal": 1}}
]
}
{
"operations": [
{ "op": "replace", "path": "/1/state", "value": {"state": "approved" }},
{ "op": "replace", "path": "/2/state", "value": {"state": "archived" }},
{ "op": "replace", "path": "/5/state", "value": {"state": "refused", "reason": "I hate this part" }},
{ "op": "add", "path": "/*/publication", "value": "propertyfinder" },
{ "op": "replace", "path": "/1/assignment/user", "value": "2" },
{ "op": "replace", "path": "/1/assignment/landlord", "value": "3" },
{ "op": "replace", "path": "/2/assignment/lead", "value": "1" },
{ "op": "watermark", "path": "/1/images", "value": "detach" },
{ "op": "watermark", "path": "/1/images/2", "value": "attach" }
]
}
- JSON response:
Will return a 204 http code.
Bulk Deletes
DELETE /properties
- Allowed for:
users that has right property.update
- JSON request:
An array of property ID. If you don't pass any ID, it will delete all properties.
- JSON request example:
{
"properties": [
1, 2, 3
]
}
- JSON response:
Will return a 204 http code.
Bulk Emailing
POST /properties/email
- Allowed for:
users that has right property.read
- JSON request:
Name | Type | Mandatory | Comment |
---|---|---|---|
properties | array | yes | List of property ID |
mls_properties | array | no | List of MLS property ID |
to | array | yes | List of emails |
subject | string | yes | Email subject |
body | string | yes | Email body |
copy | boolean | yes | If the connected user want to receive a copy |
language | boolean | yes | Email language (fr , en or ar ) |
- JSON request example:
{
"email": {
"properties": [1, 2, 3],
"to": ["foo@bar.com", "baz@foo.com"],
"subject": "Hello!",
"body": "How are you?",
"copy": false,
"language": "fr",
}
}
- JSON response:
Will return a 201 http code.
Image Management
You can manage your images directly in property POST/PUT action with an image list.
Data for a new image :
Name | Type | Mandatory | Comment |
---|---|---|---|
token | string | yes | Upload token |
order | integer | no | Image's order |
- JSON request example:
{
"property": {
"images": [
{
"token": "azertyuiop",
"order": 1
},
{
"token": "azertyuiop-2",
"order": 2
}
]
}
}
Data for a existing image :
Name | Type | Mandatory | Comment |
---|---|---|---|
id | integer | yes | Image's id |
order | integer | no | Image's order |
- JSON request example:
{
"property": {
"images": [
{
"id": "1234",
"order": 1
},
{
"token": "azertyuiop-2",
"order": 2
}
]
}
}
Document Submission
In order to verify document into PF manager, you can use the endpoint PATCH /properties/1
from the API.
The endpoint takes in argument two keys for as values:
Name | Type | Mandatory | Comment |
---|---|---|---|
op | string | yes | Operation to execute (submit ) |
path | string | yes | Path /id/verification to submit the documents of the property. id must be an integer |
value | string | yes | documents list, and wether or not you want to add the just uploaded documents to the user cloud |
Here are the availables arguments for the value
documents
:
The keys are form_a
, title_deed
, passport_copy
, additional_document
.
All keys are mandatory except additional_document
.
The key additional_document
can take several documents to be attached.
In case you want to submit an already attached document to the property :
Name | Type | Mandatory | Comment |
---|---|---|---|
id | integer | yes | The id of the document you want to attach |
tag | string | no | the tag you want to attach to the documents |
In case you want to submit an 'just uploaded' document : |
Name | Type | Mandatory | Comment |
---|---|---|---|
token | integer | yes | The token of the upload object |
title | string | yes | The title of the document |
tag | string | no | the tag you want to attach to the documents |
- JSON request example:
{
"operations": [
{ "op": "submit", "path": "/1/verification", "value": {"document_add": true, "documents": {"form_a": {"id":1}, "title_deed": {"id": 23}, "passport_copy": {"token": "azerty-blanchon", "title":"PassPort Copy of Vincent"}, "additional_document": [{"id": 18}, {"token": "qwerty-mitali", "title": "Additional Document for Mitali"} ]} }},
]
}