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

After the Attributes and Templates are in place, you can create a 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

area

The area covered under the Property.

location: address: buildingNumber

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: apartmentNumber (optional)

Apartment number.

Data type: string

location: address: floor (optional)

Floor on which the apartment is.

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,
  "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:

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

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.


Did this page help you?