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
areaThe area covered under the Property.
location: address: buildingNumberBuilding 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: apartmentNumber (optional)Apartment number.Data type: string
location: address: floor (optional)Floor on which the apartment is.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,
  "location": {
    "address": {
      "buildingNumber": "187",
      "addressLine1": "9th Cross Road",
      "addressLine2": "Fairhope, AL 36532",
      "addressLine3": "Mount Vernon",
      "apartmentNumber": "A1",
      "floor": "F1",
      "zipCode": "32159",
      "city": "Henrico",
      "state": "VA",
      "country": {
        "code": "BMU",
        "name": "Bermuda"
      }
    },
    "geoLocation": {
      "lat": "45",
      "long": "90"
    }
  }
}
{
  "propertyName": "Example Property",
  "propertyCode": "REGNO:985634",
  "propertyOwnerId": "RG Estate",
  "area": 120000,
  "location": {
   "address": {
      "buildingNumber": "189",
      "addressLine1": "9th Cross Road",
      "addressLine2": "Fairhope, AL 36532",
      "addressLine3": "Mount Vernon",
      "apartmentNumber": "A1",
      "floor": "F1",
      "zipCode": "32159",
      "city": "Henrico",
      "state": "VA",
      "country": {
        "code": "BMU",
        "name": "Bermuda"
      }
    },
    "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
operatingHours (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)
numberOfDocks (optional)Number of docks in a Facility.Data type: string

The following example request body shows how to create and update a Facility named Example Facility:

{
  "facilityName": "Example Facility",
  "facilityCode": "REGNO:92938343",
  "facilityOwnerId": "tenant:0e85e4d8-e9d5-4706-a33c-8ca013092e76",
  "facilityType": "PUD Center",
  "propertyId": "properties:0e85e4d8-e9d5-4706-a33c-8ca013092e76",
  "area": 75,
  "operatingHours": "10:00AM-11:30PM",
  "operatingDays": "Mon, Tue, Wed",
  "numberOfDocks": "3"
}
{
  "facilityName": "Example Property",
  "facilityCode": "REGNO:92938343",
  "facilityOwnerId": "tenant:0e85e4d8-e9d5-4706-a33c-8ca013092e76",
  "facilityType": "PUD Center",
  "propertyId": "properties:0e85e4d8-e9d5-4706-a33c-8ca013092e76",
  "area": 77,
  "operatingHours": "10:00AM-11:30PM",
  "operatingDays": "Mon, Tue, Thurs",
  "numberOfDocks": "4"
}

To map multiple Facilities to the same Property, specify the property ID of the Property in the propertyId parameter of the request body.