Delete Facilitie Service Data

Delete Facilitie Service Data

Purpose

To delete Facilitie/location from your organization.

Request URL

https://live.membroz.com/api/facilities/[faciliteid]

Request Method

DELETE
Note
  • Send authkey in https header
  • You can delete only one facilitie per request.
  • Enterprise customer can replace domain name with their hosting Url. for example https://app.xyz.com/api/facilitie
  • API return success message or return error message.

Request JSON

Attribute Data Type Mandatory Description
FACILITIEID String yes The record ID of the facilitie you want to update. it is pass in request /api/facilities/[faciliteid]

Sample Request

curl --location --request DELETE 'https://live.membroz.com/api/facilities/[faciliteid]'\
--header 'authkey: XXXXXXXXXXX' \
--data-raw ''
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://live.membroz.com/api/facilities/[faciliteid]")
  .method("DELETE", body)
  .addHeader("authkey", " XXXXXXXXXXX")
  .build();
Response response = client.newCall(request).execute();
 "https://live.membroz.com/api/facilities/[faciliteid]",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "authkey:  XXXXXXXXXXX"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://live.membroz.com/api/facilities/[faciliteid]"

payload = {}
headers = {
  'authkey':  'XXXXXXXXXXX'
}

response = requests.request("DELETE", url, headers=headers, data = payload)

print(response.text.encode('utf8'))
require "uri"
require "net/http"

url = URI("https://live.membroz.com/api/facilities/[faciliteid]")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["authkey"] = " XXXXXXXXXXX"

response = https.request(request)
puts response.read_body
var client = new RestClient("https://live.membroz.com/api/facilities/[faciliteid]");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
request.AddHeader("authkey", " XXXXXXXXXXX");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Possible Errors

HTTP Status Error Code Message Reason
permission denied 403 You do not have permission

Sample Response

{
    "message": "DELETED"
}
Send Message
Hello!
How can we help!