Delete Customer

Delete Customer

Purpose

To delete prospect/location from your organization.

Request URL

https://live.membroz.com/api/prospects/[prospectid]

Request Method

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

Request JSON

Attribute Data Type Mandatory Description
PROSPECTID String yes The record ID of the prospect you want to update. it is pass in request /api/prospects/[prospectid]

Sample Request

curl --location --request DELETE 'https://live.membroz.com/api/prospects/[prospectid]' \
--header 'authkey: XXXXXXX'\
--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/prospects/[prospectid]")
  .method("DELETE", body)
  .addHeader("authkey", "XXXXXXX")
  .build();
Response response = client.newCall(request).execute();
 "https://live.membroz.com/api/prospects/[prospectid]",
  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: XXXXXXX"
  ),
));

$response = curl_exec($curl);

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

url = "https://live.membroz.com/api/prospects/[prospectid]"

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

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/prospects/[prospectid]")

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

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

response = https.request(request)
puts response.read_body
var client = new RestClient("https://live.membroz.com/api/prospects/[prospectid]");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
request.AddHeader("authkey", "XXXXXXX");
request.AddParameter("text/plain", "",  ParameterType.RequestBody);
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!