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:

MemberDescriptionRemarks
propertyNameName of the participant Property.Data type: string
Character length: Min- 1 & Max- 64
propertyCodeAny unique ID associated with the participant Property being created.Data type: string
Character length: Min- 1 & Max- 64
propertyOwnerIdThe 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
propertyOwnershipType of Ownership. Value: self, rented, partner, client Data type: String
areaThe area covered under the Property.
location: address: housenumberBuilding number in which the apartment is.Data type: string
location: address: addressLine1Address 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: zipCodeZip code of the Property.Data type: string
location: address: cityCity of the Property.Data type: string
location: address: stateState of the Property.Data type: string
location: address: country: codeCountry code.Data type: string
String in ISO 3166-1 alpha-2
location: address: country: nameCountry name.Data type: string
geolocation: latitudeLatitude of the Property.Data type: string
geolocation: longitudeLongitude 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:

MemberDescriptionRemark
facilityNameName of the participant Facility.Data type: string
Character length: Min- 1 & Max- 64
facilityCodeAny unique ID associated with the participant Facility being created.Data type: string
Character length: Min- 1 & Max- 64
facilityOwnerIdThe 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
facilityTypeType of Facility.Data type: string
propertyIdID of the Property to which this Facility belongs.Data type: string
areaArea 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)
startTimeStarting time of the facilityData Type: String
endtimeEnd time of facilityData Type: String
teams (optional)The array of team IDs the facility belongs toData 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.