DispatchOne Solution
Facility API

Creating Property and Facility

3min

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:

Create Property
Update Property


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/facility 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:

Create a Facility
Update a Facility


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