Delete Category
curl --request DELETE \
--url https://api.eka.care/ipd/v1/service/categories/{category_id} \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/ipd/v1/service/categories/{category_id}"
headers = {"auth": "<auth>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {auth: '<auth>'}};
fetch('https://api.eka.care/ipd/v1/service/categories/{category_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eka.care/ipd/v1/service/categories/{category_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"auth: <auth>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/ipd/v1/service/categories/{category_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("auth", "<auth>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.eka.care/ipd/v1/service/categories/{category_id}")
.header("auth", "<auth>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/v1/service/categories/{category_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["auth"] = '<auth>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"success": true
}
}{
"message": "Category not found"
}{
"message": "<string>"
}Categories
Delete Category
Overview
This API deletes an IPD category of your workspace. The delete is a soft delete: the category is archived, not removed.
Cascading archive: deleting a category also archives every room under it and every bed in those rooms. Archived categories, rooms and beds are no longer returned in listings.
Returns 400 with Category not found when the category_id does not exist or belongs to another workspace.
DELETE
/
ipd
/
v1
/
service
/
categories
/
{category_id}
Delete Category
curl --request DELETE \
--url https://api.eka.care/ipd/v1/service/categories/{category_id} \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/ipd/v1/service/categories/{category_id}"
headers = {"auth": "<auth>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {auth: '<auth>'}};
fetch('https://api.eka.care/ipd/v1/service/categories/{category_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eka.care/ipd/v1/service/categories/{category_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"auth: <auth>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/ipd/v1/service/categories/{category_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("auth", "<auth>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.eka.care/ipd/v1/service/categories/{category_id}")
.header("auth", "<auth>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/v1/service/categories/{category_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["auth"] = '<auth>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"success": true
}
}{
"message": "Category not found"
}{
"message": "<string>"
}Was this page helpful?

