Archive or permanently delete patient profile
curl --request DELETE \
--url https://api.eka.care/profiles/v1/patient/{oid} \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>'import requests
url = "https://api.eka.care/profiles/v1/patient/{oid}"
headers = {
"client-id": "<client-id>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'client-id': '<client-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.eka.care/profiles/v1/patient/{oid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.delete("https://api.eka.care/profiles/v1/patient/{oid}")
.header("client-id", "<client-id>")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/profiles/v1/patient/{oid}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("client-id", "<client-id>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/profiles/v1/patient/{oid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["client-id"] = '<client-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Profile archived successfully"
}{
"message": "Not found",
"code": "profile_not_found"
}Patient Directory APIs
Archive or permanently delete patient profile
By default, the patient profile is archived (soft delete). Archived profiles can still be retrieved using the arc=true query parameter in the retrieve API.
To permanently delete an already archived profile, set the perm=true query parameter. Permanent deletion is only allowed on profiles that have already been archived.
DELETE
/
profiles
/
v1
/
patient
/
{oid}
Archive or permanently delete patient profile
curl --request DELETE \
--url https://api.eka.care/profiles/v1/patient/{oid} \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>'import requests
url = "https://api.eka.care/profiles/v1/patient/{oid}"
headers = {
"client-id": "<client-id>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'client-id': '<client-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.eka.care/profiles/v1/patient/{oid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.delete("https://api.eka.care/profiles/v1/patient/{oid}")
.header("client-id", "<client-id>")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/profiles/v1/patient/{oid}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("client-id", "<client-id>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/profiles/v1/patient/{oid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["client-id"] = '<client-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Profile archived successfully"
}{
"message": "Not found",
"code": "profile_not_found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Example:
"EC_1431"
Path Parameters
Example:
18661861868168
Query Parameters
Example:
true
Permanently delete an archived profile. The profile must already be archived for this to take effect.
Example:
true
Response
Patient profile archived or permanently deleted successfully
Example:
"Profile archived successfully"
Was this page helpful?

