Load App APIs
Facilities
Get facilities details
1 min
code examples curl location globoff 'https //{tenantsubdomain}/tms/api/v1/demands/facilities detail?facilityids=string\&resolvepoc=true' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //{tenantsubdomain}/tms/api/v1/demands/facilities detail?facilityids=string\&resolvepoc=true", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //{tenantsubdomain}/tms/api/v1/demands/facilities detail?facilityids=string\&resolvepoc=true") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = https request(request) puts response read body import requests import json url = "https //{tenantsubdomain}/tms/api/v1/demands/facilities detail?facilityids=string\&resolvepoc=true" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // facilities details retrieved successfully { "success" true, "data" \[ { "allowedowner" "", "area" "", "endtime" "16 00", "facilitytype" "rdc", "operatingdays" \[ "" ], "operatingduration" "540 0", "primarypoc" { "emailid" { "primary" "abc2\@gmail com" }, "name" "amit", "phoneno" { "countrycode" "+91", "number" "9010202011" } }, "propertycity" "agartala", "propertycountry" "india", "propertyid" "properties\ a5b02112 d313 5a1e 8814 3cbc29182a02", "propertystate" "tripura", "starttime" "07 00", "teams" "", "id" "facilities\ a5b02112 d313 5a1e 8814 3cbc29182a02", "name" "agartala 799002", "uniquecode" "ggn", "enablenotifications" false, "property details" { "allowedowner" "", "area" "", "location" { "address" { "addressline1" "agartala", "city" "agartala", "country" { "code" "in", "name" "india" }, "state" "tripura", "zipcode" "799002" }, "geolocation" { "lat" "+23 837876", "long" "+91 266999" } }, "locationid" "location 1355f1a6 7e59 51f1 b0dc ecb322b5dc10" } } ] }// bad request missing facility ids { "success" false, "error" "" }// internal server error { "success" false, "error" "", "error code" "" }
