DispatchOne Solution
Facility API
Creating Property and Facility
3 min
creating property to create a property, call the post /properties endpoint and specify the following parameters in the request body true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type the following example request body shows how to create and update a property named example property create property { "propertyname" "example property", "propertycode" "regno 784734", "propertyownerid" "rg estate", "area" 120000, "propertyownership" "self", "location" { "address" { "housenumber" "123", "addressline1" "main street", "addressline2" "anytown", "zipcode" "10001", "city" "queens", "state" "new york", "country" { "code" "us", "name" "united states" } }, "geolocation" { "lat" "45", "long" "90" } } } update property { "area" 1200, "propertyownership" "tenant", "tostate" "active\ active", "location" { "address" { "housenumber" "123", "addressline1" "main street", "addressline2" "anytown", "zipcode" "10001", "city" "queens", "state" "new york", "country" { "code" "us", "name" "united states" } }, "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 https //docs getos1 com/reference/create a facility endpoint and specify the following parameters in the request body true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type the following example request body shows how to create and update a facility named example facility create a 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" "123", "addressline1" "main street anytown", "addressline2" "sample road", "city" "queens", "state" "new york", "zipcode" "10001", "country" { "code" "us", "name" "united states" } }, "geolocation" { "lat" "45", "long" "90" } } } } update a facility { "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