Creating Property and Facility
As per the workflow, you first need to create a Property and then create a facility(s) to map with the created Property.
Creating Property
To create a Property, call the POST /properties
endpoint and specify the following parameters in the request body:
Member | Description | Remarks |
---|---|---|
propertyName | Name of the participant Property. | Data type: string Character length: Min- 1 & Max- 64 |
propertyCode | Any unique ID associated with the participant Property being created. | Data type: string Character length: Min- 1 & Max- 64 |
propertyOwnerId | The participant ID of the participant type as specified in allowedOwners during the creation of the said type. | Data type: string Character length: Min- 1 & Max- 64 |
propertyOwnership | Type of Ownership. Value: self, rented, partner, client | Data type: String |
area | The area covered under the Property. | |
location : address : housenumber | Building number in which the apartment is. | Data type: string |
location : address : addressLine1 | Address line 1. | Data type: string |
location : address : addressLine2 (optional) | Optional address line 2. | Data type: string |
location : address : addressLine3 (optional) | Optional address line 3. | Data type: string |
location : address : zipCode | Zip code of the Property. | Data type: string |
location : address : city | City of the Property. | Data type: string |
location : address : state | State of the Property. | Data type: string |
location : address : country : code | Country code. | Data type: string String in ISO 3166-1 alpha-2 |
location : address : country : name | Country name. | Data type: string |
geolocation : latitude | Latitude of the Property. | Data type: string |
geolocation : longitude | Longitude of the Property. | Data type: string |
The following example request body shows how to create and update a Property named Example Property:
{
"propertyName": "Example Property",
"propertyCode": "REGNO:784734",
"propertyOwnerId": "RG Estate",
"area": 120000,
"propertyOwnership": "self",
"location": {
"address": {
"houseNumber": "187",
"addressLine1": "9th Cross Road",
"addressLine2": "Fairhope, AL 36532",
"addressLine3": "Mount Vernon",
"zipCode": "32159",
"city": "Henrico",
"state": "VA",
"country": {
"code": "BMU",
"name": "Bermuda"
}
},
"geoLocation": {
"lat": "45",
"long": "90"
}
}
}
{
"area": 1200,
"propertyOwnership": "Tenant",
"toState": "active:active",
"location": {
"address": {
"houseNumber": "187",
"addressLine1": "9th Cross Road",
"addressLine2": "Binnamangala 1st Stage",
"addressLine3": "Indira Nagar",
"zipCode": "562123",
"city": "Bengaluru",
"state": "Karnataka",
"country": {
"code": "IN",
"name": "India"
}
},
"geoLocation": {
"lat": "45",
"long": "90"
}
}
}
After you create a Property, the response from the call includes a propertyId
that will be used during the Facility creation process to map it to the Property.
When you fetch Property details using the GET /properties
API, the response includes a locationId
which is a system-generated unique identifier.
Creating Facility
To create a Facility, call the POST /facilities
endpoint and specify the following parameters in the request body:
Member | Description | Remark |
---|---|---|
facilityName | Name of the participant Facility. | Data type: string Character length: Min- 1 & Max- 64 |
facilityCode | Any unique ID associated with the participant Facility being created. | Data type: string Character length: Min- 1 & Max- 64 |
facilityOwnerId | The participant ID of the participant type as specified in allowedOwners during the creation of the said type. | Data type: string Character length: Min- 1 & Max- 64 |
facilityType | Type of Facility. | Data type: string |
propertyId | ID of the Property to which this Facility belongs. | Data type: string |
area | Area of the Facility. | Data type: number |
operatingduration (optional) | Hours of operation of the Facility. | Data type: string (hh:mm:ss to hh:mm:ss) |
operatingDays (optional) | Days of operation of the Facility. | Data type: string (days of the week/dates in a month) |
startTime | Starting time of the facility | Data Type: String |
endtime | End time of facility | Data Type: String |
teams (optional) | The array of team IDs the facility belongs to | Data type: array |
The following example request body shows how to create and update a Facility named Example Facility:
{
"facilityName": "Test Hub",
"facilityCode": "REGNO:92938343",
"facilityOwnerId": "tenant:0e85e4d8-e9d5-4706-a33c-8ca013092e76",
"facilityType": "PUDCenter",
"area": 75,
"operatingDuration": "10:00AM-11:30PM",
"operatingDays": [
"Mon",
"Tue",
"Wed"
],
"startTime": "10:00 AM",
"endTime": "10:00 AM",
"teams": [
"teams:2452-2253-2223-3332",
"teams:5437-2273-8972-3345"
],
"propertyId": "properties:0e85e4d8-e9d5-4706-a33c-8ca013092e76",
"property": {
"propertyName": "Bhiwandi Plot 23",
"propertyCode": "REGNO:784734",
"propertyOwnerId": "RG Estate",
"area": 120000,
"propertyOwnership": "Tenant",
"location": {
"address": {
"houseNumber": "187",
"addressLine1": "9th Cross Road",
"addressLine2": "Fairhope, AL 36532",
"addressLine3": "Mount Vernon",
"zipCode": "32159",
"city": "Henrico",
"state": "VA",
"country": {
"code": "BMU",
"name": "Bermuda"
}
},
"geoLocation": {
"lat": "45",
"long": "90"
}
}
}
}
{
"propertyId": "properties:0e85e4d8-e9d5-4706-a33c-8ca013092e76",
"area": 75,
"operatingDuration": "10:00AM-11:30PM",
"startTime": "10:00AM",
"endTime": "11:30PM",
"operatingDays": [
"Mon",
"Tue",
"Wed"
],
"toState": "active:active"
}
To map multiple Facilities to the same Property, specify the property ID of the Property in the propertyId
parameter of the request body.
Updated 5 days ago